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)
committerFelix Zielcke <fzielcke@z-51.de>
Thu, 3 Jul 2025 16:35:51 +0000 (18:35 +0200)
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>
Gbp-Pq: Topic cve-2025-jan
Gbp-Pq: Name commands-minicmd-Block-the-dump-command-in-lockdown-mode.patch

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."));