[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

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



#24733: Loading ifc.ifc_buf using the new tor_free() causes undefined behaviour on
x86_64 macOS
-------------------------------------------------+-------------------------
 Reporter:  teor                                 |          Owner:  teor
     Type:  defect                               |         Status:
                                                 |  merge_ready
 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                                   |
Parent ID:                                       |         Points:  0.1
 Reviewer:                                       |        Sponsor:
                                                 |  Sponsor8-can
-------------------------------------------------+-------------------------

Comment (by catalyst):

 Shouldn't the `#pragma pack(4)` cause the compiler to generate the correct
 unaligned access fixup instructions for any C code that access that
 member?  I would hope that clang's AddressSanitizer knows how to handle
 that exception.  Oh wait, I see we copy the unaligned address of the
 pointer member to a normal (non-packed) local pointer variable.  Yeah we
 should fix that.

 We could also bypass many of these issues by fixing #24484.

--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/24733#comment:4>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
_______________________________________________
tor-bugs mailing list
tor-bugs@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-bugs