android_kernel_oneplus_msm8998/arch/arm64/crypto
Ard Biesheuvel a2ef87f9d2 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: a3fd82105b ("arm64/crypto: AES in CCM mode using ARMv8 Crypto ...")
Cc: stable@vger.kernel.org
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 08:44:34 +01:00
..
aes-ce-ccm-core.S crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-03-23 08:44:34 +01:00
aes-ce-ccm-glue.c crypto: aead - Remove CRYPTO_ALG_AEAD_NEW flag 2015-08-17 16:53:53 +08:00
aes-ce-cipher.c crypto: arm64/aes-ce - fix for big endian 2017-01-12 11:22:50 +01:00
aes-ce-setkey.h arm64/crypto: use crypto instructions to generate AES key schedule 2014-11-06 17:25:28 +00:00
aes-ce.S crypto: arm64/aes-xts-ce: fix for big endian 2017-01-12 11:22:50 +01:00
aes-glue.c crypto: arm64/aes-ctr - fix NULL dereference in tail processing 2016-09-30 10:18:34 +02:00
aes-modes.S crypto: arm64/aes-blk - honour iv_out requirement in CBC and CTR modes 2017-02-09 08:02:45 +01:00
aes-neon.S crypto: arm64/aes-neon - fix for big endian 2017-01-12 11:22:50 +01:00
crc32-arm64.c crypto: arm64/crc32 - bring in line with generic CRC32 2015-05-07 11:16:24 +08:00
ghash-ce-core.S crypto: arm64/ghash-ce - fix for big endian 2017-01-12 11:22:50 +01:00
ghash-ce-glue.c
Kconfig Merge git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2014-12-13 13:33:26 -08:00
Makefile arm64: crypto: increase AES interleave to 4x 2015-02-26 18:31:46 +00:00
sha1-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00
sha1-ce-glue.c crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00
sha2-ce-core.S crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00
sha2-ce-glue.c crypto: arm64/sha - avoid non-standard inline asm tricks 2018-11-27 16:07:58 +01:00