summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-03-11 19:14:16 +0100
committerSteve Sakoman <steve@sakoman.com>2025-03-15 06:44:47 -0700
commit1867cc36c7f2901233db15fd4511edd23b56569c (patch)
tree5298c5d2a4f76cbec5380334705ecb0f86f566da
parent00b1c0f58a14c5c172f26e9e0ca1278c0220138a (diff)
downloadpoky-1867cc36c7f2901233db15fd4511edd23b56569c.tar.gz
grub: patch CVE-2024-45775
Cherry-pick patch mentioning this CVE. (From OE-Core rev: 0ae686de6aefb10d961cd8965dba8a02d1c977c6) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
-rw-r--r--meta/recipes-bsp/grub/files/CVE-2024-45775.patch38
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2024-45775.patch b/meta/recipes-bsp/grub/files/CVE-2024-45775.patch
new file mode 100644
index 0000000000..70492b8c2e
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/CVE-2024-45775.patch
@@ -0,0 +1,38 @@
1From 05be856a8c3aae41f5df90cab7796ab7ee34b872 Mon Sep 17 00:00:00 2001
2From: Lidong Chen <lidong.chen@oracle.com>
3Date: Fri, 22 Nov 2024 06:27:55 +0000
4Subject: [PATCH] commands/extcmd: Missing check for failed allocation
5
6The grub_extcmd_dispatcher() calls grub_arg_list_alloc() to allocate
7a grub_arg_list struct but it does not verify the allocation was successful.
8In case of failed allocation the NULL state pointer can be accessed in
9parse_option() through grub_arg_parse() which may lead to a security issue.
10
11Fixes: CVE-2024-45775
12
13Reported-by: Nils Langius <nils@langius.de>
14Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
15Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
16Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
17
18CVE: CVE-2024-45775
19Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=05be856a8c3aae41f5df90cab7796ab7ee34b872]
20Signed-off-by: Peter Marko <peter.marko@siemens.com>
21---
22 grub-core/commands/extcmd.c | 3 +++
23 1 file changed, 3 insertions(+)
24
25diff --git a/grub-core/commands/extcmd.c b/grub-core/commands/extcmd.c
26index 90a5ca24a..c236be13a 100644
27--- a/grub-core/commands/extcmd.c
28+++ b/grub-core/commands/extcmd.c
29@@ -49,6 +49,9 @@ grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
30 }
31
32 state = grub_arg_list_alloc (ext, argc, args);
33+ if (state == NULL)
34+ return grub_errno;
35+
36 if (grub_arg_parse (ext, argc, args, state, &new_args, &new_argc))
37 {
38 context.state = state;
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index ea6e19072e..b9b9d37637 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -25,6 +25,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
25 file://CVE-2024-45783.patch \ 25 file://CVE-2024-45783.patch \
26 file://CVE-2025-0624.patch \ 26 file://CVE-2025-0624.patch \
27 file://CVE-2024-45774.patch \ 27 file://CVE-2024-45774.patch \
28 file://CVE-2024-45775.patch \
28" 29"
29 30
30SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" 31SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"