diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-03-11 19:09:49 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-13 11:00:35 +0000 |
| commit | 15ddd0137d2603671ea4f1d1a0b3b24700552eac (patch) | |
| tree | 94cc69ef133d8ac4723d33870f3db8d5c860491e | |
| parent | e8a7b959b5492dd9fc3da3b5d9ac0cc8a9be3940 (diff) | |
| download | poky-15ddd0137d2603671ea4f1d1a0b3b24700552eac.tar.gz | |
grub: patch CVE-2024-45783
Cherry-pick patch mentioning this CVE.
(From OE-Core rev: 662d705f0f947eef2eab5f72764d421698ca0588)
Signed-off-by: Peter Marko <peter.marko@siemens.com>
Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
| -rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2024-45783.patch | 39 | ||||
| -rw-r--r-- | meta/recipes-bsp/grub/grub2.inc | 1 |
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 @@ | |||
| 1 | From f7c070a2e28dfab7137db0739fb8db1dc02d8898 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: B Horn <b@horn.uk> | ||
| 3 | Date: Sun, 12 May 2024 06:22:51 +0100 | ||
| 4 | Subject: [PATCH] fs/hfsplus: Set a grub_errno if mount fails | ||
| 5 | |||
| 6 | It was possible for mount to fail but not set grub_errno. This led to | ||
| 7 | a possible double decrement of the module reference count if the NULL | ||
| 8 | page was mapped. | ||
| 9 | |||
| 10 | Fixing in general as a similar bug was fixed in commit 61b13c187 | ||
| 11 | (fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there | ||
| 12 | are likely more variants around. | ||
| 13 | |||
| 14 | Fixes: CVE-2024-45783 | ||
| 15 | |||
| 16 | Reported-by: B Horn <b@horn.uk> | ||
| 17 | Signed-off-by: B Horn <b@horn.uk> | ||
| 18 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
| 19 | |||
| 20 | CVE: CVE-2024-45783 | ||
| 21 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=f7c070a2e28dfab7137db0739fb8db1dc02d8898] | ||
| 22 | Signed-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 | |||
| 27 | diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c | ||
| 28 | index 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 84b28c7b9f..8b638c58c0 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 | ||
| 27 | SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" | 28 | SRC_URI[sha256sum] = "b30919fa5be280417c17ac561bb1650f60cfb80cc6237fa1e2b6f56154cb9c91" |
