mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 09:32:11 +02:00
Backport fixes for: * CVE-2024-45774 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2c34af908ebf4856051ed29e46d88abd2b20387f * CVE-2024-45775 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=05be856a8c3aae41f5df90cab7796ab7ee34b872 * CVE-2024-45776 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=09bd6eb58b0f71ec273916070fa1e2de16897a91 * CVE-2024-45777 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=b970a5ed967816bbca8225994cd0ee2557bad515 * CVE-2024-45778_CVE-2024-45779 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=26db6605036bd9e5b16d9068a8cc75be63b8b630 * CVE-2024-45780 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=0087bc6902182fe5cedce2d034c75a79cf6dd4f3 * CVE-2024-45781 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=c1a291b01f4f1dcd6a22b61f1c81a45a966d16ba * CVE-2024-45782_CVE-2024-56737 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=417547c10410b714e43f08f74137c24015f8f4c3 * CVE-2024-45783 - Upstream-Status: Backport from https://git.savannah.gnu.org/cgit/grub.git/commit/?id=f7c070a2e28dfab7137db0739fb8db1dc02d8898 (From OE-Core rev: 1bf2e89c932167b677051234d4e0cc4c52b0ee0c) Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
42 lines
1.5 KiB
Diff
42 lines
1.5 KiB
Diff
From 05be856a8c3aae41f5df90cab7796ab7ee34b872 Mon Sep 17 00:00:00 2001
|
|
From: Lidong Chen <lidong.chen@oracle.com>
|
|
Date: Fri, 22 Nov 2024 06:27:55 +0000
|
|
Subject: [PATCH] commands/extcmd: Missing check for failed allocation
|
|
|
|
The grub_extcmd_dispatcher() calls grub_arg_list_alloc() to allocate
|
|
a grub_arg_list struct but it does not verify the allocation was successful.
|
|
In case of failed allocation the NULL state pointer can be accessed in
|
|
parse_option() through grub_arg_parse() which may lead to a security issue.
|
|
|
|
Fixes: CVE-2024-45775
|
|
|
|
Reported-by: Nils Langius <nils@langius.de>
|
|
Signed-off-by: Lidong Chen <lidong.chen@oracle.com>
|
|
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
|
|
Reviewed-by: Alec Brown <alec.r.brown@oracle.com>
|
|
|
|
CVE: CVE-2024-45775
|
|
Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=05be856a8c3aae41f5df90cab7796ab7ee34b872]
|
|
Signed-off-by: Hitendra Prajapati <hprajapati@mvista.com>
|
|
---
|
|
grub-core/commands/extcmd.c | 3 +++
|
|
1 file changed, 3 insertions(+)
|
|
|
|
diff --git a/grub-core/commands/extcmd.c b/grub-core/commands/extcmd.c
|
|
index 90a5ca2..c236be1 100644
|
|
--- a/grub-core/commands/extcmd.c
|
|
+++ b/grub-core/commands/extcmd.c
|
|
@@ -49,6 +49,9 @@ grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
|
|
}
|
|
|
|
state = grub_arg_list_alloc (ext, argc, args);
|
|
+ if (state == NULL)
|
|
+ return grub_errno;
|
|
+
|
|
if (grub_arg_parse (ext, argc, args, state, &new_args, &new_argc))
|
|
{
|
|
context.state = state;
|
|
--
|
|
2.25.1
|
|
|