[tor-bugs] #24733 [Core Tor/Tor]: Loading ifc.ifc_buf using the new tor_free() causes undefined behaviour on x86_64 macOS

Tor Bug Tracker & Wiki blackhole at torproject.org
Mon Jan 8 15:39:17 UTC 2018


#24733: Loading ifc.ifc_buf using the new tor_free() causes undefined behaviour on
x86_64 macOS
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  teor
     Type:  defect                               |         Status:
                                                 |  needs_revision
 Priority:  Medium                               |      Milestone:  Tor:
                                                 |  0.3.3.x-final
Component:  Core Tor/Tor                         |        Version:
 Severity:  Normal                               |     Resolution:
 Keywords:  address-sanitizer, unexpected-       |  Actual Points:  0.1
  consequences, review-group-28                  |
Parent ID:                                       |         Points:  0.1
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8-can
-------------------------------------------------+-------------------------

Comment (by teor):

 Replying to [comment:8 catalyst]:
 > Another approach is making a special (static) free function that takes a
 pointer to `struct ifconf` and accesses `ifc->ifc_buf` directly.  We could
 add comments there explaining why it's necessary (which also avoids
 cluttering the main body of `get_interface_addresses_ioctl()`).

 I think refactoring my patch to do this in a separate function is a good
 solution.

 And then a separate ticket for evaluate-once, if it is even possible.

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


More information about the tor-bugs mailing list