diff options
author | Nick Mathewson <nickm@torproject.org> | 2017-09-18 09:25:21 -0400 |
---|---|---|
committer | Nick Mathewson <nickm@torproject.org> | 2017-09-18 09:32:41 -0400 |
commit | 09ea89764a4d3a907808ed7d4fe42abfe64bd486 (patch) | |
tree | 8450944b8d8a2d5e894a0866161377c55236368a /src | |
parent | e468498469ebb2a676e74884a34fa017fa8ac3a4 (diff) | |
download | tor-09ea89764a4d3a907808ed7d4fe42abfe64bd486.tar.gz tor-09ea89764a4d3a907808ed7d4fe42abfe64bd486.zip |
Fix log-uninitialized-stack bug in rend_service_intro_established.
Fixes bug 23490; bugfix on 0.2.7.2-alpha.
TROVE-2017-008
CVE-2017-0380
Diffstat (limited to 'src')
-rw-r--r-- | src/or/rendservice.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/or/rendservice.c b/src/or/rendservice.c index fb777ca154..8087e88499 100644 --- a/src/or/rendservice.c +++ b/src/or/rendservice.c @@ -3372,6 +3372,8 @@ rend_service_intro_established(origin_circuit_t *circuit, (unsigned)circuit->base_.n_circ_id); goto err; } + base32_encode(serviceid, REND_SERVICE_ID_LEN_BASE32 + 1, + rend_pk_digest, REND_SERVICE_ID_LEN); /* We've just successfully established a intro circuit to one of our * introduction point, account for it. */ intro = find_intro_point(circuit); @@ -3388,8 +3390,6 @@ rend_service_intro_established(origin_circuit_t *circuit, service->desc_is_dirty = time(NULL); circuit_change_purpose(TO_CIRCUIT(circuit), CIRCUIT_PURPOSE_S_INTRO); - base32_encode(serviceid, REND_SERVICE_ID_LEN_BASE32 + 1, - rend_pk_digest, REND_SERVICE_ID_LEN); log_info(LD_REND, "Received INTRO_ESTABLISHED cell on circuit %u for service %s", (unsigned)circuit->base_.n_circ_id, serviceid); |