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
This commit is contained in:
@@ -337,7 +337,7 @@ int crash_setup_memmap_entries(struct kimage *image, struct boot_params *params)
|
||||
struct crash_memmap_data cmd;
|
||||
struct crash_mem *cmem;
|
||||
|
||||
cmem = vzalloc(sizeof(struct crash_mem));
|
||||
cmem = vzalloc(struct_size(cmem, ranges, 1));
|
||||
if (!cmem)
|
||||
return -ENOMEM;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user