diff options
author | teor <teor@torproject.org> | 2019-11-25 12:35:11 +1000 |
---|---|---|
committer | teor <teor@torproject.org> | 2019-11-25 12:35:11 +1000 |
commit | 501b5174d84a121fe5932433e54b2929a5c2876d (patch) | |
tree | c1645132d628e3bcbdf55f79e8c3fd6cb9c86f0b | |
parent | 400cee261ecccd024f6cb13dd1a940d4b9d0057b (diff) | |
parent | ed57a04a65a59ee744910a9db22a81359dac3491 (diff) | |
download | tor-501b5174d84a121fe5932433e54b2929a5c2876d.tar.gz tor-501b5174d84a121fe5932433e54b2929a5c2876d.zip |
Merge remote-tracking branch 'tor-github/pr/1464' into maint-0.3.5
-rw-r--r-- | changes/ticket28970 | 6 | ||||
-rw-r--r-- | src/feature/hs/hs_client.c | 8 |
2 files changed, 12 insertions, 2 deletions
diff --git a/changes/ticket28970 b/changes/ticket28970 new file mode 100644 index 0000000000..138c575fcc --- /dev/null +++ b/changes/ticket28970 @@ -0,0 +1,6 @@ + o Minor bugfixes (clietn, hidden service v3): + - Fix a BUG() assertion that occurs within a very small race window between + a client intro circuit opens and its descriptor that gets cleaned up from + the cache. The circuit is now closed which will trigger a re-fetch of the + descriptor and continue the HS connection. Fixes bug 28970; bugfix on + 0.3.2.1-alpha. diff --git a/src/feature/hs/hs_client.c b/src/feature/hs/hs_client.c index 2a5765aec2..fd2d266453 100644 --- a/src/feature/hs/hs_client.c +++ b/src/feature/hs/hs_client.c @@ -672,8 +672,12 @@ setup_intro_circ_auth_key(origin_circuit_t *circ) tor_assert(circ); desc = hs_cache_lookup_as_client(&circ->hs_ident->identity_pk); - if (BUG(desc == NULL)) { - /* Opening intro circuit without the descriptor is no good... */ + if (desc == NULL) { + /* There is a very small race window between the opening of this circuit + * and the client descriptor cache that gets purged (NEWNYM) or the + * cleaned up because it expired. Mark the circuit for close so a new + * descriptor fetch can occur. */ + circuit_mark_for_close(TO_CIRCUIT(circ), END_CIRC_REASON_INTERNAL); goto end; } |