0
0
mirror of https://gitlab.torproject.org/tpo/core/tor.git synced 2024-09-20 04:12:13 +02:00

conflux: Don't process a closed circuit on get packaged window

Signed-off-by: David Goulet <dgoulet@torproject.org>
This commit is contained in:
David Goulet 2024-04-15 14:45:29 -04:00
parent 6ebf436084
commit 612b801ea5
2 changed files with 12 additions and 0 deletions

5
changes/ticket40908 Normal file
View File

@ -0,0 +1,5 @@
o Minor bugfixes (conflux):
- Make sure we don't process a closed circuit when packaging data. This lead
to a non fatal BUG() spamming logs. Fixes bug 40908; bugfix on
0.4.8.1-alpha.

View File

@ -33,6 +33,13 @@ int
circuit_get_package_window(circuit_t *circ,
const crypt_path_t *cpath)
{
/* We believe it is possible to get a closed circuit related to the
* on_circuit pointer of a connection not being nullified before ending up
* here. Else, this can lead to loud bug like experienced in #40908. */
if (circ->marked_for_close) {
return 0;
}
if (circ->conflux) {
if (CIRCUIT_IS_ORIGIN(circ)) {
tor_assert_nonfatal(circ->purpose ==