kernel_optimize_test/arch/x86
Junaid Shahid 1ecdd37e30 crypto: aesni - Fix out-of-bounds access of the AAD buffer in generic-gcm-aesni
The aesni_gcm_enc/dec functions can access memory after the end of
the AAD buffer if the AAD length is not a multiple of 4 bytes.
It didn't matter with rfc4106-gcm-aesni as in that case the AAD was
always followed by the 8 byte IV, but that is no longer the case with
generic-gcm-aesni. This can potentially result in accessing a page that
is not mapped and thus causing the machine to crash. This patch fixes
that by reading the last <16 byte block of the AAD byte-by-byte and
optionally via an 8-byte load if the block was at least 8 bytes.

Fixes: 0487ccac ("crypto: aesni - make non-AVX AES-GCM work with any aadlen")
Cc: <stable@vger.kernel.org>
Signed-off-by: Junaid Shahid <junaids@google.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
2017-12-28 17:56:51 +11:00
..
boot x86/boot/KASLR: Remove unused variable 2017-11-23 20:17:59 +01:00
configs
crypto crypto: aesni - Fix out-of-bounds access of the AAD buffer in generic-gcm-aesni 2017-12-28 17:56:51 +11:00
entry Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
events Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-26 14:11:54 -08:00
hyperv
ia32
include KVM fixes for v4.15-rc3 2017-12-10 08:24:16 -08:00
kernel Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
kvm KVM: x86: fix APIC page invalidation 2017-12-06 16:10:34 +01:00
lib x86/decoder: Add new TEST instruction pattern 2017-11-24 08:36:12 +01:00
math-emu
mm kmemcheck: rip it out for real 2017-12-08 13:40:17 -08:00
net
oprofile
pci Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
platform Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
power x86/power: Fix some ordering bugs in __restore_processor_context() 2017-12-06 12:29:12 +01:00
purgatory
ras
realmode
tools
um
video
xen Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-12-06 17:47:29 -08:00
.gitignore
Kbuild
Kconfig Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip 2017-11-26 14:11:54 -08:00
Kconfig.cpu
Kconfig.debug
Makefile
Makefile_32.cpu
Makefile.um