[tor-bugs] #13538 [Tor]: Stop signed left shift overflows in curve25519-donna (non-64-bit)
Tor Bug Tracker & Wiki
blackhole at torproject.org
Wed Nov 19 10:00:03 UTC 2014
#13538: Stop signed left shift overflows in curve25519-donna (non-64-bit)
------------------------+---------------------------------------
Reporter: teor | Owner: teor
Type: defect | Status: assigned
Priority: normal | Milestone: Tor: 0.2.6.x-final
Component: Tor | Version: Tor: unspecified
Resolution: | Keywords: tor-router integer-safety
Actual Points: | Parent ID:
Points: |
------------------------+---------------------------------------
Comment (by teor):
I agree it looks ugly, but I can't imagine a less messy patch.
We could duplicate all the signed variables (needed for multiplication and
carry) as unsigned variables (needed for shifts), and somehow keep then in
sync. But that could be just as ugly.
Or we could access the array as unsigned, but that is just as undefined,
isn't it?
What C really needs is an unsigned-left-shift-cast-back-to-signed
operator... or something!
--
Ticket URL: <https://trac.torproject.org/projects/tor/ticket/13538#comment:10>
Tor Bug Tracker & Wiki <https://trac.torproject.org/>
The Tor Project: anonymity online
More information about the tor-bugs
mailing list