[tor-bugs] #25139 [Core Tor/Tor]: Link protocol negotiation without common version
Tor Bug Tracker & Wiki
blackhole at torproject.org
Sun Feb 4 02:22:14 UTC 2018
#25139: Link protocol negotiation without common version
------------------------------+--------------------
Reporter: atagar | Owner: (none)
Type: defect | Status: new
Priority: Low | Milestone:
Component: Core Tor/Tor | Version:
Severity: Minor | Keywords:
Actual Points: | Parent ID:
Points: | Reviewer:
Sponsor: |
------------------------------+--------------------
Hi lovely core tor folks. I'm presently teaching Stem to communicate over
tor's ORPort, and wanted to check about edge case behavior I ran into with
the integ tests.
The first step of establishing an ORPort connection is to negotiate the
protocol. This is done by...
* Sending a VERSIONS cell with the link protocol versions we support.
* Receive a VERSIONS cell in reply with versions the other side supports.
* All further cells are formatted using the highest common link protocol
version.
This is all well and good, but when there isn't a common link protocol
version the sender never receives a VERSIONS reply. That is to say, if I
send a VERSIONS cell with 3, 4, or 5 things work, but if I send a cell
with only other values (1, 2, 6, 20, etc) negotiation terminates right
away.
The tor-spec is clear that the connection will be closed, but not if the
caller should expect a VERSIONS reply...
{{{
If they have no such version in common, they cannot communicate and MUST
close the connection.
}}}
Personally I have a slight preference for the sender to get a VERSIONS
reply, then mutually close the socket. This way the caller will know *why*
the connection was closed...
* "They're a newer tor version than me and only speak higher protocol
versions."
... verses...
* "This is a really old relay that doesn't speak modern protocol
versions."
Just food for thought. I'm not heartbroken that connections end right away
- just makes for a vague error response to the user.
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/25139>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list