Skip to content

Commit 56bea42

Browse files
committed
Merge tag 'efi-fixes-for-v7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi
Pull EFI fix from Ard Biesheuvel: "Fix a potential buffer overrun issue introduced by the previous fix for EFI boot services region reservations on x86" * tag 'efi-fixes-for-v7.0-3' of git://git.kernel.org/pub/scm/linux/kernel/git/efi/efi: x86/efi: efi_unmap_boot_services: fix calculation of ranges_to_free size
2 parents a361474 + 217c0a5 commit 56bea42

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

arch/x86/platform/efi/quirks.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ void __init efi_unmap_boot_services(void)
424424
if (efi_enabled(EFI_DBG))
425425
return;
426426

427-
sz = sizeof(*ranges_to_free) * efi.memmap.nr_map + 1;
427+
sz = sizeof(*ranges_to_free) * (efi.memmap.nr_map + 1);
428428
ranges_to_free = kzalloc(sz, GFP_KERNEL);
429429
if (!ranges_to_free) {
430430
pr_err("Failed to allocate storage for freeable EFI regions\n");

0 commit comments

Comments
 (0)