android_kernel_motorola_sm6375/arch
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Kees Cook 1d8c928ed7 x86/microcode/AMD: Track patch allocation size explicitly
[ Upstream commit 712f210a457d9c32414df246a72781550bc23ef6 ]

In preparation for reducing the use of ksize(), record the actual
allocation size for later memcpy(). This avoids copying extra
(uninitialized!) bytes into the patch buffer when the requested
allocation size isn't exactly the size of a kmalloc bucket.
Additionally, fix potential future issues where runtime bounds checking
will notice that the buffer was allocated to a smaller value than
returned by ksize().

Fixes: 757885e94a ("x86, microcode, amd: Early microcode patch loading support for AMD")
Suggested-by: Daniel Micay <danielmicay@gmail.com>
Signed-off-by: Kees Cook <keescook@chromium.org>
Signed-off-by: Borislav Petkov <bp@suse.de>
Link: https://lore.kernel.org/lkml/CA+DvKQ+bp7Y7gmaVhacjv9uF6Ar-o4tet872h4Q8RPYPJjcJQA@mail.gmail.com/
Signed-off-by: Sasha Levin <sashal@kernel.org>
2022-10-26 13:22:24 +02:00
..
alpha tty: the rest, stop using tty_schedule_flip() 2022-07-29 17:14:19 +02:00
arc ARC: entry: fix syscall_trace_exit argument 2022-04-27 13:50:49 +02:00
arm ARM: 9247/1: mm: set readonly for MT_MEMORY_RO with ARM_LPAE 2022-10-26 13:22:22 +02:00
arm64 arm64: dts: rockchip: Remove 'enable-active-low' from rk3399-puma 2022-09-28 11:04:05 +02:00
c6x
csky
h8300
hexagon
ia64 ia64, processor: fix -Wincompatible-pointer-types in ia64_get_irr() 2022-08-25 11:17:25 +02:00
m68k m68k: use fallback for random_get_entropy() instead of zero 2022-06-22 14:11:15 +02:00
microblaze
mips MIPS: Loongson32: Fix PHY-mode being left unspecified 2022-09-28 11:04:06 +02:00
nds32
nios2 nios2: add force_successful_syscall_return() 2022-08-25 11:18:28 +02:00
openrisc openrisc: start CPU timer early in boot 2022-06-14 18:11:28 +02:00
parisc parisc: Add runtime check to prevent PA2.0 kernels on PA1.x machines 2022-09-15 12:04:54 +02:00
powerpc powerpc/boot: Explicitly disable usage of SPE instructions 2022-10-26 13:22:16 +02:00
riscv riscv: Pass -mno-relax only on lld < 15.0.0 2022-10-26 13:22:15 +02:00
s390 s390: fix nospec table alignments 2022-09-15 12:04:52 +02:00
sh sh: machvec: Use char[] for section boundaries 2022-10-26 13:22:21 +02:00
sparc sparc: use fallback for random_get_entropy() instead of zero 2022-06-22 14:11:15 +02:00
um UM: cpuinfo: Fix a warning for CONFIG_CPUMASK_OFFSTACK 2022-10-26 13:22:16 +02:00
unicore32
x86 x86/microcode/AMD: Track patch allocation size explicitly 2022-10-26 13:22:24 +02:00
xtensa xtensa: Fix refcount leak bug in time.c 2022-06-29 08:58:48 +02:00
.gitignore
Kconfig locking/refcount: Consolidate implementations of refcount_t 2022-07-29 17:14:17 +02:00