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
  • #15436

Closed (moved)
(moved)
Open
Created Mar 22, 2015 by Trac@tracbot

Unaligned access in SipHash24 code

Tor segfaults on OpenBSD/sparc64 on startup. GDB backtrace:

#0 siphash24 (src=0xfffffffffffcdc34, src_sz=20, key=Variable "key" is not avai lable. ) at src/ext/csiphash.c:118 118 memcpy(&mi, in, 8); (gdb) bt #0 siphash24 (src=0xfffffffffffcdc34, src_sz=20, key=Variable "key" is not avai lable. ) at src/ext/csiphash.c:118 #1 0x00000026f1b853c8 in node_get_mutable_by_id (identity_digest=Variable "iden tity_digest" is not available. )

As you can easily see, node_get_mutable_by_id passes an unaligned pointer to siphash24, which memcpy then tries to copy from. This is a (struct node_t)->identity, so maybe that struct should have alignment padding?

Trac:
Username: pstumpf

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