diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-03-11 19:17:17 +0100 |
|---|---|---|
| committer | Steve Sakoman <steve@sakoman.com> | 2025-03-15 06:40:08 -0700 |
| commit | 0dedd305c70397593e39e881cc62841f2abcbc2b (patch) | |
| tree | eb1fe527efc81b40ead178d25edbd29093d34019 | |
| parent | bfc2c48c838f5f072a0ea44a928cd93adf70e063 (diff) | |
| download | poky-0dedd305c70397593e39e881cc62841f2abcbc2b.tar.gz | |
grub: patch CVE-2024-45775
Cherry-pick patch mentioning this CVE.
(From OE-Core rev: 4e01993bf71d3b8e2375ab43857b671738953507)
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.patch | 38 | ||||
| -rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 1 |
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 @@ | |||
| 1 | From 05be856a8c3aae41f5df90cab7796ab7ee34b872 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Lidong Chen <lidong.chen@oracle.com> | ||
| 3 | Date: Fri, 22 Nov 2024 06:27:55 +0000 | ||
| 4 | Subject: [PATCH] commands/extcmd: Missing check for failed allocation | ||
| 5 | |||
| 6 | The grub_extcmd_dispatcher() calls grub_arg_list_alloc() to allocate | ||
| 7 | a grub_arg_list struct but it does not verify the allocation was successful. | ||
| 8 | In case of failed allocation the NULL state pointer can be accessed in | ||
| 9 | parse_option() through grub_arg_parse() which may lead to a security issue. | ||
| 10 | |||
| 11 | Fixes: CVE-2024-45775 | ||
| 12 | |||
| 13 | Reported-by: Nils Langius <nils@langius.de> | ||
| 14 | Signed-off-by: Lidong Chen <lidong.chen@oracle.com> | ||
| 15 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
| 16 | Reviewed-by: Alec Brown <alec.r.brown@oracle.com> | ||
| 17 | |||
| 18 | CVE: CVE-2024-45775 | ||
| 19 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=05be856a8c3aae41f5df90cab7796ab7ee34b872] | ||
| 20 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 21 | --- | ||
| 22 | grub-core/commands/extcmd.c | 3 +++ | ||
| 23 | 1 file changed, 3 insertions(+) | ||
| 24 | |||
| 25 | diff --git a/grub-core/commands/extcmd.c b/grub-core/commands/extcmd.c | ||
| 26 | index 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 4e13b0eb43..0378d5ee72 100644 --- a/meta/recipes-bsp/grub/grub2.inc +++ b/meta/recipes-bsp/grub/grub2.inc | |||
| @@ -26,6 +26,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \ | |||
| 26 | file://CVE-2024-45783.patch \ | 26 | file://CVE-2024-45783.patch \ |
| 27 | file://CVE-2025-0624.patch \ | 27 | file://CVE-2025-0624.patch \ |
| 28 | file://CVE-2024-45774.patch \ | 28 | file://CVE-2024-45774.patch \ |
| 29 | file://CVE-2024-45775.patch \ | ||
| 29 | " | 30 | " |
| 30 | 31 | ||
| 31 | SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" | 32 | SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" |
