Opened 11 years ago

Last modified 7 years ago

#737 closed defect (Fixed)

Can't guess own address when using TunneledDirConns

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

Description

00:38 < goldy> P I N G
00:39 < goldy> While working on a controller for the control port, I noticed

that "getinfo address" appears to be broken. I get a "550
Internal error" message.

00:40 < goldy> arma2, nickm, any idea as to why?
00:40 < nickm> what version of tor?
00:40 < nickm> reproducible/not?
00:41 < goldy> Windows: 0.2.1.2-alpha and 0.2.0.28-rc
00:41 < goldy> reproducible with those versions.
00:41 < nickm> ah.
00:41 < goldy> 0.1.2.19 and 0.1.2.14 both seem to work alright.
00:42 < nickm> it doesn't have any guess as to what its address is yet
00:42 < goldy> alright...
00:42 < nickm> previous versions learned it from directory headers or from

resolving the address field in the config file

00:42 < goldy> what changed?
00:43 < nickm> it's possible that when we switched to getting directory over

tor by default, we stopped getting useful header info in
directory replies.

00:43 < goldy> this was on a clean install, no cached-* files yet.
00:44 < nickm> seems like a bug.
00:44 < nickm> ah yes, in directory.c:
00:44 < goldy> why do I always find wierd bugs.
00:44 < nickm> if (conn->dirconn_direct) {
00:44 < nickm> char *guess = http_get_header(headers, X_ADDRESS_HEADER);
00:44 < nickm> because your use case is not typical?
00:44 < goldy> hehe, I'm not typical. :)
00:44 < nickm> because you were a windows programmer in a past life? :)
00:45 < nickm> it looks like tor only examines the X-your-address-is header on

a direct directory connection.

00:45 < nickm> this makes a bit of sense, but not perfect sense: that header

should be fine if we're doing an encrypted one-hop connection.

00:45 < nickm> really, though, it should be looking at netinfo cells.
00:45 < nickm> hm.
00:46 < goldy> so your saying that new installs are using a circuit to get

directory info?

00:46 < nickm> 0.2.0.x should do the former, and 0.2.1.x the latter
00:46 < nickm> goldy: Don't you read the changelogs? :)
00:46 < goldy> I briefly looked at it.
00:46 < nickm> new installs get directory information over one-hop connections

by default. To a first approximation.

00:46 < goldy> but didn't see a "yeah, this might break _x_" so I didn't see

it. ;)

00:47 < goldy> so who is the first hop? another hard-coded DA?
00:47 < nickm> first hop in a one-hop circuit? it would be the directory

server.

00:48 < goldy> so it would be like ( me -> DA) or (me -> one_hop[DA?] -> DA )?
00:48 < nickm> yup, verified. if you run with TunneledDirConns off, getinfo

address works again. this is a bug.

00:49 < goldy> ah, OK.
00:49 < nickm> mind if I copy-and-paste this conversation to the bugtracker?
00:49 < goldy> I was wondering why my IP checking program was crashing...guess

I found out why.

00:49 < goldy> not at all.

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 11 years ago by nickm

15:45 < armadev> ah. it is more complex than what you say
15:45 < armadev> /* decide whether we can learn our IP address from this conn

*/

15:45 < armadev> conn->dirconn_direct = !anonymized_connection;
15:45 < armadev> dirconn_direct is 1 for both http requests and http requests

on one-hop tunels.

15:45 < nickm> hm.

comment:2 Changed 11 years ago by arma

I think r15571 solves this.
Alas, it means it will only start to really work once relays have
upgraded. That means we should include it in the 0.2.0.x tree once
we've tried it a bit.

comment:3 Changed 11 years ago by arma

Ok. I backported it, and actually tested it too. Going to close this bug.

comment:4 Changed 11 years ago by arma

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

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