diff options
Diffstat (limited to 'meta/recipes-bsp/grub/files')
-rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch b/meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch new file mode 100644 index 0000000000..41cc025b81 --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From 417547c10410b714e43f08f74137c24015f8f4c3 Mon Sep 17 00:00:00 2001 | ||
2 | From: B Horn <b@horn.uk> | ||
3 | Date: Sun, 12 May 2024 02:48:33 +0100 | ||
4 | Subject: [PATCH] fs/hfs: Fix stack OOB write with grub_strcpy() | ||
5 | |||
6 | Replaced with grub_strlcpy(). | ||
7 | |||
8 | Fixes: CVE-2024-45782 | ||
9 | Fixes: CVE-2024-56737 | ||
10 | Fixes: https://savannah.gnu.org/bugs/?66599 | ||
11 | |||
12 | Reported-by: B Horn <b@horn.uk> | ||
13 | Signed-off-by: B Horn <b@horn.uk> | ||
14 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
15 | |||
16 | CVE: CVE-2024-45782 | ||
17 | CVE: CVE-2024-56737 | ||
18 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=417547c10410b714e43f08f74137c24015f8f4c3] | ||
19 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
20 | --- | ||
21 | grub-core/fs/hfs.c | 2 +- | ||
22 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
23 | |||
24 | diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c | ||
25 | index 91dc0e69c..920112b03 100644 | ||
26 | --- a/grub-core/fs/hfs.c | ||
27 | +++ b/grub-core/fs/hfs.c | ||
28 | @@ -379,7 +379,7 @@ grub_hfs_mount (grub_disk_t disk) | ||
29 | volume name. */ | ||
30 | key.parent_dir = grub_cpu_to_be32_compile_time (1); | ||
31 | key.strlen = data->sblock.volname[0]; | ||
32 | - grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1)); | ||
33 | + grub_strlcpy ((char *) key.str, (char *) (data->sblock.volname + 1), sizeof (key.str)); | ||
34 | |||
35 | if (grub_hfs_find_node (data, (char *) &key, data->cat_root, | ||
36 | 0, (char *) &dir, sizeof (dir)) == 0) | ||