File 0002-net-net-Unregister-net_set_vlan-command-on-unload.patch of Package grub2
From c9af7dfdd068beb1f47b1837bcc143118a87fbb1 Mon Sep 17 00:00:00 2001 From: Thomas Frauendorfer | Miray Software <tf@miray.de> Date: Fri, 9 May 2025 14:20:47 +0200 Subject: [PATCH 2/7] net/net: Unregister net_set_vlan command on unload The commit 954c48b9c (net/net: Add net_set_vlan command) added command net_set_vlan to the net module. Unfortunately the commit only added the grub_register_command() call on module load but missed the grub_unregister_command() on unload. Let's fix this. Fixes: CVE-2025-54770 Fixes: 954c48b9c (net/net: Add net_set_vlan command) Reported-by: Thomas Frauendorfer | Miray Software <tf@miray.de> Signed-off-by: Thomas Frauendorfer | Miray Software <tf@miray.de> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> --- grub-core/net/net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/grub-core/net/net.c b/grub-core/net/net.c index df13c3aaa..7bd8f1bf7 100644 --- a/grub-core/net/net.c +++ b/grub-core/net/net.c @@ -2151,6 +2151,7 @@ GRUB_MOD_FINI(net) grub_unregister_command (cmd_deladdr); grub_unregister_command (cmd_addroute); grub_unregister_command (cmd_delroute); + grub_unregister_command (cmd_setvlan); grub_unregister_command (cmd_lsroutes); grub_unregister_command (cmd_lscards); grub_unregister_command (cmd_lsaddr); -- 2.51.1