Skip to content

Commit 0c534d3

Browse files
committed
efi: fix panic in kdump kernel
jira LE-1907 cve CVE-2024-35800 Rebuild_History Non-Buildable kernel-5.14.0-427.31.1.el9_4 commit-author Oleksandr Tymoshenko <ovt@google.com> commit 62b71cd Check if get_next_variable() is actually valid pointer before calling it. In kdump kernel this method is set to NULL that causes panic during the kexec-ed kernel boot. Tested with QEMU and OVMF firmware. Fixes: bad267f ("efi: verify that variable services are supported") Signed-off-by: Oleksandr Tymoshenko <ovt@google.com> Signed-off-by: Ard Biesheuvel <ardb@kernel.org> (cherry picked from commit 62b71cd) Signed-off-by: Jonathan Maple <jmaple@ciq.com>
1 parent da3124e commit 0c534d3

File tree

1 file changed

+2
-0
lines changed
  • drivers/firmware/efi

1 file changed

+2
-0
lines changed

drivers/firmware/efi/efi.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -200,6 +200,8 @@ static bool generic_ops_supported(void)
200200

201201
name_size = sizeof(name);
202202

203+
if (!efi.get_next_variable)
204+
return false;
203205
status = efi.get_next_variable(&name_size, &name, &guid);
204206
if (status == EFI_UNSUPPORTED)
205207
return false;

0 commit comments

Comments
 (0)