Opened 10 years ago

Last modified 7 years ago

#1024 closed defect (Deferred)

rend_client_send_introduction(): Bug: Internal error: could not find intro key.

Reported by: stars Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.2.1.16-rc
Severity: Keywords:
Cc: stars, nickm, karsten, Sebastian Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

hello,

i have this bug error in my log:

juin 30 18:20:56.587 [Avertissement] rend_client_send_introduction(): Bug: Internal error: could not find intro key.

i am on ubuntu jaunty 64 bits x86 64

relay: swisstorexit

[Automatically added by flyspray2trac: Operating System: Other Linux]

Child Tickets

Change History (7)

comment:1 Changed 10 years ago by karsten

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. The following patch checks if we have a v0 descriptor,
too, and uses that instead (see branch "bug1024-maint-0.2.1" in my public
repository). If I'm right, there will be messages "We have both a v0 and v2
rend desc for this service. The v2 desc doesn't fit, so we're using the v0
desc instead." in future logs. If not, the warning will be slightly more
verbose, saying "Internal error: could not find intro key; we only have a
v2 rend desc with ?? intro points."

diff --git a/src/or/rendclient.c b/src/or/rendclient.c
index 5b18a51..5ccf153 100644
--- a/src/or/rendclient.c
+++ b/src/or/rendclient.c
@@ -94,8 +94,18 @@ rend_client_send_introduction(origin_circuit_t *introcirc,

}

});
if (!intro_key) {

  • log_warn(LD_BUG, "Internal error: could not find intro key.");
  • goto err;

+ if (rend_cache_lookup_entry(introcirc->rend_data->onion_address,
+ 0, &entry) > 0) {
+ log_info(LD_REND, "We have both a v0 and v2 rend desc for this "
+ "service. The v2 desc doesn't fit, so we're using the v0 "
+ "desc instead."); /* 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;
+ }

}

}
if (crypto_pk_get_digest(intro_key, payload)<0) {

In order to track this bug down, it would be good to have more logs about
adding v0/v2 descriptors to the cache, removing intro points, etc. Please
add the following config line to your torrc: "Log [REND] debug file
rend-debug.log" and attach the contents of rend-debug-log to the bug report
(after looking over it for potentially sensitive information!).

comment:2 Changed 10 years ago by stars

Thanks for your quick answer, you will have my log when it bug again :)

my best

swisstorexit

comment:3 Changed 10 years ago by nickm

Added logging code.

comment:4 Changed 10 years ago by Sebastian

Did this ever happen again?

comment:5 Changed 10 years ago by stars

no sebastian, never see it anymore

SwissTorExit

comment:6 Changed 9 years ago by Sebastian

flyspray2trac: bug closed.
Deferring this until it happens again with debug info

comment:7 Changed 7 years ago by nickm

Component: Tor ClientTor
Note: See TracTickets for help on using tickets.