linux/arch/arm64
Eric Biggers 580e295178 crypto: arm64/gcm-aes-ce - fix no-NEON fallback code
The arm64 gcm-aes-ce algorithm is failing the extra crypto self-tests
following my patches to test the !may_use_simd() code paths, which
previously were untested.  The problem is that in the !may_use_simd()
case, an odd number of AES blocks can be processed within each step of
the skcipher_walk.  However, the skcipher_walk is being done with a
"stride" of 2 blocks and is advanced by an even number of blocks after
each step.  This causes the encryption to produce the wrong ciphertext
and authentication tag, and causes the decryption to incorrectly fail.

Fix it by only processing an even number of blocks per step.

Fixes: c2b24c36e0 ("crypto: arm64/aes-gcm-ce - fix scatterwalk API violation")
Fixes: 71e52c278c ("crypto: arm64/aes-ce-gcm - operate on two input blocks at a time")
Cc: <stable@vger.kernel.org> # v4.19+
Signed-off-by: Eric Biggers <ebiggers@google.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2019-03-22 20:57:27 +08:00
..
boot This is the bulk of pin control changes for the v5.1 kernel cycle. 2019-03-11 11:12:50 -07:00
configs Allwinner arm64 defconfig changes for 5.1 2019-02-15 16:51:26 +01:00
crypto crypto: arm64/gcm-aes-ce - fix no-NEON fallback code 2019-03-22 20:57:27 +08:00
include Kbuild updates for v5.1 (2nd) 2019-03-17 13:25:26 -07:00
kernel treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
kvm ARM: some cleanups, direct physical timer assignment, cache sanitization 2019-03-15 15:00:28 -07:00
lib arm64: string: use asm EXPORT_SYMBOL() 2018-12-10 11:50:12 +00:00
mm treewide: add checks for the return value of memblock_alloc*() 2019-03-12 10:04:02 -07:00
net arm64: bpf: implement jitting of JMP32 2019-01-26 13:33:02 -08:00
xen
Kconfig DMA mapping updates for 5.1 2019-03-10 11:54:48 -07:00
Kconfig.debug
Kconfig.platforms arm64 updates for 5.1: 2019-03-10 10:17:23 -07:00
Makefile kasan, arm64: adjust shadow size for tag-based mode 2018-12-28 12:11:43 -08:00