Opened 8 years ago

Closed 7 years ago

#4091 closed defect (worksforme)

tor_addr_is_internal(): Bug: tor_addr_is_internal() called with a non-IP address.

Reported by: stars Owned by:
Priority: Medium Milestone: Tor: unspecified
Component: Core Tor/Tor Version: Tor: 0.2.3.7-alpha
Severity: Keywords: regression tor-relay
Cc: rransom, stars@…, nickm, andrea Actual Points:
Parent ID: Points:
Reviewer: Sponsor:

Description

Hi,

today after update to last Tor origin/master, i get a bug report in my log:

sept. 24 16:05:55.630 [Warning] tor_addr_is_internal(): Bug: tor_addr_is_internal() called with a non-IP address.

Tor v0.2.3.4-alpha-dev (git-5a8dcca8f7f86377) (with bufferevents). (Running on Linux x86_64)

Initialized libevent version 2.1.0-alpha-dev using method epoll (with changelist). Good. commit 2179d7359fecda9880cf15f9746b4f07bbecb055

OpenSSL OpenSSL 1.0.0e 6 Sep 2011 looks like version 0.9.8m or later; I will try SSL_OP to enable renegotiation

Linux 2.6.38-10-generic #46~lucid1-Ubuntu SMP Wed Jul 6 18:41:04 UTC 2011 x86_64 GNU/Linux

Best Regards

SwissTorHelp

Child Tickets

Change History (15)

comment:1 Changed 8 years ago by nickm

Cc: rransom added

Could this be related to the warn_nonlocal_client_ports change from bug #4018? I don't know what else we've touched on that timeframe that relates to or feeds into a tor_addr_is_internal.

comment:2 in reply to:  1 Changed 8 years ago by rransom

Status: newneeds_review

Replying to nickm:

Could this be related to the warn_nonlocal_client_ports change from bug #4018?

Yes. See bug4091 ( https://git.torproject.org/rransom/tor.git bug4091 ) for a fix.

comment:3 Changed 8 years ago by nickm

Resolution: fixed
Status: needs_reviewclosed

Great; merging.

comment:4 Changed 8 years ago by stars

Cc: stars@… added
Resolution: fixed
Status: closedreopened
Version: Tor: 0.2.3.4-alphaTor: 0.2.3.7-alpha

Hi to everyone,

Today this bug was again in my log:

nov. 17 18:29:33.664 [Warning] tor_addr_is_internal(): Bug: tor_addr_is_internal() called with a non-IP address.

Tor 0.2.3.7-alpha: commit 07a5fd10544be1ce382e02824617685d960ab3b7
Merge: 2f3dad1 5a02406

Libevent 2.1.0-alpha-dev: commit fe9e831ffb6bc544e55ff33bc44788d37bac592e
Merge: f5b937e 34045c8

comment:5 Changed 8 years ago by nickm

Milestone: Tor: 0.2.3.x-final

comment:6 Changed 8 years ago by nickm

Keywords: regression added

comment:7 Changed 8 years ago by nickm

Hm. Possibility 1 here is that the family is AF_UNIX; possibility two is that it's uninitialized. A simple log statement will track down which one it is. I've added that, and a tor_fragile_assert(), in 80b2756b537204ba070f1e3df4e5ed3f4e6815c0.

At this point, our best bet for finding it is to audit every caller of tor_addr_is_internal(), or for somebody who is hitting this warning and can get stack traces to run a copy of Tor built with tor_fragile_assert() enabled and get a stack trace. (You can uncomment it in src/common/util.h)

comment:8 Changed 7 years ago by nickm

Status: reopenedneeds_information

Sticking this in needs-information; until somebody triggers the log message, I can't figure out where the problem actually is.

comment:9 Changed 7 years ago by nickm

Keywords: tor-relay added

comment:10 Changed 7 years ago by nickm

Component: Tor RelayTor

comment:11 Changed 7 years ago by arma

Cc: nickm andrea added

Was this a duplicate of #7112?

comment:12 in reply to:  11 Changed 7 years ago by andrea

Replying to arma:

Was this a duplicate of #7112?

Sounds likely, but it'd be hard to know for certain without a stack trace on it. If it's 7112, it'll happen on incoming directory connections and involve completely blank addr fields (all zeros, not AF_UNIX as nickm suggested above).

comment:13 Changed 7 years ago by nickm

This was reported before we merged any of the channel_t code, and I *think* that code was the cause of #7112. I don't think this is the same bug, unless I'm missing something.

comment:14 in reply to:  13 Changed 7 years ago by andrea

Replying to nickm:

This was reported before we merged any of the channel_t code, and I *think* that code was the cause of #7112. I don't think this is the same bug, unless I'm missing something.

I thought we had reports of that message before channel_t; yeah, the specific path leading up to it was channel_t-specific (channel_tls_t-specific, even).

comment:15 Changed 7 years ago by nickm

Milestone: Tor: 0.2.3.x-finalTor: unspecified
Resolution: worksforme
Status: needs_informationclosed

Has anybody been seeing these recently? If so, they will come with a line number saying where they were called from. I haven't seen anyone report any of those, so I'm closing this ticket. Please reopen if there's a log message we should see about this.

Note: See TracTickets for help on using tickets.