Opened 7 years ago

Closed 7 years ago

Last modified 7 years ago

#6690 closed defect (fixed)

compare_tor_addr_to_addr_policy assertion error

Reported by: mr-4 Owned by:
Priority: Very High Milestone: Tor: 0.2.2.x-final
Component: Core Tor/Tor Version: Tor: 0.2.3.15-alpha
Severity: Keywords: tor-client
Cc: Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Occasionally, usually after tor fetches its directory microdescriptors or when I "wake" tor up after a long time of inactivity, I get the following error:

compare_tor_addr_to_addr_policy(): Bug: policies.c:716: compare_tor_addr_to_addr_policy: Assertion port != 0 failed; aborting.

After which tor exits. This didn't happen before (and I have been with this version of tor for a long time), though I've had this error twice in a week now, so thought to report it.

Child Tickets

Change History (9)

comment:1 Changed 7 years ago by cypherpunks

Did you tried newer versions: 16,17,18,19,20? Are you using some non-default options for torrc? Could you post some more details about it?

comment:2 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:3 Changed 7 years ago by nickm

A stack trace would be very helpful too, if you can get one.

comment:4 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: 0.2.2.x-final
Priority: normalcritical

Okay, looking through the code, we need fixes as follows:

  • Replace the assertion with "if (port == 0) return ADDR_POLICY_REJECTED;"
  • Maybe, reject any routerstatus with or_port == 0. At least authorities should do this.

A pseudonymous friend reports that there's a remote DOS opportunity against and by directory servers here, so we should treat this as pretty urgent.

comment:5 Changed 7 years ago by nickm

Status: newneeds_review

Smallest possible fix in branch 'bug6690_022'.

comment:6 Changed 7 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

That one is now in 0.2.2 and forward to master. I'll add another ticket for rejecting routerstatuses with a 0 orport.

comment:7 in reply to:  6 Changed 7 years ago by nickm

Replying to nickm:

That one is now in 0.2.2 and forward to master. I'll add another ticket for rejecting routerstatuses with a 0 orport.

This new ticket is #6716

comment:8 Changed 7 years ago by nickm

Keywords: tor-client added

comment:9 Changed 7 years ago by nickm

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