[tor-bugs] #28995 [Core Tor/Tor]: Fix the IPv6 case of tor_ersatz_socketpair

Tor Bug Tracker & Wiki blackhole at torproject.org
Fri Jan 4 21:38:05 UTC 2019


#28995: Fix the IPv6 case of tor_ersatz_socketpair
--------------------+------------------------------
 Reporter:  kjak    |          Owner:  (none)
     Type:  defect  |         Status:  new
 Priority:  Medium  |      Component:  Core Tor/Tor
  Version:          |       Severity:  Normal
 Keywords:          |  Actual Points:
Parent ID:          |         Points:
 Reviewer:          |        Sponsor:
--------------------+------------------------------
 In `get_local_listener` which is used by `tor_ersatz_socketpair`,
 `sin6_family` is currently being set to `AF_INET` in the IPv6 case when
 `AF_INET6` should be used instead.

 This code was introduced in commit
 9b24609af003cb79091e628c179cf617ff41aae7 from this past August, so this is
 not a brand-new problem.

 I tested this on my OpenBSD box by forcing an IPv6 socket to be used for
 `tor_ersatz_socketpair` and running the test suite.  There is a test in
 the test suite that tests `tor_ersatz_socketpair`: it (of course) fails
 using the current `AF_INET` code but it passes when using `AF_INET6`
 instead.

 PR to follow to change `AF_INET` to `AF_INET6` in the IPv6 case.

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


More information about the tor-bugs mailing list