efi: Move the shim_lock verifier to the GRUB core

Move the shim_lock verifier from its own module into the core image. The
Secure Boot lockdown mechanism has the intent to prevent the load of any
unsigned code or binary when Secure Boot is enabled.

The reason is that GRUB must be able to prevent executing untrusted code
if UEFI Secure Boot is enabled, without depending on external modules.

Signed-off-by: Marco A Benatto <mbenatto@redhat.com>
Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
Marco A Benatto authored and Daniel Kiper committed 2021-03-02 15:54:15 +01:00
1 parent 9e95f45cee
commit 5e280caa65
6 files changed
+117 -143

No files matched your search

+4
View File
@@ -20,6 +20,7 @@
#include <grub/efi/efi.h>
#include <grub/efi/console.h>
#include <grub/efi/disk.h>
#include <grub/efi/sb.h>
#include <grub/term.h>
#include <grub/misc.h>
#include <grub/env.h>
@@ -39,6 +40,9 @@ grub_efi_init (void)
/* Initialize the memory management system. */
grub_efi_mm_init ();
/* Register the shim_lock verifier if UEFI Secure Boot is enabled. */
grub_shim_lock_verifier_setup ();
efi_call_4 (grub_efi_system_table->boot_services->set_watchdog_timer,
0, 0, 0, NULL);