Opened 3 years ago

Last modified 13 months ago

#17692 new defect

Review every use of onehop_tunnel for assumptions that it's a directory connection

Reported by: teor Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: unspecified
Severity: Normal Keywords: correctness, technical-debt, tor-hs, tor-client, single-onion
Cc: Actual Points:
Parent ID: Points: small/medium
Reviewer: Sponsor:


Previously, the only onehop_tunnel connections Tor made were for directory fetches.

But now, with Tor2Web and Rendezvous Single Onion Services (and Single Onion Services, when they arrive), several other modes make one-hop connections.

We should check every use of onehop_tunnel to make sure it's not being used as a substitute for checking the purpose / type of the connection.

Child Tickets

#17673newcircuit_handle_first_hop assumes all one-hop circuits are directory circuitsCore Tor/Tor

Change History (11)

comment:1 Changed 3 years ago by teor

A potential reason that the code checks onehop_tunnel is that there's no way of telling whether a circuit is a directory circuit or not. We might need a purpose field, or a way to get the associated purpose. (See #17673.)

comment:2 Changed 3 years ago by teor

If it works like I expect, we should be able to use circ->n_chan->channel_usage or or_circ->p_chan->channel_usage from #16861 to replace these onehop_tunnel checks.

comment:3 Changed 3 years ago by teor

Keywords: rsos added

comment:4 Changed 2 years ago by teor

Milestone: Tor: 0.2.8.x-finalTor: 0.2.9.x-final
Parent ID: #17178

Useful for completeness, but not a dependency of #17178 - the code works as-is. The limited number of assumptions we currently make are not that important.

comment:5 Changed 2 years ago by nickm

Points: small/medium

comment:6 Changed 2 years ago by isabela

Milestone: Tor: 0.2.9.x-finalTor: 0.2.???

tickets market to be removed from milestone 029

comment:7 Changed 20 months ago by teor

Milestone: Tor: 0.2.???Tor: 0.3.???

Milestone renamed

comment:8 Changed 19 months ago by nickm

Keywords: tor-03-unspecified-201612 added
Milestone: Tor: 0.3.???Tor: unspecified

Finally admitting that 0.3.??? was a euphemism for Tor: unspecified all along.

comment:9 Changed 14 months ago by nickm

Keywords: tor-03-unspecified-201612 removed

Remove an old triaging keyword.

comment:10 Changed 13 months ago by nickm

Keywords: correctness technical-debt tor-hs tor-client added

comment:11 Changed 13 months ago by teor

Keywords: single-onion added; rsos removed

Now there's only one kind of single onion service, change rsos to single-onion

Note: See TracTickets for help on using tickets.