Opened 6 years ago

Closed 4 years ago

#9269 closed defect (worksforme)

ARM uncaught exception if ORPort contains an IP address

Reported by: cypherpunks Owned by: atagar
Priority: Low Milestone:
Component: Core Tor/Nyx Version: Tor: 0.2.3.25
Severity: Normal Keywords:
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

If I set ORPort not to just a portnumber (like 443) but to IP:port, arm outputs a python stacktrace like this:

Exception in thread Thread-5:
Traceback (most recent call last):
File "/usr/lib/python2.7/threading.py", line 552, in __bootstrap_inner
self.run()
File "/usr/share/arm/cli/connections/connPanel.py", line 282, in run
self._update()            # populates initial entries
File "/usr/share/arm/cli/connections/connPanel.py", line 486, in _update
newEntries.append(circEntry.CircEntry(circuitID, status, purpose, path))
File "/usr/share/arm/cli/connections/circEntry.py", line 34, in __init__
self.update(status, path)
File "/usr/share/arm/cli/connections/circEntry.py", line 53, in update
self.lines[0].setExit(exitIp, exitORPort, path[-1])
File "/usr/share/arm/cli/connections/circEntry.py", line 84, in setExit
connEntry.ConnectionLine.__init__(self, "127.0.0.1", "0", exitIpAddr, exitPort, False, False)
File "/usr/share/arm/cli/connections/connEntry.py", line 254, in __init__
self.sortPort = int(self.foreign.getPort())
      ValueError: invalid literal for int() with base 10: '256.256.256.256:443'                                                                               

(replace 256.256.256.256 with an actual IP address)

Child Tickets

Change History (6)

comment:1 Changed 6 years ago by atagar

That's interesting. So your ORPort is set to an IP or someone else's? That stacktrace indicates that the IP slipped into your circuits somehow.

If there *is* a "ORPort 256.256.256.256" entry in your torrc then does tor accept that? That certainly sounds like a tor bug (its man page says that it only accepts ports).

comment:2 Changed 6 years ago by cypherpunks

@atagar: yes, tor does accept IP:Port entries.

Steps to replace:

  • Install Tor 0.2.3.25 (recommended)
  • stop tor service
  • Edit config file:

ORPort <your own server's IP address>:443

  • start tor service
  • see this log entries: 18:06:42 [NOTICE] Performing bandwidth self-test...done. 18:06:38 [NOTICE] Self-testing indicates your DirPort is reachable from the outside. Excellent.
  • tor runs normally without complaining

comment:3 Changed 6 years ago by atagar

That certainly sounds like a tor bug (its man page says that it only accepts ports).

Scratch this, the man page now allows for addresses (I was probably looking at an outdated version). The ORPort line has had several expansions since arm's last release which caused issues for us (especially flags like 'NoAdvertise'). This will be addressed in the next arm release.

comment:4 Changed 6 years ago by Christian

FYI, this is still happening with tor-0.2.4.20-1~d70.wheezy+1 and tor-arm-1.4.5.0-1 (Debian).

comment:5 Changed 5 years ago by AVee

It also fails when adding a extra ORPort line with an IPv6 addres, that should be dealt with as well.

comment:6 Changed 4 years ago by atagar

Resolution: worksforme
Severity: Normal
Status: newclosed

Cleaning up old tickets. Nyx is undergoing a rewrite, if this is still relevant then feel free to reopen.

Note: See TracTickets for help on using tickets.