From b62dcc4b8310ab05a60c19086e8f893bd1dc5927 Mon Sep 17 00:00:00 2001 From: Xue Liu Date: Mon, 25 Nov 2024 11:33:39 +0800 Subject: [PATCH] LoongArch: Clear buffer for screen info --- bugfix-Clear-buffer-for-screen-info.patch | 25 +++++++++++++++++++++++ grub.patches | 1 + grub2.spec | 8 +++++++- 3 files changed, 33 insertions(+), 1 deletion(-) create mode 100644 bugfix-Clear-buffer-for-screen-info.patch diff --git a/bugfix-Clear-buffer-for-screen-info.patch b/bugfix-Clear-buffer-for-screen-info.patch new file mode 100644 index 0000000..5dffae2 --- /dev/null +++ b/bugfix-Clear-buffer-for-screen-info.patch @@ -0,0 +1,25 @@ +From f1f173b06c7e5f3ae034a4c64d525434a20ed4bd Mon Sep 17 00:00:00 2001 +From: openEuler Buildteam +Date: Fri, 8 Nov 2024 17:31:48 +0800 +Subject: [PATCH] bugfix: Clear buffer for screen info + +--- + grub-core/loader/loongarch64/linux-elf.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/grub-core/loader/loongarch64/linux-elf.c b/grub-core/loader/loongarch64/linux-elf.c +index c5d9434..b495a2b 100644 +--- a/grub-core/loader/loongarch64/linux-elf.c ++++ b/grub-core/loader/loongarch64/linux-elf.c +@@ -167,6 +167,8 @@ alloc_screen_info (void) + if (status != GRUB_EFI_SUCCESS) + return NULL; + ++ grub_memset((void *)si, 0, sizeof(struct screen_info)); ++ + status = b->install_configuration_table (&compat_screen_info_guid, si); + if (status != GRUB_EFI_SUCCESS) + goto free_mem; +-- +2.43.0 + diff --git a/grub.patches b/grub.patches index f11ec64..f672091 100644 --- a/grub.patches +++ b/grub.patches @@ -244,3 +244,4 @@ Patch243: 10_linux-fix-missing-ro-in-kernel-boot-parameters.patch Patch244: 0001-cryptodisk-add-OS-provided-secret-support.patch 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 +Patch247: bugfix-Clear-buffer-for-screen-info.patch diff --git a/grub2.spec b/grub2.spec index 19ca23f..ac87ce4 100644 --- a/grub2.spec +++ b/grub2.spec @@ -19,7 +19,7 @@ Name: grub2 Epoch: 1 Version: 2.12 -Release: 27 +Release: 28 Summary: Bootloader with support for Linux, Multiboot and more License: GPLv3+ URL: http://www.gnu.org/software/grub/ @@ -461,6 +461,12 @@ fi %{_datadir}/man/man* %changelog +* Fri Nov 8 2024 liuxue - 1:2.12-28 +- Type:bugfix +- CVE:NA +- SUG:NA +- DESC:Clear buffer for screen info + * Wed Nov 13 2024 yueyuankun - 1:2.12-27 - Type:bugfix - CVE:NA -- Gitee