diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch')
-rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch b/meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch new file mode 100644 index 0000000000..be01da3355 --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch | |||
@@ -0,0 +1,41 @@ | |||
1 | From 9c16197734ada8d0838407eebe081117799bfe67 Mon Sep 17 00:00:00 2001 | ||
2 | From: B Horn <b@horn.uk> | ||
3 | Date: Fri, 1 Nov 2024 23:46:55 +0000 | ||
4 | Subject: [PATCH 2/3] normal: Remove variables hooks on module unload | ||
5 | |||
6 | The normal module does not entirely cleanup after itself in | ||
7 | its GRUB_MOD_FINI() leaving a few variables hooks in place. | ||
8 | It is not possible to unload normal module now but fix the | ||
9 | issues for completeness. | ||
10 | |||
11 | On the occasion replace 0s with NULLs for "pager" variable | ||
12 | hooks unregister. | ||
13 | |||
14 | Fixes: CVE-2025-0622 | ||
15 | |||
16 | Reported-by: B Horn <b@horn.uk> | ||
17 | Signed-off-by: B Horn <b@horn.uk> | ||
18 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
19 | |||
20 | CVE: CVE-2025-0622 | ||
21 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=9c16197734ada8d0838407eebe081117799bfe67] | ||
22 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
23 | --- | ||
24 | grub-core/normal/main.c | 4 +++- | ||
25 | 1 file changed, 3 insertions(+), 1 deletion(-) | ||
26 | |||
27 | diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c | ||
28 | index 838f57fa5..04d058f55 100644 | ||
29 | --- a/grub-core/normal/main.c | ||
30 | +++ b/grub-core/normal/main.c | ||
31 | @@ -582,7 +582,9 @@ GRUB_MOD_FINI(normal) | ||
32 | grub_xputs = grub_xputs_saved; | ||
33 | |||
34 | grub_set_history (0); | ||
35 | - grub_register_variable_hook ("pager", 0, 0); | ||
36 | + grub_register_variable_hook ("pager", NULL, NULL); | ||
37 | + grub_register_variable_hook ("color_normal", NULL, NULL); | ||
38 | + grub_register_variable_hook ("color_highlight", NULL, NULL); | ||
39 | grub_fs_autoload_hook = 0; | ||
40 | grub_unregister_command (cmd_clear); | ||
41 | } | ||