grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[SECURITY PATCH 010/117] commands/setpci: Restrict setpci command when l


From: Daniel Kiper
Subject: [SECURITY PATCH 010/117] commands/setpci: Restrict setpci command when locked down
Date: Tue, 2 Mar 2021 19:00:17 +0100

From: Javier Martinez Canillas <javierm@redhat.com>

This command can set PCI devices register values, which makes it dangerous
in a locked down configuration. Restrict it so can't be used on this setup.

Signed-off-by: Javier Martinez Canillas <javierm@redhat.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
 grub-core/commands/setpci.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/grub-core/commands/setpci.c b/grub-core/commands/setpci.c
index e966af080..8a0c91f02 100644
--- a/grub-core/commands/setpci.c
+++ b/grub-core/commands/setpci.c
@@ -328,10 +328,10 @@ static grub_extcmd_t cmd;
 
 GRUB_MOD_INIT(setpci)
 {
-  cmd = grub_register_extcmd ("setpci", grub_cmd_setpci, 0,
-                             N_("[-s POSITION] [-d DEVICE] [-v VAR] "
-                                "REGISTER[=VALUE[:MASK]]"),
-                             N_("Manipulate PCI devices."), options);
+  cmd = grub_register_extcmd_lockdown ("setpci", grub_cmd_setpci, 0,
+                                      N_("[-s POSITION] [-d DEVICE] [-v VAR] "
+                                         "REGISTER[=VALUE[:MASK]]"),
+                                      N_("Manipulate PCI devices."), options);
 }
 
 GRUB_MOD_FINI(setpci)
-- 
2.11.0




reply via email to

[Prev in Thread] Current Thread [Next in Thread]