linux-stable/arch/arm64
Eric Biggers 63efe31cf5 crypto: arm64/gcm-aes-ce - fix no-NEON fallback code
commit 580e295178 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-05-22 07:37:37 +02:00
..
boot arm64: dts: rockchip: Disable DCMDs on RK3399's eMMC controller. 2019-05-22 07:37:35 +02:00
configs arm64: defconfig: Enable TI's AM6 SoC platform 2018-08-29 11:51:26 -07:00
crypto crypto: arm64/gcm-aes-ce - fix no-NEON fallback code 2019-05-22 07:37:37 +02:00
include arm64: compat: Reduce address limit 2019-05-22 07:37:36 +02:00
kernel arm64: Clear OSDLR_EL1 on CPU boot 2019-05-22 07:37:36 +02:00
kvm KVM: arm64: Reset the PMU in preemptible context 2019-05-04 09:20:13 +02:00
lib arm64: lse: remove -fcall-used-x0 flag 2018-11-13 11:08:54 -08:00
mm arm64: Save and restore OSDLR_EL1 across suspend/resume 2019-05-22 07:37:36 +02:00
net bpf, arm64: save 4 bytes in prologue when ebpf insns came from cbpf 2018-05-14 19:11:45 -07:00
xen arm64: mm: Add additional parameter to uaccess_ttbr0_disable 2018-01-17 13:57:49 +01:00
Kconfig arm64: mm: always enable CONFIG_HOLES_IN_ZONE 2018-08-31 11:06:45 +01:00
Kconfig.debug Kconfig: consolidate the "Kernel hacking" menu 2018-08-02 08:06:48 +09:00
Kconfig.platforms ARM: SoC: late updates 2018-08-25 14:12:36 -07:00
Makefile arm64: relocatable: fix inconsistencies in linker script and options 2019-01-13 09:51:08 +01:00