android_kernel_samsung_msm8976/arch
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
..
alpha kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2019-07-27 22:10:26 +02:00
arc
arm ARM: 8840/1: use a raw_spinlock_t in unwind 2019-07-27 22:10:04 +02:00
arm64 crypto: arm64/aes-ccm - fix logical bug in AAD MAC handling 2019-07-27 22:11:20 +02:00
avr32
blackfin
c6x
cris
frv
h8300
hexagon
ia64
m32r
m68k
metag
microblaze
mips
mn10300
openrisc
parisc Safer ABI for O_TMPFILE 2018-12-03 11:52:36 +01:00
powerpc
s390 treewide: Fix typo in Documentation/DocBook 2019-07-27 22:10:20 +02:00
score
sh
sparc kernel-wide: fix missing validations on __get/__put/__copy_to/__copy_from_user() 2019-07-27 22:10:26 +02:00
tile
um
unicore32 mm: per-thread vma caching 2019-07-27 22:08:06 +02:00
x86 x86/acpi: Prevent out of bound access caused by broken ACPI tables 2019-07-27 21:51:30 +02:00
xtensa
.gitignore
Kconfig