summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-03-11 19:17:12 +0100
committerSteve Sakoman <steve@sakoman.com>2025-03-15 06:40:08 -0700
commit678750a33b436349921c0561c73870cb43b226d4 (patch)
tree06de41eccf323e1b5708ccde117057a30c9b961e /meta/recipes-bsp
parentf475700be6666a3a6f450dfc536b2d8a325623ee (diff)
downloadpoky-678750a33b436349921c0561c73870cb43b226d4.tar.gz
grub: patch CVE-2024-45782 and CVE-2024-56737
Cherry-pick patch mentioning these CVEs. (From OE-Core rev: 61268080ba160a4965873ba5aad6ebbfd1ee2fe1) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-bsp')
-rw-r--r--meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch36
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 37 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 @@
1From 417547c10410b714e43f08f74137c24015f8f4c3 Mon Sep 17 00:00:00 2001
2From: B Horn <b@horn.uk>
3Date: Sun, 12 May 2024 02:48:33 +0100
4Subject: [PATCH] fs/hfs: Fix stack OOB write with grub_strcpy()
5
6Replaced with grub_strlcpy().
7
8Fixes: CVE-2024-45782
9Fixes: CVE-2024-56737
10Fixes: https://savannah.gnu.org/bugs/?66599
11
12Reported-by: B Horn <b@horn.uk>
13Signed-off-by: B Horn <b@horn.uk>
14Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
15
16CVE: CVE-2024-45782
17CVE: CVE-2024-56737
18Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=417547c10410b714e43f08f74137c24015f8f4c3]
19Signed-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
24diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c
25index 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)
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index bace594ac4..8146ead5db 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -21,6 +21,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
21 file://0001-RISC-V-Restore-the-typcast-to-long.patch \ 21 file://0001-RISC-V-Restore-the-typcast-to-long.patch \
22 file://0001-misc-Implement-grub_strlcpy.patch \ 22 file://0001-misc-Implement-grub_strlcpy.patch \
23 file://CVE-2024-45781.patch \ 23 file://CVE-2024-45781.patch \
24 file://CVE-2024-45782_CVE-2024-56737.patch \
24" 25"
25 26
26SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" 27SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"