[tor-bugs] #32315 [Core Tor/Tor]: Can't perform reverse DNS lookup for a (binary) IPv6 address

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Nov 7 04:46:58 UTC 2019


#32315: Can't perform reverse DNS lookup for a (binary) IPv6 address
--------------------------+------------------------------------
 Reporter:  liberat       |          Owner:  (none)
     Type:  defect        |         Status:  needs_review
 Priority:  Medium        |      Milestone:  Tor: 0.4.3.x-final
Component:  Core Tor/Tor  |        Version:  Tor: 0.4.1.6
 Severity:  Normal        |     Resolution:
 Keywords:  ipv6, dns     |  Actual Points:
Parent ID:                |         Points:
 Reviewer:  teor          |        Sponsor:
--------------------------+------------------------------------

Comment (by liberat):

 Sorry I didn't explain what's going on there.

 If the client specifies a ''binary'' IPv4 or IPv6 address in the SOCKS
 request, it is converted into an ASCII string before any further
 processing is done.  This conversion is done by
 parse_socks5_client_request, regardless of whether the request is a
 CONNECT, RESOLVE, or RESOLVE_PTR.

 In the case of a binary IPv6 address, it is converted to a string by
 calling tor_addr_to_str with the 'decorate' parameter set to 1, which adds
 brackets around it.

 Later on, process_socks5_client_request is called, and the above check
 takes place.  string_is_valid_ipv6_address only accepts addresses
 ''without'' brackets, so the bracketed string is rejected.

 So, no, the above patch should address both "binary" and "ASCII" client
 requests.

 I'll try to write some tests and make a pull request this weekend.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/32315#comment:7>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online


More information about the tor-bugs mailing list