grub2/backport-0028-net-Unregister-net_default_ip-and-net_default_mac-va.patch
Qiumiao Zhang 74f9c62794 fix the vulnerabilities announced on February 18th, 2025
Signed-off-by: Qiumiao Zhang <zhangqiumiao1@huawei.com>
(cherry picked from commit c141a13130da5dca205b607533751a6ba6c9581e)
2025-02-25 16:47:19 +08:00

33 lines
1.0 KiB
Diff

From d271e744753f8aa863153a822ce673055be68b03 Mon Sep 17 00:00:00 2001
From: B Horn <b@horn.uk>
Date: Thu, 28 Nov 2024 04:05:04 +0000
Subject: [PATCH 28/73] net: Unregister net_default_ip and net_default_mac variables
hooks on unload
The net module is a dependency of normal. So, it shouldn't be possible
to unload the net. Though unregister variables hooks as a precaution.
It also gets in line with unregistering the other net module hooks.
Signed-off-by: B Horn <b@horn.uk>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
---
grub-core/net/net.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/grub-core/net/net.c b/grub-core/net/net.c
index 58d0488..6f02cea 100644
--- a/grub-core/net/net.c
+++ b/grub-core/net/net.c
@@ -2143,6 +2143,8 @@ GRUB_MOD_FINI(net)
grub_register_variable_hook ("net_default_server", 0, 0);
grub_register_variable_hook ("pxe_default_server", 0, 0);
+ grub_register_variable_hook ("net_default_ip", 0, 0);
+ grub_register_variable_hook ("net_default_mac", 0, 0);
grub_bootp_fini ();
grub_dns_fini ();
--
2.33.0