crypto: arm64/aes-ccm - fix bugs in non-NEON fallback routine
authorArd Biesheuvel <ard.biesheuvel@linaro.org>
Thu, 24 Jan 2019 16:33:46 +0000 (17:33 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Mar 2019 19:09:56 +0000 (20:09 +0100)
commit41e2d1c43c87512e6209b3aa2429056d45179065
tree159892bd4945feeb7b071fa9cc9aca54298cb4de
parentd5a5bded80a6d1719ed88e452fa5a19103cb2c0e
crypto: arm64/aes-ccm - fix bugs in non-NEON fallback routine

commit 969e2f59d589c15f6aaf306e590dde16f12ea4b3 upstream.

Commit 5092fcf34908 ("crypto: arm64/aes-ce-ccm: add non-SIMD generic
fallback") introduced C fallback code to replace the NEON routines
when invoked from a context where the NEON is not available (i.e.,
from the context of a softirq taken while the NEON is already being
used in kernel process context)

Fix two logical flaws in the MAC calculation of the associated data.

Reported-by: Eric Biggers <ebiggers@kernel.org>
Fixes: 5092fcf34908 ("crypto: arm64/aes-ce-ccm: add non-SIMD generic fallback")
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>
arch/arm64/crypto/aes-ce-ccm-glue.c