[tor-bugs] #25586 [Core Tor/Torsocks]: gethostbyaddr_r doesn't populate h_addrtype field of output hostent struct

Tor Bug Tracker & Wiki blackhole at torproject.org
Thu Mar 22 12:30:57 UTC 2018


#25586: gethostbyaddr_r doesn't populate h_addrtype field of output hostent struct
-----------------------------------+---------------------
     Reporter:  exarkun            |      Owner:  dgoulet
         Type:  defect             |     Status:  new
     Priority:  Medium             |  Milestone:
    Component:  Core Tor/Torsocks  |    Version:
     Severity:  Normal             |   Keywords:
Actual Points:                     |  Parent ID:
       Points:                     |   Reviewer:
      Sponsor:                     |
-----------------------------------+---------------------
 The glibc implementation of gethostbyaddr_r will set h_addrtype to the
 address family that was passed in as an argument.  Some programs depend on
 this (CPython is the one I noticed) for correct operation.

 The current behavior leaves the field unchanged and likely provides an
 undefined value to the caller.  In the case of CPython, this results in
 `socket.gethostbyaddr` always raising EAFNOSUPPORT.

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


More information about the tor-bugs mailing list