[tor-dev] Hidden Services and IP address changes

Michael Rogers michael at briarproject.org
Thu May 21 13:17:10 UTC 2015

On 21/05/15 14:04, Nathan Freitas wrote:
> On Thu, May 21, 2015, at 07:16 AM, Martin Florian wrote:
>> I think I've found one or more bugs that appear when Tor clients
>> hosting HSes change their IP address during operation. I'm slightly
>> overwhelmed from reading the Tor source code and not sure how to best
>> fix them.
> Thanks for bringing this up. I know Michael from Briar has definitely
> focused on solving this at some point, and Yaron from the Thali Project
> (who build this library:
> https://github.com/thaliproject/Tor_Onion_Proxy_Library), as well. I've
> been implementing an OnionShare-type app myself, and had hoped this was
> solved by some recent changes, but it seems not, from your experience.

I think this may be a different problem from the one I looked at, which
was related to introduction points rather than rendezvous points.

But that reminds me, the solution for the stale introduction point issue
(flushing the HS descriptor from the cache on the client before
connecting) still needs to go through the patch workshop. I'll bump that
up the todo list.

>> The central issue that I discovered can be reproduced like this
>> (assuming Tor clients A, B and C):
>> 1. (Setup) A hosts the HS X and A, B and C are all booted up.
>> 2. B connects to X - it works!
>> 3. A changes its IP address.
>> 4. B tries to talk to X again - doesn't work!
>> 5. C tries to talk to X (for the first time) - works like a charm (so
>> X IS working)
>> I digged through the Tor log and source code and have now arrived at
>> following hypothesis for why this particular error happens:
>> - - after A changes its IP addresses, it never establishes a circuit to
>> the old RP with B again.
>> - - B, on the other hand, keeps trying to talk with A through that RP,
>> saying that it is an "Active rendezvous point". B never stops trying
>> to use that RP.

I wonder whether the RP knows that the service-RP circuit has died, and
if so, should it tear down the client-RP circuit?

> I wonder if B also was running a hidden service, if it would be possible
> at the application level for A to tell B that it has changed IP
> addresses, and then through some interaction with the Tor Control Port,
> to fresh the RP?

It would be nice if we could find a way to detect this at the Tor level
so we don't have to maintain two circuits between A and B.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0x9FC527CC.asc
Type: application/pgp-keys
Size: 1748 bytes
Desc: not available
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20150521/464b5c3c/attachment.key>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 490 bytes
Desc: OpenPGP digital signature
URL: <http://lists.torproject.org/pipermail/tor-dev/attachments/20150521/464b5c3c/attachment.sig>

More information about the tor-dev mailing list