android_kernel_samsung_msm8976/arch/arm64
Ard Biesheuvel 32be75b125 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: a3fd82105b9d1 ("arm64/crypto: AES in CCM mode using ARMv8 Crypto ...")
Signed-off-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Ben Hutchings <ben@decadent.org.uk>
2019-07-27 22:11:20 +02:00
..
boot Import latest Samsung release 2017-04-18 03:43:52 +02:00
configs defconfig: Enable power efficient wq 2019-07-27 22:11:09 +02:00
crypto crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-07-27 22:11:20 +02:00
include arm64: Use get_signal() signal_setup_done() 2019-07-27 22:10:19 +02:00
kernel arm64: Use get_signal() signal_setup_done() 2019-07-27 22:10:19 +02:00
kvm arm64: KVM: Enable minimalistic support for Cortex-A53 2014-08-15 11:46:51 -07:00
lib arm64: strcmp: align to 64B cache line 2017-04-18 12:17:54 +02:00
mm arm64: move sp_el0 and tpidr_el1 into cpu_suspend_ctx. 2019-07-27 21:50:38 +02:00
xen arm: xen: implement multicall hypercall support. 2014-08-15 11:45:29 -07:00
Kconfig arm64: support keyctl() system call in 32-bit mode 2019-07-27 22:09:01 +02:00
Kconfig.debug arm64: Disable Samsung security restrictions by default 2017-04-18 04:44:48 +02:00
Makefile Import latest Samsung release 2017-04-18 03:43:52 +02:00