diff options
| author | Peter Marko <peter.marko@siemens.com> | 2025-03-11 19:09:58 +0100 |
|---|---|---|
| committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-03-13 11:00:36 +0000 |
| commit | 5b95c74b817f9aaf9266825b7098e7c036574a3d (patch) | |
| tree | 06c746ed6b1d49d35410a70d245952a28ecc6d21 /meta/recipes-bsp/grub/files | |
| parent | 570958575aa5f10f80e4457ee937fc2e85d50f29 (diff) | |
| download | poky-5b95c74b817f9aaf9266825b7098e7c036574a3d.tar.gz | |
grub: patch CVE-2024-45778 and CVE-2024-45779
Cherry-pick patch mentioning these CVEs.
(From OE-Core rev: 4e624e4737510f65a1dbbf31676eb6a4326aca72)
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>
Diffstat (limited to 'meta/recipes-bsp/grub/files')
| -rw-r--r-- | meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch b/meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch new file mode 100644 index 0000000000..eba013897f --- /dev/null +++ b/meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch | |||
| @@ -0,0 +1,55 @@ | |||
| 1 | From 26db6605036bd9e5b16d9068a8cc75be63b8b630 Mon Sep 17 00:00:00 2001 | ||
| 2 | From: Daniel Axtens <dja@axtens.net> | ||
| 3 | Date: Sat, 23 Mar 2024 15:59:43 +1100 | ||
| 4 | Subject: [PATCH] fs/bfs: Disable under lockdown | ||
| 5 | |||
| 6 | The BFS is not fuzz-clean. Don't allow it to be loaded under lockdown. | ||
| 7 | This will also disable the AFS. | ||
| 8 | |||
| 9 | Fixes: CVE-2024-45778 | ||
| 10 | Fixes: CVE-2024-45779 | ||
| 11 | |||
| 12 | Reported-by: Nils Langius <nils@langius.de> | ||
| 13 | Signed-off-by: Daniel Axtens <dja@axtens.net> | ||
| 14 | Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com> | ||
| 15 | |||
| 16 | CVE: CVE-2024-45778 | ||
| 17 | CVE: CVE-2024-45779 | ||
| 18 | Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=] | ||
| 19 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
| 20 | --- | ||
| 21 | grub-core/fs/bfs.c | 9 +++++++-- | ||
| 22 | 1 file changed, 7 insertions(+), 2 deletions(-) | ||
| 23 | |||
| 24 | diff --git a/grub-core/fs/bfs.c b/grub-core/fs/bfs.c | ||
| 25 | index 022f69fe2..78aeb051f 100644 | ||
| 26 | --- a/grub-core/fs/bfs.c | ||
| 27 | +++ b/grub-core/fs/bfs.c | ||
| 28 | @@ -30,6 +30,7 @@ | ||
| 29 | #include <grub/types.h> | ||
| 30 | #include <grub/i18n.h> | ||
| 31 | #include <grub/fshelp.h> | ||
| 32 | +#include <grub/lockdown.h> | ||
| 33 | |||
| 34 | GRUB_MOD_LICENSE ("GPLv3+"); | ||
| 35 | |||
| 36 | @@ -1106,7 +1107,10 @@ GRUB_MOD_INIT (bfs) | ||
| 37 | { | ||
| 38 | COMPILE_TIME_ASSERT (1 << LOG_EXTENT_SIZE == | ||
| 39 | sizeof (struct grub_bfs_extent)); | ||
| 40 | - grub_fs_register (&grub_bfs_fs); | ||
| 41 | + if (!grub_is_lockdown ()) | ||
| 42 | + { | ||
| 43 | + grub_fs_register (&grub_bfs_fs); | ||
| 44 | + } | ||
| 45 | } | ||
| 46 | |||
| 47 | #ifdef MODE_AFS | ||
| 48 | @@ -1115,5 +1119,6 @@ GRUB_MOD_FINI (afs) | ||
| 49 | GRUB_MOD_FINI (bfs) | ||
| 50 | #endif | ||
| 51 | { | ||
| 52 | - grub_fs_unregister (&grub_bfs_fs); | ||
| 53 | + if (!grub_is_lockdown ()) | ||
| 54 | + grub_fs_unregister (&grub_bfs_fs); | ||
| 55 | } | ||
