summaryrefslogtreecommitdiffstats
path: root/meta/recipes-bsp/grub
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2025-03-11 19:14:13 +0100
committerSteve Sakoman <steve@sakoman.com>2025-03-15 06:44:47 -0700
commit63b8665d9c6a2e0fd6df9ed0be5636c518442700 (patch)
tree8c7533f77800c538676aa83f63c4b7523016ed5b /meta/recipes-bsp/grub
parent43dc093c92c7b3e84dd81283645c1aca330cb5ec (diff)
downloadpoky-63b8665d9c6a2e0fd6df9ed0be5636c518442700.tar.gz
grub: patch CVE-2024-45783
Cherry-pick patch mentioning this CVE. (From OE-Core rev: 7c18697372444ef9e4df03b7c9de7b8da7f4f600) Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Steve Sakoman <steve@sakoman.com>
Diffstat (limited to 'meta/recipes-bsp/grub')
-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 01d9be6bc2..05aea4cc6a 100644
--- a/meta/recipes-bsp/grub/grub2.inc
+++ b/meta/recipes-bsp/grub/grub2.inc
@@ -22,6 +22,7 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
22 file://CVE-2024-45781.patch \ 22 file://CVE-2024-45781.patch \
23 file://CVE-2024-45782_CVE-2024-56737.patch \ 23 file://CVE-2024-45782_CVE-2024-56737.patch \
24 file://CVE-2024-45780.patch \ 24 file://CVE-2024-45780.patch \
25 file://CVE-2024-45783.patch \
25" 26"
26 27
27SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" 28SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91"