]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
commands/minicmd: Block the dump command in lockdown mode
authorB Horn <b@horn.uk>
Thu, 18 Apr 2024 19:29:39 +0000 (20:29 +0100)
committerDaniel Kiper <daniel.kiper@oracle.com>
Thu, 13 Feb 2025 14:45:56 +0000 (15:45 +0100)
The dump enables a user to read memory which should not be possible
in lockdown mode.

Fixes: CVE-2025-1118
Reported-by: B Horn <b@horn.uk>
Reported-by: Jonathan Bar Or <jonathanbaror@gmail.com>
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
grub-core/commands/minicmd.c

index 28629086613b6378a1439ece89dd087679b75336..8c5ee3e6044c8575b517902413fac7d05dd1d36c 100644 (file)
@@ -203,8 +203,8 @@ GRUB_MOD_INIT(minicmd)
     grub_register_command ("help", grub_mini_cmd_help,
                           0, N_("Show this message."));
   cmd_dump =
-    grub_register_command ("dump", grub_mini_cmd_dump,
-                          N_("ADDR [SIZE]"), N_("Show memory contents."));
+    grub_register_command_lockdown ("dump", grub_mini_cmd_dump,
+                                   N_("ADDR [SIZE]"), N_("Show memory contents."));
   cmd_rmmod =
     grub_register_command ("rmmod", grub_mini_cmd_rmmod,
                           N_("MODULE"), N_("Remove a module."));