Skip to content

Commit 11fac7a

Browse files
committed
Merge tag 'x86_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fix from Borislav Petkov: "Fix an out-of-bounds memory access when setting up a crash kernel with kexec" * tag 'x86_urgent_for_v5.12' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86/crash: Fix crash_setup_memmap_entries() out-of-bounds access
2 parents 2a1d794 + 5849cdf commit 11fac7a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

arch/x86/kernel/crash.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
337337
struct crash_memmap_data cmd;
338338
struct crash_mem *cmem;
339339

340-
cmem = vzalloc(sizeof(struct crash_mem));
340+
cmem = vzalloc(struct_size(cmem, ranges, 1));
341341
if (!cmem)
342342
return -ENOMEM;
343343

0 commit comments

Comments
 (0)