integ/grub/grub2/centos/meta_patches/0009-grub2-Build-pxeboot-package.patch
Zhixiong Chi a0b2acecaa grub2: fix CVE-2020-15707
Avoid to the heap-based buffer overflow.

Upgrade to the below package to fix the CVE issue:
 grub2-2.02-0.86.el7.centos.src.rpm

At the same time adjust the context and drop
0004-grub2-remove-32b-requirements.patch since it already had been
included in the new version.

Story: 2008532
Task: 41664
Change-Id: I7943127323ee28457ffe0a4ece54764633f86d9f
Signed-off-by: Zhixiong Chi <zhixiong.chi@windriver.com>
2021-01-25 04:15:59 -05:00

48 lines
2.2 KiB
Diff

From ca7e4edddd48b0ffd0520a2ccb271bbe036aa1e5 Mon Sep 17 00:00:00 2001
From: root <root@yow-cgts4-lx.wrs.com>
Date: Tue, 23 Jan 2018 14:57:29 -0500
Subject: add pxeboot package
---
SOURCES/grub.macros | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/SOURCES/grub.macros b/SOURCES/grub.macros
index 5581deb..9ef91d6 100644
--- a/SOURCES/grub.macros
+++ b/SOURCES/grub.macros
@@ -242,6 +242,13 @@ Summary: Unsigned versions of GRUB EFI binaries \
%{expand:%%description %{1}-unsigned} \
This package contains unsigned version of GRUB EFI binaries. \
\
+%{expand:%%package %{1}-pxeboot} \
+Summary: PXE bootable GRUB EFI binaries \
+ \
+%{expand:%%description %{1}-pxeboot} \
+This package contains the version of EFI GRUB that is served by the pxeboot \
+server \
+ \
%{nil}
%global do_common_setup() \
@@ -414,6 +421,7 @@ ln -sf ../boot/efi/EFI/%{efidir}/grub.cfg \\\
$RPM_BUILD_ROOT%{_sysconfdir}/%{name}-efi.cfg \
install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2}.unsigned \
install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3}.unsigned \
+install -D -m 755 %{2} $RPM_BUILD_ROOT/pxeboot/EFI/%{2} \
install -m 700 %{2} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{2} \
install -m 700 %{3} $RPM_BUILD_ROOT/boot/efi/EFI/%{efidir}/%{3} \
install -D -m 700 unicode.pf2 \\\
@@ -505,4 +513,8 @@ cd .. \
%{expand:%%files %{1}-unsigned} \
/boot/efi/EFI/%{efidir}/%{grubefiname}.unsigned \
/boot/efi/EFI/%{efidir}/%{grubeficdname}.unsigned \
+ \
+%{expand:%%files %{1}-pxeboot} \
+/pxeboot/EFI/%{grubefiname} \
+ \
%{nil}
--
2.7.4