!495 [sync] PR-492: fix not verifying grub.cfg when loading it
From: @openeuler-sync-bot Reviewed-by: @t_feng Signed-off-by: @t_feng
This commit is contained in:
commit
57780918d5
36
bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch
Normal file
36
bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch
Normal file
@ -0,0 +1,36 @@
|
|||||||
|
From 7d26233eb454d75419476eb9d1729ea3b2972238 Mon Sep 17 00:00:00 2001
|
||||||
|
From: Qiumiao Zhang <zhangqiumiao1@huawei.com>
|
||||||
|
Date: Wed, 18 Dec 2024 09:26:33 +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 <zhangqiumiao1@huawei.com>
|
||||||
|
---
|
||||||
|
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 f3e14bf..06d91c0 100644
|
||||||
|
--- a/grub-core/normal/main.c
|
||||||
|
+++ b/grub-core/normal/main.c
|
||||||
|
@@ -134,7 +134,7 @@ read_config_file (const char *config)
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Try to open the config file. */
|
||||||
|
- rawfile = grub_file_open (config, GRUB_FILE_TYPE_SKIP_SIGNATURE);
|
||||||
|
+ rawfile = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||||
|
if (! rawfile)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
@@ -373,7 +373,7 @@ grub_try_normal (const char *variable)
|
||||||
|
if (config)
|
||||||
|
{
|
||||||
|
grub_file_t file;
|
||||||
|
- file = grub_file_open (config, GRUB_FILE_TYPE_CONFIG);
|
||||||
|
+ file = grub_file_open (config, GRUB_FILE_TYPE_SKIP_SIGNATURE);
|
||||||
|
if (file)
|
||||||
|
{
|
||||||
|
grub_file_close (file);
|
||||||
|
--
|
||||||
|
2.33.0
|
||||||
|
|
||||||
@ -245,3 +245,4 @@ Patch245: 0002-efi-Add-API-for-retrieving-the-EFI-secret-for-crypto.patch
|
|||||||
Patch246: backport-acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find.patch
|
Patch246: backport-acpi-Fix-out-of-bounds-access-in-grub_acpi_xsdt_find.patch
|
||||||
Patch247: backport-commands-efi-tpm-Re-enable-measurements-on-confident.patch
|
Patch247: backport-commands-efi-tpm-Re-enable-measurements-on-confident.patch
|
||||||
Patch248: backport-commands-legacycfg-Avoid-closing-file-twice.patch
|
Patch248: backport-commands-legacycfg-Avoid-closing-file-twice.patch
|
||||||
|
Patch249: bugfix-fix-not-verifying-grub-cfg-when-loading-it.patch
|
||||||
|
|||||||
@ -19,7 +19,7 @@
|
|||||||
Name: grub2
|
Name: grub2
|
||||||
Epoch: 1
|
Epoch: 1
|
||||||
Version: 2.12
|
Version: 2.12
|
||||||
Release: 30
|
Release: 31
|
||||||
Summary: Bootloader with support for Linux, Multiboot and more
|
Summary: Bootloader with support for Linux, Multiboot and more
|
||||||
License: GPLv3+
|
License: GPLv3+
|
||||||
URL: http://www.gnu.org/software/grub/
|
URL: http://www.gnu.org/software/grub/
|
||||||
@ -461,6 +461,12 @@ fi
|
|||||||
%{_datadir}/man/man*
|
%{_datadir}/man/man*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Mon Dec 23 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-31
|
||||||
|
- Type:bugfix
|
||||||
|
- CVE:NA
|
||||||
|
- SUG:NA
|
||||||
|
- DESC:fix not verifying grub.cfg when loading it
|
||||||
|
|
||||||
* Sat Dec 21 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-30
|
* Sat Dec 21 2024 zhangqiumiao <zhangqiumiao1@huawei.com> - 1:2.12-30
|
||||||
- Type:bugfix
|
- Type:bugfix
|
||||||
- CVE:NA
|
- CVE:NA
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user