Bug 1885 - umac.c contains strict aliasing violations
Summary: umac.c contains strict aliasing violations
Status: CLOSED WONTFIX
Alias: None
Product: Portable OpenSSH
Classification: Unclassified
Component: sshd (show other bugs)
Version: 5.8p1
Hardware: All All
: P2 normal
Assignee: Assigned to nobody
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-03-30 11:47 AEDT by raymes.khoury
Modified: 2011-09-06 15:33 AEST (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description raymes.khoury 2011-03-30 11:47:50 AEDT
In the function uhash_init, ahc->poly_key_8 points to a UINT64. This is passed to endian_convert as a void*. It is then cast to a UINT32* and the buffer is modified. This is a strict aliasing violation. It can (and did in our case) cause code to be mis-compiled when -fstrict-aliasing is used (which is true for -O2 in gcc). This introduced a runtime error in sshd. Refer to: http://code.google.com/p/chromium-os/issues/detail?id=13479
Comment 1 Damien Miller 2011-03-30 13:10:36 AEDT
configure.ac sets -fno-strict-aliasing for gcc-like compilers for exactly this reason.
Comment 2 Damien Miller 2011-09-06 15:33:09 AEST
close resolved bugs now that openssh-5.9 has been released