mirror of
https://gitlab.torproject.org/tpo/core/tor.git
synced 2024-11-20 10:12:15 +01:00
Make an attempt to fix bug 1024.
The internal error "could not find intro key" occurs when we want to send an INTRODUCE1 cell over a recently finished introduction circuit and think we built the introduction circuit with a v2 hidden service descriptor, but cannot find the introduction key in our descriptor. My first guess how we can end up in this situation is that we are wrong in thinking that we built the introduction circuit based on a v2 hidden service descriptor. This patch checks if we have a v0 descriptor, too, and uses that instead.
This commit is contained in:
parent
0cbc0c463b
commit
3e6bb050dd
@ -14,6 +14,9 @@ Changes in version 0.2.1.17-?? - 2009-??-??
|
|||||||
our quotas recently. Fixes bug 1013; bugfix on 0.2.1.8-alpha.
|
our quotas recently. Fixes bug 1013; bugfix on 0.2.1.8-alpha.
|
||||||
- Do not cap bandwidths reported by directory authorities; they are
|
- Do not cap bandwidths reported by directory authorities; they are
|
||||||
already adjusted to reflect reality.
|
already adjusted to reflect reality.
|
||||||
|
- When we can't find an intro key for a v2 hidden service descriptor,
|
||||||
|
fall back to the v0 hidden service descriptor and log a bug message.
|
||||||
|
Workaround for bug1024.
|
||||||
|
|
||||||
o Major features:
|
o Major features:
|
||||||
- Clients now use the bandwidth values in the consensus, rather than
|
- Clients now use the bandwidth values in the consensus, rather than
|
||||||
|
@ -94,10 +94,26 @@ rend_client_send_introduction(origin_circuit_t *introcirc,
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
if (!intro_key) {
|
if (!intro_key) {
|
||||||
log_warn(LD_BUG, "Internal error: could not find intro key.");
|
if (rend_cache_lookup_entry(introcirc->rend_data->onion_address,
|
||||||
|
0, &entry) > 0) {
|
||||||
|
log_warn(LD_BUG, "We have both a v0 and a v2 rend desc for this "
|
||||||
|
"service. The v2 desc doesn't contain the introduction "
|
||||||
|
"point (and key) to send an INTRODUCE1/2 cell to this "
|
||||||
|
"introduction point. Assuming the introduction point "
|
||||||
|
"is for v0 rend clients and using the service key "
|
||||||
|
"from the v0 desc instead. (This is probably a bug, "
|
||||||
|
"because we shouldn't even have both a v0 and a v2 "
|
||||||
|
"descriptor for the same service.)");
|
||||||
|
/* See flyspray task 1024. */
|
||||||
|
intro_key = entry->parsed->pk;
|
||||||
|
} else {
|
||||||
|
log_warn(LD_BUG, "Internal error: could not find intro key; we "
|
||||||
|
"only have a v2 rend desc with %d intro points.",
|
||||||
|
smartlist_len(entry->parsed->intro_nodes));
|
||||||
goto err;
|
goto err;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if (crypto_pk_get_digest(intro_key, payload)<0) {
|
if (crypto_pk_get_digest(intro_key, payload)<0) {
|
||||||
log_warn(LD_BUG, "Internal error: couldn't hash public key.");
|
log_warn(LD_BUG, "Internal error: couldn't hash public key.");
|
||||||
goto err;
|
goto err;
|
||||||
|
Loading…
Reference in New Issue
Block a user