summaryrefslogtreecommitdiff
path: root/arch/arm64/lib
diff options
context:
space:
mode:
authorArd Biesheuvel <ard.biesheuvel@linaro.org>2019-01-24 17:33:45 +0100
committerHerbert Xu <herbert@gondor.apana.org.au>2019-02-01 14:42:05 +0800
commiteaf46edf6ea89675bd36245369c8de5063a0272c (patch)
tree12bc637a2514584624fb27710746c10205834f4e /arch/arm64/lib
parenteb5e6730db98fcc4b51148b4a819fa4bf864ae54 (diff)
crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling
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 ...") Cc: stable@vger.kernel.org Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/arm64/lib')
0 files changed, 0 insertions, 0 deletions