diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files/CVE-2024-45775.patch')
| -rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2024-45775.patch | 41 |
1 files changed, 41 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..4328e4249f --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2024-45775.patch | |||
| @@ -0,0 +1,41 @@ | |||
| 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: Hitendra Prajapati <hprajapati@mvista.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 90a5ca2..c236be1 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; | ||
| 39 | -- | ||
| 40 | 2.25.1 | ||
| 41 | |||
