]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
kern/rescue_reader: Block the rescue mode until the CLI authentication
authorMaxim Suhanov <dfirblog@gmail.com>
Fri, 28 Feb 2025 14:00:53 +0000 (17:00 +0300)
committerDaniel Kiper <daniel.kiper@oracle.com>
Tue, 6 May 2025 15:13:00 +0000 (17:13 +0200)
This further mitigates potential misuse of the CLI after the
root device has been successfully unlocked via TPM.

Fixes: CVE-2025-4382
Signed-off-by: Maxim Suhanov <dfirblog@gmail.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/kern/rescue_reader.c

index 4259857ba9eea45446bc40ea13c3de4ab1b88ffd..a71ada8fb7da2eae6ee7135fe234fb1755ca78b0 100644 (file)
@@ -79,7 +79,7 @@ void __attribute__ ((noreturn))
 grub_rescue_run (void)
 {
   /* Stall if the CLI has been disabled */
-  if (grub_is_cli_disabled ())
+  if (grub_is_cli_disabled () || grub_is_cli_need_auth ())
     {
       grub_printf ("Rescue mode has been disabled...\n");