]> git.ipfire.org Git - thirdparty/hostap.git/commit
UBSan: Avoid dependency on undefined behavior in internal AES operation
authorJouni Malinen <jouni@codeaurora.org>
Fri, 24 May 2019 22:51:12 +0000 (01:51 +0300)
committerJouni Malinen <j@w1.fi>
Fri, 24 May 2019 22:51:12 +0000 (01:51 +0300)
commit312ec34e40fcb580fed1536ccb31a81dd5dc7eb6
treee13c56d0578e26fea1d5cce14747db6ba8434f38
parent27486bc5aba2c4a135dd1768b68c077c2cedc63c
UBSan: Avoid dependency on undefined behavior in internal AES operation

The rcons[] and Td4s[] array values need to be type cast explicitly to
u32 for the left shift 24 operation to be defined due to the implicit
conversion to int not handling the case where MSB would become 1 without
depending on UB.

Credit to OSS-Fuzz: https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=14929
Signed-off-by: Jouni Malinen <jouni@codeaurora.org>
src/crypto/aes_i.h