Opened 5 years ago

Closed 5 years ago

#13924 closed defect (fixed)

Reachability testing and channel is_local assume private addresses are local

Reported by: teor Owned by: teor
Priority: Medium Milestone:
Component: Core Tor/Tor Version: Tor: 0.2.6.1-alpha
Severity: Keywords: tor-relay
Cc: nickm Actual Points:
Parent ID: #13718 Points:
Reviewer: Sponsor:

Description (last modified by teor)

Split from #13718.

The way tor determines reachability is broken for test, internal, and local networks.

When we set is_local on a channel, we assume private addresses are local DirAllowPrivateAddresses is 0. We then use is_local to determine whether a connection is from another router.

To properly bootstrap a testing tor network on private address(es), we must assume that every incoming OR connection is remote.

So we ignore is_local when TestingTorNetwork is 1.

I'm working on a patch that, when we're on a local address and DirAllowPrivateAddresses is 1, then checks whether we're connecting to our own digest, or another router's.

When we don't (yet) have this information (e.g. a reverse proxied connection), I think it's safer to assume local, and defer confirmation of reachability until we know who is at the other end. (This is no worse than the current behaviour.)

Child Tickets

Change History (7)

comment:1 Changed 5 years ago by teor

Actually, to properly bootstrap a testing tor network on private address(es), we must assume that every incoming OR connection is remote. (We shouldn't check the digest at the other end, as our self-test fails this test.)

comment:2 Changed 5 years ago by teor

Fixed as part of #13718. Composing commits over the next week.

comment:3 Changed 5 years ago by teor

Owner: set to teor
Status: newassigned

comment:4 Changed 5 years ago by teor

Status: assignedneeds_review

The changes to tor in #13718 have fixed this:

Bugs: #13718, #13814, maybe #13787, #13839, #13924, #13823, #13929, #13963
Branch: bug13718-fast-bootstrap
Note: There are 5 branches that start with bug13718, please choose the right one.
Repository: ​​​​​​​​https://github.com/teor2345/tor.git

comment:5 Changed 5 years ago by teor

Description: modified (diff)
Summary: Reachability testing and channel is_local assume DirAllowPrivateAddresses is 0Reachability testing and channel is_local assume private addresses are local

comment:6 Changed 5 years ago by teor

I've made a significant change to the commit for this bug, where we ignore the is_local flag when testing, rather than messing with how it is set. Updated descriptions & branches in #13718:

These changes to tor are included in commits in:

Bugs: #13718 (and maybe #13787), #13814, #13924
Branch: no-exit-bootstrap
Note: I got confused by all the branches starting with bug13718, so I picked an easier name.
Repository: ​​​​​​​https://github.com/teor2345/tor.git

comment:7 Changed 5 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

see #13718; merged.

Note: See TracTickets for help on using tickets.