tor
tor copied to clipboard
hs-v3: Remove a BUG() caused by an acceptable race
hs_client_purge_state() and hs_cache_clean_as_client() can remove a descriptor from the client cache with a NEWNYM or simply when the descriptor expires.
Which means that for an INTRO circuit being established during that time, once it opens, we lookup the descriptor to get the IP object but hey surprised, no more descriptor.
The approach here is minimalist that is accept the race and close the circuit since we can not continue. Before that, the circuit would stay opened and the client wait the SockTimeout.
Fixers #28970.
Signed-off-by: David Goulet [email protected]
Pull Request Test Coverage Report for Build 6876
- 0 of 2 (0.0%) changed or added relevant lines in 1 file are covered.
- 13 unchanged lines in 3 files lost coverage.
- Overall coverage decreased (-0.02%) to 63.362%
Changes Missing Coverage | Covered Lines | Changed/Added Lines | % |
---|---|---|---|
src/feature/hs/hs_client.c | 0 | 2 | 0.0% |
<!-- | Total: | 0 | 2 |
Files with Coverage Reduction | New Missed Lines | % |
---|---|---|
src/feature/hs/hs_client.c | 1 | 50.29% |
src/feature/dirauth/shared_random.c | 3 | 85.54% |
src/feature/dirauth/dirvote.c | 9 | 64.99% |
<!-- | Total: | 13 |
Totals | |
---|---|
Change from base Build 6864: | -0.02% |
Covered Lines: | 47998 |
Relevant Lines: | 75752 |