diff --git a/bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch b/bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch new file mode 100644 index 0000000000000000000000000000000000000000..dcc1e6b25770a038cd9e8e57b3fc0f2bfbc04470 --- /dev/null +++ b/bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch @@ -0,0 +1,37 @@ +From b5793c27c88daef4383f002dd0c340ce9ae2ed17 Mon Sep 17 00:00:00 2001 +From: Qiumiao Zhang +Date: Tue, 24 Dec 2024 02:37:58 +0000 +Subject: [PATCH] fix not verifying grub.cfg when loading it + +Fixes: c8b6446348a4 ("skip verification when not loading grub.cfg") + +Signed-off-by: Qiumiao Zhang +--- + grub-core/normal/main.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/grub-core/normal/main.c b/grub-core/normal/main.c +index edbea53..d7a6b79 100644 +--- a/grub-core/normal/main.c ++++ b/grub-core/normal/main.c +@@ -133,7 +133,7 @@ read_config_file (const char *config) + } + + /* Try to open the config file. */ +- rawfile = grub_file_open (config, GRUB_FILE_TYPE_CONFIG); ++ rawfile = grub_file_open (config, GRUB_FILE_TYPE_SKIP_SIGNATURE); + if (! rawfile) + return 0; + +@@ -369,7 +369,7 @@ grub_try_normal_prefix (const char *prefix) + if (config) + { + grub_file_t file; +- file = grub_file_open (config, GRUB_FILE_TYPE_SKIP_SIGNATURE); ++ file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG); + if (file) + { + grub_file_close (file); +-- +2.33.0 + diff --git a/grub.patches b/grub.patches index 09f997e6e3413ef00edfd5fc57543a90140e777e..db8a0fe54fff05cad779f2f7c945390568e15651 100644 --- a/grub.patches +++ b/grub.patches @@ -356,3 +356,4 @@ Patch0356: backport-osdep-Introduce-include-grub-osdep-major-h-and-use-it.patch Patch0357: backport-osdep-linux-hostdisk-Use-stat-instead-of-udevadm.patch Patch0358: backport-commands-legacycfg-Avoid-closing-file-twice.patch Patch0359: backport-disk-lvm-GRUB-fails-to-detect-LVM-volumes-due-to-an-.patch +Patch0360: bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch diff --git a/grub2.spec b/grub2.spec index cbb549a8ce9af04d54110ffd672aa721fcbe6af4..a2a8b2edb4f4c5780f3304e666e439d03d0d911d 100644 --- a/grub2.spec +++ b/grub2.spec @@ -14,7 +14,7 @@ Name: grub2 Epoch: 1 Version: 2.06 -Release: 49 +Release: 50 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -453,6 +453,12 @@ fi %{_datadir}/man/man* %changelog +* Tue Dec 24 2024 zhangqiumiao - 1:2.06-50 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:fix not verifying grub.cfg when loading it + * Sat Dec 21 2024 zhangqiumiao - 1:2.06-49 - Type:bugfix - CVE:NA