linux-stable/arch
Ard Biesheuvel 9a0eec8d4d crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling
commit eaf46edf6e 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: a3fd82105b ("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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-03-23 13:19:45 +01:00
..
alpha alpha: Fix Eiger NR_IRQS to 128 2019-02-20 10:18:32 +01:00
arc ARC: uacces: remove lp_start, lp_end from clobber list 2019-03-23 13:19:44 +01:00
arm ARM: 8824/1: fix a migrating irq bug when hotplug cpu 2019-03-23 13:19:42 +01:00
arm64 crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-03-23 13:19:45 +01:00
avr32
blackfin
c6x
cris
frv
h8300
hexagon hexagon: modify ffs() and fls() to return int 2018-10-10 08:53:21 +02:00
ia64 kbuild: Consolidate header generation from ASM offset information 2018-11-23 08:20:34 +01:00
m32r
m68k m68k: fix "bad page state" oops on ColdFire boot 2018-08-24 13:12:34 +02:00
metag
microblaze
mips MIPS: Remove function size check in get_frame_info() 2019-03-13 14:05:01 -07:00
mn10300
nios2
openrisc kthread: fix boot hang (regression) on MIPS/OpenRISC 2018-09-19 22:47:11 +02:00
parisc parisc: Fix ptrace syscall number modification 2019-02-27 10:07:01 +01:00
powerpc powerpc: Always initialize input array when calling epapr_hypercall() 2019-03-05 17:57:06 +01:00
s390 s390/smp: Fix calling smp_call_ipl_cpu() from ipl CPU 2019-01-31 08:12:36 +01:00
score
sh
sparc sparc64: Make proc_id signed. 2018-11-13 11:16:47 -08:00
tile
um um: Avoid marking pages with "changed protection" 2019-02-12 19:44:58 +01:00
unicore32
x86 perf/x86: Fixup typo in stub functions 2019-03-19 13:14:11 +01:00
xtensa xtensa: SMP: limit number of possible CPUs by NR_CPUS 2019-03-13 14:04:56 -07:00
.gitignore
Kconfig