android_kernel_samsung_msm8976/arch/arm64/crypto
Ard Biesheuvel 32be75b125 crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling
commit eaf46edf6ea89675bd36245369c8de5063a0272c upstream.

The NEON MAC calculation routine fails to handle the case correctly
where there is some data in the buffer, and the input fills it up
exactly. In this case, we enter the loop at the end with w8 == 0,
while a negative value is assumed, and so the loop carries on until
the increment of the 32-bit counter wraps around, which is quite
obviously wrong.

So omit the loop altogether in this case, and exit right away.

Reported-by: Eric Biggers <ebiggers@kernel.org>
Fixes: a3fd82105b9d1 ("arm64/crypto: AES in CCM mode using ARMv8 Crypto ...")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 22:11:20 +02:00
..
Kconfig crypto: crc32 - Add ARM64 CRC32 hw accelerated module 2017-04-18 12:17:31 +02:00
Makefile crypto: crc32 - Add ARM64 CRC32 hw accelerated module 2017-04-18 12:17:31 +02:00
aes-ce-ccm-core.S crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-07-27 22:11:20 +02:00
aes-ce-ccm-glue.c arm64/crypto: use crypto instructions to generate AES key schedule 2016-05-18 14:32:57 +05:30
aes-ce-cipher.c arm64/crypto: use crypto instructions to generate AES key schedule 2016-05-18 14:32:57 +05:30
aes-ce-setkey.h arm64/crypto: use crypto instructions to generate AES key schedule 2016-05-18 14:32:57 +05:30
aes-ce.S
aes-glue.c arm64/crypto: use crypto instructions to generate AES key schedule 2016-05-18 14:32:57 +05:30
aes-modes.S
aes-neon.S
crc32-arm64.c crypto: hash - annotate algorithms taking optional key 2019-07-27 21:49:17 +02:00
ghash-ce-core.S
ghash-ce-glue.c
sha1-ce-core.S
sha1-ce-glue.c
sha2-ce-core.S
sha2-ce-glue.c