tor/src
David Goulet bbe90e3ec1 hs-v2: Always check rend_cache validity before using it
When looking up an entry in the rend_cache, stop asserting that it exists but
rather confirm it exists and if not, return that no entry was found.

The reason for that is because the hs_circ_cleanup_on_free() function (which
can end up looking at the rend_cache) can be called from the
circuit_free_all() function that is called _after_ the rend cache is cleaned
up in tor_free_all().

We could fix the free all ordering but then it will just hide a future bug.
Instead, handle a missing rend_cache as a valid use case as in while we are in
the cleanup process.

As Tor becomes more modular, it is getting more and more difficult to ensure
subsystem callstack ordering thus this fix aims at making the HSv2 subsystem
more robust at being called while tor is pretty much in any kind of state.

Fixes #32847.

Signed-off-by: David Goulet <dgoulet@torproject.org>
2020-01-13 09:25:26 -05:00
..
app Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
config python: Add __future__ imports for python 3 compatibility 2019-12-12 15:58:51 +10:00
core Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
ext siphash.h: include stdint. 2020-01-09 07:30:35 -05:00
feature hs-v2: Always check rend_cache validity before using it 2020-01-13 09:25:26 -05:00
lib Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
rust Bug 31356: Bump protover for new padding machines 2019-08-12 14:02:35 -05:00
test Merge branch 'disable_ns_macro' 2020-01-09 16:02:41 -05:00
tools Merge branch 'pre_formatter_cleanups_squashed' 2020-01-09 07:32:39 -05:00
trunnel practracker: Add missing .may_include files 2019-12-04 12:15:22 -05:00
win32 bump to 0.4.2.5-dev 2019-12-09 16:03:31 -05:00
arch_goals.md Document high-level architecture goals 2019-12-10 16:47:38 -06:00
include.am Move unit-parsing code to src/lib/confmgt 2019-06-24 15:11:57 -04:00
mainpage.md Document high-level architecture goals 2019-12-10 16:47:38 -06:00