mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-10 21:23:58 +01:00
Merge remote-tracking branch 'origin/maint-0.2.2'
Conflicts: src/or/rendservice.c Conflicts were due to new NON_ANONYMOUS_MODE_ENABLED tor2web code; I think I resolved them correctly.
This commit is contained in:
commit
e9dae1ff2e
5
changes/bug5644
Normal file
5
changes/bug5644
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
o Major bugfixes
|
||||||
|
- Prevent a client-side assertion failure when receiving an
|
||||||
|
INTRODUCE2 cell by an exit relay, in a general purpose
|
||||||
|
circuit. Fixes bug 5644; bugfix on tor-0.2.1.6-alpha
|
||||||
|
|
@ -1064,6 +1064,13 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
|
|||||||
time_t *access_time;
|
time_t *access_time;
|
||||||
const or_options_t *options = get_options();
|
const or_options_t *options = get_options();
|
||||||
|
|
||||||
|
if (circuit->_base.purpose != CIRCUIT_PURPOSE_S_INTRO) {
|
||||||
|
log_warn(LD_PROTOCOL,
|
||||||
|
"Got an INTRODUCE2 over a non-introduction circuit %d.",
|
||||||
|
circuit->_base.n_circ_id);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NON_ANONYMOUS_MODE_ENABLED
|
#ifndef NON_ANONYMOUS_MODE_ENABLED
|
||||||
tor_assert(!(circuit->build_state->onehop_tunnel));
|
tor_assert(!(circuit->build_state->onehop_tunnel));
|
||||||
#endif
|
#endif
|
||||||
@ -1074,13 +1081,6 @@ rend_service_introduce(origin_circuit_t *circuit, const uint8_t *request,
|
|||||||
log_info(LD_REND, "Received INTRODUCE2 cell for service %s on circ %d.",
|
log_info(LD_REND, "Received INTRODUCE2 cell for service %s on circ %d.",
|
||||||
escaped(serviceid), circuit->_base.n_circ_id);
|
escaped(serviceid), circuit->_base.n_circ_id);
|
||||||
|
|
||||||
if (circuit->_base.purpose != CIRCUIT_PURPOSE_S_INTRO) {
|
|
||||||
log_warn(LD_PROTOCOL,
|
|
||||||
"Got an INTRODUCE2 over a non-introduction circuit %d.",
|
|
||||||
circuit->_base.n_circ_id);
|
|
||||||
return -1;
|
|
||||||
}
|
|
||||||
|
|
||||||
/* min key length plus digest length plus nickname length */
|
/* min key length plus digest length plus nickname length */
|
||||||
if (request_len < DIGEST_LEN+REND_COOKIE_LEN+(MAX_NICKNAME_LEN+1)+
|
if (request_len < DIGEST_LEN+REND_COOKIE_LEN+(MAX_NICKNAME_LEN+1)+
|
||||||
DH_KEY_LEN+42) {
|
DH_KEY_LEN+42) {
|
||||||
|
Loading…
Reference in New Issue
Block a user