diff options
author | David Goulet <dgoulet@torproject.org> | 2024-04-15 14:45:29 -0400 |
---|---|---|
committer | David Goulet <dgoulet@torproject.org> | 2024-04-15 14:45:29 -0400 |
commit | 612b801ea53cd0b318e3bf88da5bb5de6b507226 (patch) | |
tree | 97e20db3be313547c20d247dc0a1774b3d107fda /src/core | |
parent | 6ebf4360840b173b92fcdb14ce22bd326cea652f (diff) | |
download | tor-612b801ea53cd0b318e3bf88da5bb5de6b507226.tar.gz tor-612b801ea53cd0b318e3bf88da5bb5de6b507226.zip |
conflux: Don't process a closed circuit on get packaged window
Signed-off-by: David Goulet <dgoulet@torproject.org>
Diffstat (limited to 'src/core')
-rw-r--r-- | src/core/or/conflux_util.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/core/or/conflux_util.c b/src/core/or/conflux_util.c index 31ab983f8f..4277424ec8 100644 --- a/src/core/or/conflux_util.c +++ b/src/core/or/conflux_util.c @@ -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 == |