summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-03-11 19:17:14 +0100
committerSteve Sakoman <steve@sakoman.com>2025-03-15 06:40:08 -0700
commitfa7c2c327b93f05ebd99ac1ac1c38a04d6bcfd71 (patch)
tree7a18be736694a699fb5ee036da991490072550a3 /meta/recipes-bsp
parent7ca876a09a5fba043ab9d75b4d432f62d0bf2efe (diff)
downloadpoky-fa7c2c327b93f05ebd99ac1ac1c38a04d6bcfd71.tar.gz
grub: patch CVE-2024-45783
Cherry-pick patch mentioning this CVE. (From OE-Core rev: 70a15bc790025e3241274d3e92674928c41537b6) 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-45783.patch39
-rw-r--r--meta/recipes-bsp/grub/grub2.inc1
2 files changed, 40 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2024-45783.patch b/meta/recipes-bsp/grub/files/CVE-2024-45783.patch
new file mode 100644
index 0000000000..99c769961b
--- /dev/null
+++ b/meta/recipes-bsp/grub/files/CVE-2024-45783.patch
@@ -0,0 +1,39 @@
1From f7c070a2e28dfab7137db0739fb8db1dc02d8898 Mon Sep 17 00:00:00 2001
2From: B Horn <b@horn.uk>
3Date: Sun, 12 May 2024 06:22:51 +0100
4Subject: [PATCH] fs/hfsplus: Set a grub_errno if mount fails
5
6It was possible for mount to fail but not set grub_errno. This led to
7a possible double decrement of the module reference count if the NULL
8page was mapped.
9
10Fixing in general as a similar bug was fixed in commit 61b13c187
11(fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there
12are likely more variants around.
13
14Fixes: CVE-2024-45783
15
16Reported-by: B Horn <b@horn.uk>
17Signed-off-by: B Horn <b@horn.uk>
18Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
19
20CVE: CVE-2024-45783
21Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=f7c070a2e28dfab7137db0739fb8db1dc02d8898]
22Signed-off-by: Peter Marko <peter.marko@siemens.com>
23---
24 grub-core/fs/hfsplus.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
28index 295822f69..de71fd486 100644
29--- a/grub-core/fs/hfsplus.c
30+++ b/grub-core/fs/hfsplus.c
31@@ -405,7 +405,7 @@ grub_hfsplus_mount (grub_disk_t disk)
32
33 fail:
34
35- if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
36+ if (grub_errno == GRUB_ERR_OUT_OF_RANGE || grub_errno == GRUB_ERR_NONE)
37 grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
38
39 grub_free (data);
diff --git a/meta/recipes-bsp/grub/grub2.inc b/meta/recipes-bsp/grub/grub2.inc
index 6fa096c57b..604c2fe568 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -23,6 +23,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
23 file://CVE-2024-45781.patch \ 23 file://CVE-2024-45781.patch \
24 file://CVE-2024-45782_CVE-2024-56737.patch \ 24 file://CVE-2024-45782_CVE-2024-56737.patch \
25 file://CVE-2024-45780.patch \ 25 file://CVE-2024-45780.patch \
26 file://CVE-2024-45783.patch \
26" 27"
27 28
28SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" 29SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"