Skip to contentSkip to conversation

grub: upgrade 2.12 -> 2.14

PATCH New Yi Zhao 1 participant 2 messages Mar 3

lore
Share & tools
lore

Yi Zhao

author
#0 lore raw

PATCH v2 1/2 grub: upgrade 2.12 -> 2.14

ChangeLog:
* libgcrypt 1.11.
* LVM LV integrity and cachevol support.
* EROFS support.
* GRUB environment block inside the Btrfs header support.
* NX support for EFI platforms.
* shim loader protocol support.
* BLS and UKI support.
* Argon2 KDF support.
* TPM2 key protector support.
* Appended Signature Secure Boot Support for PowerPC.
* New option to block command line interface.
* Support dates outside of 1901..2038 range.
* zstdio decompression support.
* EFI code improvements and fixes.
* TPM driver fixes.
* Filesystems fixes.
* CVE and Coverity fixes.
* Tests improvements.
* Documentation improvements.

Drop backport patches.
Refresh local patches.
Split grub-bash-completion package by inheriting bash-completion.

---
 ...1-RISC-V-Restore-the-typcast-to-long.patch |  37 --
 ....sh-exclude-.pc-from-po-POTFILES.in.patch} |   5 +-
 .../0001-misc-Implement-grub_strlcpy.patch    |  68 ----
 ...citly-keeps-symbole-.module_license.patch} |  11 +-
 ....d-10_linux.in-add-oe-s-kernel-name.patch} |  11 +-
 .../grub/files/CVE-2024-45774.patch           |  37 --
 .../grub/files/CVE-2024-45775.patch           |  38 --
 .../grub/files/CVE-2024-45776.patch           |  39 --
 .../grub/files/CVE-2024-45777.patch           |  57 ---
 .../files/CVE-2024-45778_CVE-2024-45779.patch |  55 ---
 .../grub/files/CVE-2024-45780.patch           |  93 -----
 .../grub/files/CVE-2024-45781.patch           |  35 --
 .../files/CVE-2024-45782_CVE-2024-56737.patch |  36 --
 .../grub/files/CVE-2024-45783.patch           |  39 --
 .../grub/files/CVE-2024-56738.patch           |  75 ----
 .../grub/files/CVE-2025-0622-01.patch         |  35 --
 .../grub/files/CVE-2025-0622-02.patch         |  41 --
 .../grub/files/CVE-2025-0622-03.patch         |  38 --
 .../grub/files/CVE-2025-0624.patch            |  84 ----
 ...025-0685_CVE-2025-0686_CVE-2025-0689.patch | 377 ------------------
 .../files/CVE-2025-0678_CVE-2025-1125.patch   |  87 ----
 .../grub/files/CVE-2025-0690.patch            |  73 ----
 .../grub/files/CVE-2025-1118.patch            |  37 --
 .../grub/files/CVE-2025-54770.patch           |  41 --
 .../grub/files/CVE-2025-61661.patch           |  40 --
 .../grub/files/CVE-2025-61662.patch           |  72 ----
 .../grub/files/CVE-2025-61663_61664.patch     |  64 ---
 .../{grub-efi_2.12.bb => grub-efi_2.14.bb}    |   0
 meta/recipes-bsp/grub/grub2.inc               |  45 +--
 .../grub/{grub_2.12.bb => grub_2.14.bb}       |   0
 30 files changed, 18 insertions(+), 1652 deletions(-)
 delete mode 100644 meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch
 rename meta/recipes-bsp/grub/files/{autogen.sh-exclude-pc.patch => 0001-autogen.sh-exclude-.pc-from-po-POTFILES.in.patch} (94%)
 delete mode 100644 meta/recipes-bsp/grub/files/0001-misc-Implement-grub_strlcpy.patch
 rename meta/recipes-bsp/grub/files/{grub-module-explicitly-keeps-symbole-.module_license.patch => 0002-grub-module-explicitly-keeps-symbole-.module_license.patch} (89%)
 rename meta/recipes-bsp/grub/files/{0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch => 0003-grub.d-10_linux.in-add-oe-s-kernel-name.patch} (93%)
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45774.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45775.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45776.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45777.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45780.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45781.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-45783.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2024-56738.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0622-01.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0622-03.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0624.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0677_CVE-2025-0684_CVE-2025-0685_CVE-2025-0686_CVE-2025-0689.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0678_CVE-2025-1125.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-0690.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-1118.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-54770.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-61661.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-61662.patch
 delete mode 100644 meta/recipes-bsp/grub/files/CVE-2025-61663_61664.patch
 rename meta/recipes-bsp/grub/{grub-efi_2.12.bb => grub-efi_2.14.bb} (100%)
 rename meta/recipes-bsp/grub/{grub_2.12.bb => grub_2.14.bb} (100%)
meta/recipes-bsp/grub/files/0001-RISC-V-Restore-the-typcast-to-long.patch deleted +0 -37
deleted file mode 100644
index cafa711731..0000000000
@@ -1,37 +0,0 @@
-From b47029e8e582d17c6874d2622fe1a5b834377dbb Mon Sep 17 00:00:00 2001
-From: Khem Raj <[email protected]>
-Date: Fri, 26 Mar 2021 11:59:43 -0700
-Subject: [PATCH] RISC-V: Restore the typcast to 64bit type
-
-this makes the type promotions clear and explicit
-It was already typecasted to long but was accidentally dropped in [1]
-which stated to cause failures on riscv32 as reported in [2]
-
-[1] https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2bf40e9e5be9808b17852e688eead87acff14420
-[2] https://savannah.gnu.org/bugs/index.php?60283
-
-Upstream-Status: Submitted
-Signed-off-by: Khem Raj <[email protected]>
-Cc: Andreas Schwab <[email protected]>
-Cc: Daniel Kiper <[email protected]>
-Cc: Chester Lin <[email protected]>
-Cc: Nikita Ermakov <[email protected]>
-Cc: Alistair Francis <[email protected]>
-
----
- util/grub-mkimagexx.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/util/grub-mkimagexx.c b/util/grub-mkimagexx.c
-index e50b295..2f09255 100644
---- a/util/grub-mkimagexx.c
-+++ b/util/grub-mkimagexx.c
-@@ -1310,7 +1310,7 @@ SUFFIX (relocate_addrs) (Elf_Ehdr *e, struct section_metadata *smd,
- 		  */
- 
- 		 sym_addr += addend;
--		 off = sym_addr - target_section_addr - offset - image_target->vaddr_offset;
-+		 off = (grub_int64_t)sym_addr - target_section_addr - offset - image_target->vaddr_offset;
- 
- 		 switch (ELF_R_TYPE (info))
- 		   {
meta/recipes-bsp/grub/files/0001-autogen.sh-exclude-.pc-from-po-POTFILES.in.patch renamed from meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch +2 -3
similarity index 94%
rename from meta/recipes-bsp/grub/files/autogen.sh-exclude-pc.patch
rename to meta/recipes-bsp/grub/files/0001-autogen.sh-exclude-.pc-from-po-POTFILES.in.patch
index f8dfda90ab..85fb0f1e39 100644
@@ -1,4 +1,4 @@
-From 14c1d0459fb3561e627d3a5f6e91a0d2f7b4aa45 Mon Sep 17 00:00:00 2001
+From 5614602d31d32f59f31c0ec36a59526575b855df Mon Sep 17 00:00:00 2001
 From: Naveen Saini <[email protected]>
 Date: Mon, 15 Mar 2021 14:44:15 +0800
 Subject: [PATCH] autogen.sh: exclude .pc from po/POTFILES.in
@@ -14,13 +14,12 @@ Upstream-Status: Inappropriate [OE specific]
 Signed-off-by: Robert Yang <[email protected]>
 Signed-off-by: Anuj Mittal <[email protected]>
 Signed-off-by: Naveen Saini <[email protected]>
-
 ---
  autogen.sh | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/autogen.sh b/autogen.sh
-index 195daa5..773b7b4 100755
+index 7dd26cd..c3334dc 100755
 --- a/autogen.sh
 +++ b/autogen.sh
 @@ -26,7 +26,7 @@ fi
meta/recipes-bsp/grub/files/0001-misc-Implement-grub_strlcpy.patch deleted +0 -68

68 lines not on this page · raw message

meta/recipes-bsp/grub/files/0002-grub-module-explicitly-keeps-symbole-.module_license.patch renamed from meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch +5 -6
similarity index 89%
rename from meta/recipes-bsp/grub/files/grub-module-explicitly-keeps-symbole-.module_license.patch
rename to meta/recipes-bsp/grub/files/0002-grub-module-explicitly-keeps-symbole-.module_license.patch
index 7c8770ce8b..7dc5fb2daf 100644
@@ -1,4 +1,4 @@
-From b316ed326bd492106006d78f5bfcd767b49a4f2e Mon Sep 17 00:00:00 2001
+From 33cb5eb091dff62b45c6cb990b55fc29cc6d4175 Mon Sep 17 00:00:00 2001
 From: Hongxu Jia <[email protected]>
 Date: Wed, 17 Aug 2016 04:06:34 -0400
 Subject: [PATCH] grub module explicitly keeps symbole .module_license
@@ -40,13 +40,12 @@ SYMBOL TABLE:
 Upstream-Status: Inappropriate [workaround that needs investigation into @TARGET_STRIP@ behaviour in oe-core vs toolchain used by upstream]
 
 Signed-off-by: Hongxu Jia <[email protected]>
-
 ---
  grub-core/genmod.sh.in | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
 diff --git a/grub-core/genmod.sh.in b/grub-core/genmod.sh.in
-index e57c4d9..42bb1ba 100644
+index 337753c..0488285 100644
 --- a/grub-core/genmod.sh.in
 +++ b/grub-core/genmod.sh.in
 @@ -56,7 +56,7 @@ if test x@TARGET_APPLE_LINKER@ != x1; then
@@ -55,6 +54,6 @@ index e57c4d9..42bb1ba 100644
  		-K grub_mod_init -K grub_mod_fini \
 -		-K _grub_mod_init -K _grub_mod_fini \
 +		-K _grub_mod_init -K _grub_mod_fini -K .module_license \
- 		-R .note.gnu.gold-version -R .note.GNU-stack \
- 		-R .gnu.build.attributes \
- 		-R .rel.gnu.build.attributes \
+ 		-R .note.GNU-stack \
+ 		-R .note.gnu.gold-version \
+ 		-R .note.gnu.property \
meta/recipes-bsp/grub/files/0003-grub.d-10_linux.in-add-oe-s-kernel-name.patch renamed from meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch +5 -6
similarity index 93%
rename from meta/recipes-bsp/grub/files/0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch
rename to meta/recipes-bsp/grub/files/0003-grub.d-10_linux.in-add-oe-s-kernel-name.patch
index 69dec7695a..2bb0aca5cf 100644
@@ -1,4 +1,4 @@
-From a80592e20f6c4b928a22862f52f268ab9d9908b2 Mon Sep 17 00:00:00 2001
+From 3715ca04466dfa120e18650d2c481f40d2066ca9 Mon Sep 17 00:00:00 2001
 From: Khem Raj <[email protected]>
 Date: Wed, 13 Jan 2016 19:28:00 +0000
 Subject: [PATCH] grub.d/10_linux.in: add oe's kernel name
@@ -9,18 +9,17 @@ that the grub-mkconfig and grub-install can work correctly.
 We only need add the bzImage to util/grub.d/10_linux.in, but also add it
 to util/grub.d/20_linux_xen.in to keep compatibility.
 
-Signed-off-by: Robert Yang <[email protected]>
-Signed-off-by: Khem Raj <[email protected]>
-
 Upstream-Status: Inappropriate [OE specific]
 
+Signed-off-by: Robert Yang <[email protected]>
+Signed-off-by: Khem Raj <[email protected]>
 ---
  util/grub.d/10_linux.in     | 6 +++---
  util/grub.d/20_linux_xen.in | 2 +-
  2 files changed, 4 insertions(+), 4 deletions(-)
 
 diff --git a/util/grub.d/10_linux.in b/util/grub.d/10_linux.in
-index cc393be..8545cb6 100644
+index 07649cd..d5ec745 100644
 --- a/util/grub.d/10_linux.in
 +++ b/util/grub.d/10_linux.in
 @@ -166,12 +166,12 @@ machine=`uname -m`
@@ -40,7 +39,7 @@ index cc393be..8545cb6 100644
  	done ;;
  esac
 diff --git a/util/grub.d/20_linux_xen.in b/util/grub.d/20_linux_xen.in
-index 94dd8be..36cd554 100644
+index 27bff00..6cc7bfc 100644
 --- a/util/grub.d/20_linux_xen.in
 +++ b/util/grub.d/20_linux_xen.in
 @@ -181,7 +181,7 @@ EOF
meta/recipes-bsp/grub/files/CVE-2024-45774.patch deleted +0 -37
deleted file mode 100644
index 55aecc17d7..0000000000
@@ -1,37 +0,0 @@
-From 2c34af908ebf4856051ed29e46d88abd2b20387f Mon Sep 17 00:00:00 2001
-From: Daniel Axtens <[email protected]>
-Date: Fri, 8 Mar 2024 22:47:20 +1100
-Subject: [PATCH] video/readers/jpeg: Do not permit duplicate SOF0 markers in
- JPEG
-
-Otherwise a subsequent header could change the height and width
-allowing future OOB writes.
-
-Fixes: CVE-2024-45774
-
-Reported-by: Nils Langius <[email protected]>
-Signed-off-by: Daniel Axtens <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2024-45774
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2c34af908ebf4856051ed29e46d88abd2b20387f]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/video/readers/jpeg.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/grub-core/video/readers/jpeg.c b/grub-core/video/readers/jpeg.c
-index ae634fd41..631a89356 100644
---- a/grub-core/video/readers/jpeg.c
-+++ b/grub-core/video/readers/jpeg.c
-@@ -339,6 +339,10 @@ grub_jpeg_decode_sof (struct grub_jpeg_data *data)
-   if (grub_errno != GRUB_ERR_NONE)
-     return grub_errno;
- 
-+  if (data->image_height != 0 || data->image_width != 0)
-+    return grub_error (GRUB_ERR_BAD_FILE_TYPE,
-+		       "jpeg: cannot have duplicate SOF0 markers");
-+
-   if (grub_jpeg_get_byte (data) != 8)
-     return grub_error (GRUB_ERR_BAD_FILE_TYPE,
- 		       "jpeg: only 8-bit precision is supported");
meta/recipes-bsp/grub/files/CVE-2024-45775.patch deleted +0 -38
deleted file mode 100644
index 70492b8c2e..0000000000
@@ -1,38 +0,0 @@
-From 05be856a8c3aae41f5df90cab7796ab7ee34b872 Mon Sep 17 00:00:00 2001
-From: Lidong Chen <[email protected]>
-Date: Fri, 22 Nov 2024 06:27:55 +0000
-Subject: [PATCH] commands/extcmd: Missing check for failed allocation
-
-The grub_extcmd_dispatcher() calls grub_arg_list_alloc() to allocate
-a grub_arg_list struct but it does not verify the allocation was successful.
-In case of failed allocation the NULL state pointer can be accessed in
-parse_option() through grub_arg_parse() which may lead to a security issue.
-
-Fixes: CVE-2024-45775
-
-Reported-by: Nils Langius <[email protected]>
-Signed-off-by: Lidong Chen <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-Reviewed-by: Alec Brown <[email protected]>
-
-CVE: CVE-2024-45775
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=05be856a8c3aae41f5df90cab7796ab7ee34b872]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/commands/extcmd.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/grub-core/commands/extcmd.c b/grub-core/commands/extcmd.c
-index 90a5ca24a..c236be13a 100644
---- a/grub-core/commands/extcmd.c
-+++ b/grub-core/commands/extcmd.c
-@@ -49,6 +49,9 @@ grub_extcmd_dispatcher (struct grub_command *cmd, int argc, char **args,
-     }
- 
-   state = grub_arg_list_alloc (ext, argc, args);
-+  if (state == NULL)
-+    return grub_errno;
-+
-   if (grub_arg_parse (ext, argc, args, state, &new_args, &new_argc))
-     {
-       context.state = state;
meta/recipes-bsp/grub/files/CVE-2024-45776.patch deleted +0 -39
deleted file mode 100644
index 8deea958b8..0000000000
@@ -1,39 +0,0 @@
-From 09bd6eb58b0f71ec273916070fa1e2de16897a91 Mon Sep 17 00:00:00 2001
-From: Lidong Chen <[email protected]>
-Date: Fri, 22 Nov 2024 06:27:56 +0000
-Subject: [PATCH] gettext: Integer overflow leads to heap OOB write or read
-
-Calculation of ctx->grub_gettext_msg_list size in grub_mofile_open() may
-overflow leading to subsequent OOB write or read. This patch fixes the
-issue by replacing grub_zalloc() and explicit multiplication with
-grub_calloc() which does the same thing in safe manner.
-
-Fixes: CVE-2024-45776
-
-Reported-by: Nils Langius <[email protected]>
-Signed-off-by: Lidong Chen <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-Reviewed-by: Alec Brown <[email protected]>
-
-CVE: CVE-2024-45776
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=09bd6eb58b0f71ec273916070fa1e2de16897a91]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/gettext/gettext.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
-index e4f4f8ee6..63bb1ab73 100644
---- a/grub-core/gettext/gettext.c
-+++ b/grub-core/gettext/gettext.c
-@@ -323,8 +323,8 @@ grub_mofile_open (struct grub_gettext_context *ctx,
-   for (ctx->grub_gettext_max_log = 0; ctx->grub_gettext_max >> ctx->grub_gettext_max_log;
-        ctx->grub_gettext_max_log++);
- 
--  ctx->grub_gettext_msg_list = grub_zalloc (ctx->grub_gettext_max
--					    * sizeof (ctx->grub_gettext_msg_list[0]));
-+  ctx->grub_gettext_msg_list = grub_calloc (ctx->grub_gettext_max,
-+					    sizeof (ctx->grub_gettext_msg_list[0]));
-   if (!ctx->grub_gettext_msg_list)
-     {
-       grub_file_close (fd);
meta/recipes-bsp/grub/files/CVE-2024-45777.patch deleted +0 -57

57 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2024-45778_CVE-2024-45779.patch deleted +0 -55

55 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2024-45780.patch deleted +0 -93

93 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2024-45781.patch deleted +0 -35
deleted file mode 100644
index bd0b6aa04a..0000000000
@@ -1,35 +0,0 @@
-From c1a291b01f4f1dcd6a22b61f1c81a45a966d16ba Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Sun, 12 May 2024 02:03:33 +0100
-Subject: [PATCH 2/2] fs/ufs: Fix a heap OOB write
-
-grub_strcpy() was used to copy a symlink name from the filesystem
-image to a heap allocated buffer. This led to a OOB write to adjacent
-heap allocations. Fix by using grub_strlcpy().
-
-Fixes: CVE-2024-45781
-
-Reported-by: B Horn <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2024-45781
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=c1a291b01f4f1dcd6a22b61f1c81a45a966d16ba]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/fs/ufs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/ufs.c b/grub-core/fs/ufs.c
-index a354c92d9..01235101b 100644
---- a/grub-core/fs/ufs.c
-+++ b/grub-core/fs/ufs.c
-@@ -463,7 +463,7 @@ grub_ufs_lookup_symlink (struct grub_ufs_data *data, int ino)
-   /* Check against zero is paylindromic, no need to swap.  */
-   if (data->inode.nblocks == 0
-       && INODE_SIZE (data) <= sizeof (data->inode.symlink))
--    grub_strcpy (symlink, (char *) data->inode.symlink);
-+    grub_strlcpy (symlink, (char *) data->inode.symlink, sz);
-   else
-     {
-       if (grub_ufs_read_file (data, 0, 0, 0, sz, symlink) < 0)
meta/recipes-bsp/grub/files/CVE-2024-45782_CVE-2024-56737.patch deleted +0 -36
deleted file mode 100644
index 41cc025b81..0000000000
@@ -1,36 +0,0 @@
-From 417547c10410b714e43f08f74137c24015f8f4c3 Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Sun, 12 May 2024 02:48:33 +0100
-Subject: [PATCH] fs/hfs: Fix stack OOB write with grub_strcpy()
-
-Replaced with grub_strlcpy().
-
-Fixes: CVE-2024-45782
-Fixes: CVE-2024-56737
-Fixes: https://savannah.gnu.org/bugs/?66599
-
-Reported-by: B Horn <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2024-45782
-CVE: CVE-2024-56737
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=417547c10410b714e43f08f74137c24015f8f4c3]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/fs/hfs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/hfs.c b/grub-core/fs/hfs.c
-index 91dc0e69c..920112b03 100644
---- a/grub-core/fs/hfs.c
-+++ b/grub-core/fs/hfs.c
-@@ -379,7 +379,7 @@ grub_hfs_mount (grub_disk_t disk)
-      volume name.  */
-   key.parent_dir = grub_cpu_to_be32_compile_time (1);
-   key.strlen = data->sblock.volname[0];
--  grub_strcpy ((char *) key.str, (char *) (data->sblock.volname + 1));
-+  grub_strlcpy ((char *) key.str, (char *) (data->sblock.volname + 1), sizeof (key.str));
- 
-   if (grub_hfs_find_node (data, (char *) &key, data->cat_root,
- 			  0, (char *) &dir, sizeof (dir)) == 0)
meta/recipes-bsp/grub/files/CVE-2024-45783.patch deleted +0 -39
deleted file mode 100644
index 99c769961b..0000000000
@@ -1,39 +0,0 @@
-From f7c070a2e28dfab7137db0739fb8db1dc02d8898 Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Sun, 12 May 2024 06:22:51 +0100
-Subject: [PATCH] fs/hfsplus: Set a grub_errno if mount fails
-
-It was possible for mount to fail but not set grub_errno. This led to
-a possible double decrement of the module reference count if the NULL
-page was mapped.
-
-Fixing in general as a similar bug was fixed in commit 61b13c187
-(fs/hfsplus: Set grub_errno to prevent NULL pointer access) and there
-are likely more variants around.
-
-Fixes: CVE-2024-45783
-
-Reported-by: B Horn <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2024-45783
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=f7c070a2e28dfab7137db0739fb8db1dc02d8898]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/fs/hfsplus.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/fs/hfsplus.c b/grub-core/fs/hfsplus.c
-index 295822f69..de71fd486 100644
---- a/grub-core/fs/hfsplus.c
-+++ b/grub-core/fs/hfsplus.c
-@@ -405,7 +405,7 @@ grub_hfsplus_mount (grub_disk_t disk)
- 
-  fail:
- 
--  if (grub_errno == GRUB_ERR_OUT_OF_RANGE)
-+  if (grub_errno == GRUB_ERR_OUT_OF_RANGE || grub_errno == GRUB_ERR_NONE)
-     grub_error (GRUB_ERR_BAD_FS, "not a HFS+ filesystem");
- 
-   grub_free (data);
meta/recipes-bsp/grub/files/CVE-2024-56738.patch deleted +0 -75

75 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-0622-01.patch deleted +0 -35
deleted file mode 100644
index 09dbfce5f8..0000000000
@@ -1,35 +0,0 @@
-From 2123c5bca7e21fbeb0263df4597ddd7054700726 Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Fri, 1 Nov 2024 19:24:29 +0000
-Subject: [PATCH 1/3] commands/pgp: Unregister the "check_signatures" hooks on
- module unload
-
-If the hooks are not removed they can be called after the module has
-been unloaded leading to an use-after-free.
-
-Fixes: CVE-2025-0622
-
-Reported-by: B Horn <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2025-0622
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=2123c5bca7e21fbeb0263df4597ddd7054700726]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/commands/pgp.c | 2 ++
- 1 file changed, 2 insertions(+)
-
-diff --git a/grub-core/commands/pgp.c b/grub-core/commands/pgp.c
-index c6766f044..5fadc33c4 100644
---- a/grub-core/commands/pgp.c
-+++ b/grub-core/commands/pgp.c
-@@ -1010,6 +1010,8 @@ GRUB_MOD_INIT(pgp)
- 
- GRUB_MOD_FINI(pgp)
- {
-+  grub_register_variable_hook ("check_signatures", NULL, NULL);
-+  grub_env_unset ("check_signatures");
-   grub_verifier_unregister (&grub_pubkey_verifier);
-   grub_unregister_extcmd (cmd);
-   grub_unregister_extcmd (cmd_trust);
meta/recipes-bsp/grub/files/CVE-2025-0622-02.patch deleted +0 -41

41 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-0622-03.patch deleted +0 -38
deleted file mode 100644
index 79078a4350..0000000000
@@ -1,38 +0,0 @@
-From 7580addfc8c94cedb0cdfd7a1fd65b539215e637 Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Fri, 1 Nov 2024 23:52:06 +0000
-Subject: [PATCH 3/3] gettext: Remove variables hooks on module unload
-
-The gettext module does not entirely cleanup after itself in
-its GRUB_MOD_FINI() leaving a few variables hooks in place.
-It is not possible to unload gettext module because normal
-module depends on it. Though fix the issues for completeness.
-
-Fixes: CVE-2025-0622
-
-Reported-by: B Horn <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2025-0622
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=7580addfc8c94cedb0cdfd7a1fd65b539215e637]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/gettext/gettext.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
-diff --git a/grub-core/gettext/gettext.c b/grub-core/gettext/gettext.c
-index 7a1c14e4f..e4f4f8ee6 100644
---- a/grub-core/gettext/gettext.c
-+++ b/grub-core/gettext/gettext.c
-@@ -535,6 +535,10 @@ GRUB_MOD_INIT (gettext)
- 
- GRUB_MOD_FINI (gettext)
- {
-+  grub_register_variable_hook ("locale_dir", NULL, NULL);
-+  grub_register_variable_hook ("secondary_locale_dir", NULL, NULL);
-+  grub_register_variable_hook ("lang", NULL, NULL);
-+
-   grub_gettext_delete_list (&main_context);
-   grub_gettext_delete_list (&secondary_context);
- 
meta/recipes-bsp/grub/files/CVE-2025-0624.patch deleted +0 -84

84 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-0677_CVE-2025-0684_CVE-2025-0685_CVE-2025-0686_CVE-2025-0689.patch deleted +0 -377

377 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-0678_CVE-2025-1125.patch deleted +0 -87

87 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-0690.patch deleted +0 -73

73 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-1118.patch deleted +0 -37
deleted file mode 100644
index e6906d909c..0000000000
@@ -1,37 +0,0 @@
-From 34824806ac6302f91e8cabaa41308eaced25725f Mon Sep 17 00:00:00 2001
-From: B Horn <[email protected]>
-Date: Thu, 18 Apr 2024 20:29:39 +0100
-Subject: [PATCH] commands/minicmd: Block the dump command in lockdown mode
-
-The dump enables a user to read memory which should not be possible
-in lockdown mode.
-
-Fixes: CVE-2025-1118
-
-Reported-by: B Horn <[email protected]>
-Reported-by: Jonathan Bar Or <[email protected]>
-Signed-off-by: B Horn <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-
-CVE: CVE-2025-1118
-Upstream-Status: Backport [https://git.savannah.gnu.org/cgit/grub.git/commit/?id=34824806ac6302f91e8cabaa41308eaced25725f]
-Signed-off-by: Peter Marko <[email protected]>
----
- grub-core/commands/minicmd.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/grub-core/commands/minicmd.c b/grub-core/commands/minicmd.c
-index 286290866..8c5ee3e60 100644
---- a/grub-core/commands/minicmd.c
-+++ b/grub-core/commands/minicmd.c
-@@ -203,8 +203,8 @@ GRUB_MOD_INIT(minicmd)
-     grub_register_command ("help", grub_mini_cmd_help,
- 			   0, N_("Show this message."));
-   cmd_dump =
--    grub_register_command ("dump", grub_mini_cmd_dump,
--			   N_("ADDR [SIZE]"), N_("Show memory contents."));
-+    grub_register_command_lockdown ("dump", grub_mini_cmd_dump,
-+				    N_("ADDR [SIZE]"), N_("Show memory contents."));
-   cmd_rmmod =
-     grub_register_command ("rmmod", grub_mini_cmd_rmmod,
- 			   N_("MODULE"), N_("Remove a module."));
meta/recipes-bsp/grub/files/CVE-2025-54770.patch deleted +0 -41

41 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-61661.patch deleted +0 -40
deleted file mode 100644
index 9f6cf68e4b..0000000000
@@ -1,40 +0,0 @@
-From c24e11d87f8ee8cefd615e0c30eb71ff6149ee50 Mon Sep 17 00:00:00 2001
-From: Jamie <[email protected]>
-Date: Mon, 14 Jul 2025 09:52:59 +0100
-Subject: [PATCH 2/4] commands/usbtest: Use correct string length field
-
-An incorrect length field is used for buffer allocation. This leads to
-grub_utf16_to_utf8() receiving an incorrect/different length and possibly
-causing OOB write. This makes sure to use the correct length.
-
-Fixes: CVE-2025-61661
-
-CVE: CVE-2025-61661
-
-Upstream-Status: Backport
-[https://gitweb.git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=549a9cc372fd0b96a4ccdfad0e12140476cc62a3]
-
-Reported-by: Jamie <[email protected]>
-Signed-off-by: Jamie <[email protected]>
-Reviewed-by: Daniel Kiper <[email protected]>
-Signed-off-by: Jiaying Song <[email protected]>
----
- grub-core/commands/usbtest.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/grub-core/commands/usbtest.c b/grub-core/commands/usbtest.c
-index 2c6d93fe6..8ef187a9a 100644
---- a/grub-core/commands/usbtest.c
-+++ b/grub-core/commands/usbtest.c
-@@ -99,7 +99,7 @@ grub_usb_get_string (grub_usb_device_t dev, grub_uint8_t index, int langid,
-       return GRUB_USB_ERR_NONE;
-     }
- 
--  *string = grub_malloc (descstr.length * 2 + 1);
-+  *string = grub_malloc (descstrp->length * 2 + 1);
-   if (! *string)
-     {
-       grub_free (descstrp);
--- 
-2.34.1
-
meta/recipes-bsp/grub/files/CVE-2025-61662.patch deleted +0 -72

72 lines not on this page · raw message

meta/recipes-bsp/grub/files/CVE-2025-61663_61664.patch deleted +0 -64

64 lines not on this page · raw message

meta/recipes-bsp/grub/grub-efi_2.14.bb renamed from meta/recipes-bsp/grub/grub-efi_2.12.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/grub/grub-efi_2.12.bb
rename to meta/recipes-bsp/grub/grub-efi_2.14.bb
meta/recipes-bsp/grub/grub2.inc +6 -39

71 lines not on this page · raw message

meta/recipes-bsp/grub/grub_2.14.bb renamed from meta/recipes-bsp/grub/grub_2.12.bb +0 -0
similarity index 100%
rename from meta/recipes-bsp/grub/grub_2.12.bb
rename to meta/recipes-bsp/grub/grub_2.14.bb
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH v2 2/2 grub: fix grub installation error on i386 target

Commit 1a5417f39[1] introduced a grub installation error on i386 target:

grub-mkimage: error: `/usr/lib/grub/i386-pc/kernel.img' is
miscompiled: its start address is 0x9074 instead of 0x9000: ld.gold bug?.

A series of patches are under review in grub mailing list[2]. Once these patches are merged, we will backport them to the current version.

Currently, referring to Gentoo[3] and Libreboot[4], revert the following commits as a workaround:
1a5417f39 configure: Check linker for --image-base support ac042f3f5 configure: Print a more helpful error if autoconf-archive is
not installed

[1] https://cgit.git.savannah.gnu.org/cgit/grub.git/commit/?id=1a5417f39a0ccefcdd5440f2a67f84d2d2e26960
[2] https://lists.gnu.org/archive/html/grub-devel/2026-02/msg00039.html
[3] https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=f5a995ac689a7132651ef6b2b87295c392899427
[4] https://codeberg.org/libreboot/lbmk/src/branch/master/config/grub/nvme/patches/0010-Revert-configure-Check-linker-for-image-base-support.patch

---
 ...-Check-linker-for-image-base-support.patch | 73 +++++++++++++++++++
 ...-Print-a-more-helpful-error-if-autoc.patch | 34 +++++++++
 meta/recipes-bsp/grub/grub2.inc               |  4 +-
 3 files changed, 110 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-bsp/grub/files/0001-Revert-configure-Check-linker-for-image-base-support.patch
 create mode 100644 meta/recipes-bsp/grub/files/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch
meta/recipes-bsp/grub/files/0001-Revert-configure-Check-linker-for-image-base-support.patch new file +73 -0
new file mode 100644
index 0000000000..123909cdf8
@@ -0,0 +1,73 @@
+From 3a9d2dd2f5fb07b75a74c307d61b9b9fc5d20a62 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <[email protected]>
+Date: Fri, 27 Feb 2026 11:46:54 +0800
+Subject: [PATCH] Revert "configure: Check linker for --image-base support"
+
+This reverts commit 1a5417f39a0ccefcdd5440f2a67f84d2d2e26960.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ acinclude.m4 |  5 -----
+ configure.ac | 14 ++------------
+ 2 files changed, 2 insertions(+), 17 deletions(-)
+
+diff --git a/acinclude.m4 b/acinclude.m4
+index 70c1912f8..fa7840f09 100644
+--- a/acinclude.m4
++++ b/acinclude.m4
+@@ -79,11 +79,6 @@ AC_DEFUN([grub_PROG_OBJCOPY_ABSOLUTE],
+ [AC_MSG_CHECKING([whether ${TARGET_OBJCOPY} works for absolute addresses])
+ AC_CACHE_VAL(grub_cv_prog_objcopy_absolute,
+ [cat > conftest.c <<\EOF
+-asm (
+-    ".globl start, _start, __start\n"
+-    ".ifdef cmain; .set start = _start = __start = cmain\n.endif\n"
+-    ".ifdef _cmain; .set start = _start = __start = _cmain\n.endif\n"
+-);
+ void cmain (void);
+ void
+ cmain (void)
+diff --git a/configure.ac b/configure.ac
+index d8ca1b7c1..041cfbab4 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1461,6 +1461,7 @@ elif test x$grub_cv_target_cc_link_format = x-mi386pe || test x$grub_cv_target_c
+   TARGET_IMG_LDSCRIPT='$(top_srcdir)'"/conf/i386-cygwin-img-ld.sc"
+   TARGET_IMG_LDFLAGS="-Wl,-T${TARGET_IMG_LDSCRIPT}"
+   TARGET_IMG_LDFLAGS_AC="-Wl,-T${srcdir}/conf/i386-cygwin-img-ld.sc"
++  TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
+   TARGET_IMG_CFLAGS=
+ else
+   TARGET_APPLE_LINKER=0
+@@ -1468,6 +1469,7 @@ else
+   TARGET_IMG_LDSCRIPT=
+   TARGET_IMG_LDFLAGS='-Wl,-N'
+   TARGET_IMG_LDFLAGS_AC='-Wl,-N'
++  TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"
+   TARGET_IMG_CFLAGS=
+ fi
+ 
+@@ -1798,18 +1800,6 @@ grub_PROG_TARGET_CC
+ m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
+ 
+ if test "x$TARGET_APPLE_LINKER" != x1 ; then
+-AX_CHECK_LINK_FLAG([-Wl,--image-base,0x400000],
+-    [TARGET_IMG_BASE_LDOPT="-Wl,--image-base"],
+-    [TARGET_IMG_BASE_LDOPT="-Wl,-Ttext"],
+-    [],
+-    [AC_LANG_SOURCE([
+-asm (".globl start; start:");
+-asm (".globl _start; _start:");
+-asm (".globl __start; __start:");
+-void __main (void);
+-void __main (void) {}
+-int main (void);
+-    ])])
+ grub_PROG_OBJCOPY_ABSOLUTE
+ fi
+ grub_PROG_LD_BUILD_ID_NONE
+-- 
+2.43.0
+
meta/recipes-bsp/grub/files/0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch new file +34 -0
new file mode 100644
index 0000000000..bf6375246e
@@ -0,0 +1,34 @@
+From d0f516385dc73e8dd92b78ce08c1df100434fe67 Mon Sep 17 00:00:00 2001
+From: Yi Zhao <[email protected]>
+Date: Fri, 27 Feb 2026 13:58:44 +0800
+Subject: [PATCH] Revert "configure: Print a more helpful error if
+ autoconf-archive is not installed"
+
+This reverts commit ac042f3f58d33ce9cd5ff61750f06da1a1d7b0eb.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Yi Zhao <[email protected]>
+---
+ configure.ac | 5 -----
+ 1 file changed, 5 deletions(-)
+
+diff --git a/configure.ac b/configure.ac
+index 041cfbab4..209c0fb11 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -1794,11 +1794,6 @@ LIBS=""
+ # Defined in acinclude.m4.
+ grub_ASM_USCORE
+ grub_PROG_TARGET_CC
+-
+-# The error message produced by autoconf if autoconf-archive is not installed is
+-# quite misleading and not very helpful. So, try point people in the right direction.
+-m4_ifndef([AX_CHECK_LINK_FLAG], [m4_fatal([autoconf-archive is missing. You must install it to generate the configure script.])])
+-
+ if test "x$TARGET_APPLE_LINKER" != x1 ; then
+ grub_PROG_OBJCOPY_ABSOLUTE
+ fi
+-- 
+2.43.0
+
meta/recipes-bsp/grub/grub2.inc +3 -1
index 434f977667..8c62315e69 100644
@@ -17,6 +17,8 @@ SRC_URI = "${GNU_MIRROR}/grub/grub-${PV}.tar.gz \
            file://0001-autogen.sh-exclude-.pc-from-po-POTFILES.in.patch \
            file://0002-grub-module-explicitly-keeps-symbole-.module_license.patch \
            file://0003-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
+           file://0001-Revert-configure-Check-linker-for-image-base-support.patch \
+           file://0002-Revert-configure-Print-a-more-helpful-error-if-autoc.patch \
 "
 
 SRC_URI[sha256sum] = "d0415fbb3e739237064e173743a6e5f60c33a81ec02a069cc9152d80efff4967"
@@ -26,7 +28,7 @@ CVE_STATUS[CVE-2023-4001]  = "not-applicable-platform: Applies only to RHEL/Fedo
 CVE_STATUS[CVE-2024-1048]  = "not-applicable-platform: Applies only to RHEL/Fedora"
 CVE_STATUS[CVE-2024-2312]  = "not-applicable-platform: Applies only to Ubuntu"
 
-DEPENDS = "flex-native bison-native gettext-native gawk-replacement-native autoconf-archive-native"
+DEPENDS = "flex-native bison-native gettext-native gawk-replacement-native"
 
 GRUB_COMPATIBLE_HOST = '(x86_64.*|i.86.*|arm.*|aarch64.*|loongarch64.*|riscv.*)-(linux.*|freebsd.*)'
 COMPATIBLE_HOST = "${GRUB_COMPATIBLE_HOST}"
Signature · 1 line
2.34.1