Skip to content

GitLab

  • Menu
Projects Groups Snippets
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • Trac Trac
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Issues 246
    • Issues 246
    • List
    • Boards
    • Service Desk
    • Milestones
  • Monitor
    • Monitor
    • Metrics
    • Incidents
  • Analytics
    • Analytics
    • Value stream
  • Wiki
    • Wiki
  • Activity
  • Create a new issue
  • Issue Boards
Collapse sidebar
  • Legacy
  • TracTrac
  • Issues
  • #24733

Closed (moved)
(moved)
Open
Created Dec 24, 2017 by teor@teor

Loading ifc.ifc_buf using the new tor_free() causes undefined behaviour on x86_64 macOS

On macOS x86+64, the new tor_free() from #24337 (moved) loads ifc.ifc_buf, which leads to undefined behaviour. ifc.ifc_buf is a char * which should be aligned to a multiple 8 bytes, but it is always aligned at 8-bytes (ifc on the stack) plus 4 bytes (ifc_len and pragma pack(4)).

This bug was caused by #24337 (moved), which has been merged to master (0.3.3.0-alpha-dev), and Apple's 32/64 bit kernel data structure compatibility code.

It was discovered using our unit tests and clang's address sanitizer.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking