mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Extend intro point to a 4th hop on cannibalization
Fixes #16260 Signed-off-by: David Goulet <dgoulet@ev0ke.net>
This commit is contained in:
parent
43a98c7da6
commit
a5b5d4bd2e
11
changes/bug16260
Normal file
11
changes/bug16260
Normal file
@ -0,0 +1,11 @@
|
|||||||
|
o Minor bugfix (Hidden service)
|
||||||
|
- When cannibalizing a circuit for an introduction point, always extend
|
||||||
|
to the chosen exit node creating a 4 hop circuit instead of using the
|
||||||
|
current circuit exit node which resulted in changing the original
|
||||||
|
intro point choice. This resulted in the hidden service skipping
|
||||||
|
excluded nodes like for instance reconnecting to an expired intro
|
||||||
|
point.; Fixes #16260; bugfixes on tor-0.1.0.1-rc~460.
|
||||||
|
|
||||||
|
This is particularly important for the introduction point retry
|
||||||
|
behavior (#8239) since cannibalization is allowed, which is desired,
|
||||||
|
so it's important to pin the chosen exit point.
|
@ -1766,12 +1766,12 @@ circuit_launch_by_extend_info(uint8_t purpose,
|
|||||||
|
|
||||||
switch (purpose) {
|
switch (purpose) {
|
||||||
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
|
case CIRCUIT_PURPOSE_C_ESTABLISH_REND:
|
||||||
case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO:
|
|
||||||
/* it's ready right now */
|
/* it's ready right now */
|
||||||
break;
|
break;
|
||||||
case CIRCUIT_PURPOSE_C_INTRODUCING:
|
case CIRCUIT_PURPOSE_C_INTRODUCING:
|
||||||
case CIRCUIT_PURPOSE_S_CONNECT_REND:
|
case CIRCUIT_PURPOSE_S_CONNECT_REND:
|
||||||
case CIRCUIT_PURPOSE_C_GENERAL:
|
case CIRCUIT_PURPOSE_C_GENERAL:
|
||||||
|
case CIRCUIT_PURPOSE_S_ESTABLISH_INTRO:
|
||||||
/* need to add a new hop */
|
/* need to add a new hop */
|
||||||
tor_assert(extend_info);
|
tor_assert(extend_info);
|
||||||
if (circuit_extend_to_new_exit(circ, extend_info) < 0)
|
if (circuit_extend_to_new_exit(circ, extend_info) < 0)
|
||||||
|
@ -2765,21 +2765,10 @@ rend_service_launch_establish_intro(rend_service_t *service,
|
|||||||
safe_str_client(extend_info_describe(intro->extend_info)));
|
safe_str_client(extend_info_describe(intro->extend_info)));
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
/* We must have the same exit node even if cannibalized. */
|
||||||
if (tor_memneq(intro->extend_info->identity_digest,
|
tor_assert(tor_memeq(intro->extend_info->identity_digest,
|
||||||
launched->build_state->chosen_exit->identity_digest, DIGEST_LEN)) {
|
|
||||||
char cann[HEX_DIGEST_LEN+1], orig[HEX_DIGEST_LEN+1];
|
|
||||||
base16_encode(cann, sizeof(cann),
|
|
||||||
launched->build_state->chosen_exit->identity_digest,
|
launched->build_state->chosen_exit->identity_digest,
|
||||||
DIGEST_LEN);
|
DIGEST_LEN));
|
||||||
base16_encode(orig, sizeof(orig),
|
|
||||||
intro->extend_info->identity_digest, DIGEST_LEN);
|
|
||||||
log_info(LD_REND, "The intro circuit we just cannibalized ends at $%s, "
|
|
||||||
"but we requested an intro circuit to $%s. Updating "
|
|
||||||
"our service.", cann, orig);
|
|
||||||
extend_info_free(intro->extend_info);
|
|
||||||
intro->extend_info = extend_info_dup(launched->build_state->chosen_exit);
|
|
||||||
}
|
|
||||||
|
|
||||||
launched->rend_data = rend_data_service_create(service->service_id,
|
launched->rend_data = rend_data_service_create(service->service_id,
|
||||||
service->pk_digest, NULL,
|
service->pk_digest, NULL,
|
||||||
|
Loading…
Reference in New Issue
Block a user