[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]
Re: [tor-bugs] #15436 [Tor]: Unaligned access in SipHash24 code
#15436: Unaligned access in SipHash24 code
-------------------------+--------------------------------
Reporter: pstumpf | Owner:
Type: defect | Status: needs_review
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version: Tor: 0.2.5.11
Resolution: | Keywords:
Actual Points: | Parent ID:
Points: |
-------------------------+--------------------------------
Changes (by yawning):
* status: new => needs_review
Comment:
Replying to [ticket:15436 pstumpf]:
> 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?
No, that's not the problem. The problem is `const uint64_t *in =
(uint64_t*)src;`. The compiler is allowed to (and in your case) does
assume that in is aligned properly.
Please let me know if this branch fixes this issue:
https://github.com/Yawning/tor/compare/bug15436
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/15436#comment:2>
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