Opened 12 years ago

Last modified 7 years ago

#409 closed defect (Won't implement)

Tor doesn't treat 0 as a valid port

Reported by: Orum Owned by:
Priority: Low Milestone:
Component: Core Tor/Tor Version: 0.1.2.10-rc
Severity: Keywords:
Cc: Orum Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Tor does not treat the officially reserved port 0 as a valid port when considering
exit policies. For example, "reject *:0-19" would be summarixed as "reject *:1-19"
and would show up in the directory as such.

Actual version of tor is 0.1.2.12-rc, but that is not listed in the options.

Reference: http://www.iana.org/assignments/port-numbers

[Automatically added by flyspray2trac: Operating System: All]

Child Tickets

Change History (5)

comment:1 Changed 12 years ago by nickm

Our bad. We've been treating port 0 as nonexistent and unusable since Tor 0.0.1 (!). I could try to change this,
but it's not obvious how to do so. Is there an actual use case for allowing connections to port 0?

comment:2 Changed 12 years ago by Orum

It's probably safe to block it completely. Nothing should use it, and those that do probably shouldn't be using it. Apparently, you're only supposed to bind to port 0 when using the null address (0.0.0.0), and then it binds to a random port for any address (*) (linux behavior?). Some other systems might also let you bind to it using a specified address, and still give you a random port (windows behavior?). Either way, you should never need to exit to it.

comment:3 Changed 12 years ago by nickm

Hm. Okay, I'm going to just note in the spec that exit to port 0 is never permitted then, and close this bug report.

comment:4 Changed 12 years ago by nickm

flyspray2trac: bug closed.

comment:5 Changed 7 years ago by nickm

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