Sync with rhel-8.6.0

Resolves: #2065461
Signed-off-by: Robbie Harwood <rharwood@redhat.com>
This commit is contained in:
Robbie Harwood 2022-08-22 15:26:30 -04:00 committed by Leo Sandoval
parent 8390aafe17
commit a75102707c
3 changed files with 87 additions and 27 deletions

View File

@ -13,10 +13,19 @@
%global shimefix64 %{expand:%{SOURCE22}}
#%%global shimefiarm %%{expand:%%{SOURCE23}
%global shimveraa64 15-7.el8_1
%global shimveria32 15.6-1.el8
%global shimverx64 15.6-1.el8
%global fbefiaa64 %{expand:%{SOURCE30}}
%global fbefiia32 %{expand:%{SOURCE31}}
%global fbefix64 %{expand:%{SOURCE32}}
#%%global fbefiarm %%{expand:%%{SOURCE33}
%global mmefiaa64 %{expand:%{SOURCE40}}
%global mmefiia32 %{expand:%{SOURCE41}}
%global mmefix64 %{expand:%{SOURCE42}}
#%%global mmefiarm %%{expand:%%{SOURCE43}
%global shimveraa64 15-7.el8_1
%global shimveria32 15.5-1.el8
%global shimverx64 15.5-1.el8
#%%global shimverarm 15-1.el8
%global shimdiraa64 %{_datadir}/shim/%{shimveraa64}/aa64
@ -37,6 +46,10 @@
%global shimveralt %{expand:%{shimver%{?efi_alt_arch}}}
%global shimdir %{expand:%{shimdir%{efi_arch}}}
%global shimdiralt %{expand:%{shimdir%{?efi_alt_arch}}}
%global fbefi %{expand:%{fbefi%{efi_arch}}}
%global fbefialt %{expand:%{fbefi%{?efi_alt_arch}}}
%global mmefi %{expand:%{mmefi%{efi_arch}}}
%global mmefialt %{expand:%{mmefi%{?efi_alt_arch}}}
%global unsignednone shim-unsigned-none
%global unsigned %{expand:%%{unsigned%{efi_arch}}}
@ -69,15 +82,17 @@ version signed by the UEFI signing service. \
# -a <efiarch>
# -i <input>
%define hash(a:i:d:) \
pesign -i %{-i*} -h -P > shim.hash \
read file0 hash0 < shim.hash \
read file1 hash1 < %{-d*}/shim%{-a*}.hash \
if ! [ "$hash0" = "$hash1" ]; then \
echo Invalid signature\! > /dev/stderr \
echo $hash0 vs $hash1 \
exit 1 \
fi \
%define hash(a:i:d:) \
if [ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
pesign -i %{-i*} -h -P > shim.hash \
read file0 hash0 < shim.hash \
read file1 hash1 < %{-d*}/shim%{-a*}.hash \
if ! [ "$hash0" = "$hash1" ] ; then \
echo Invalid signature\! > /dev/stderr \
echo $hash0 vs $hash1 \
exit 1 \
fi \
fi \
%{nil}
# -i <input>
@ -89,9 +104,25 @@ version signed by the UEFI signing service. \
# -b <binary prefix>
# -a <efiarch>
# -i <input>
%define distrosign(b:a:d:) \
cp -av %{-d*}/%{-b*}%{-a*}.efi %{-b*}%{-a*}-unsigned.efi \
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} }\
%define distrosign(b:a:d:) \
if [ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
if [ "%{-b*}%{-a*}" = "shim%{efi_arch}" ] ; then \
cp -av "%{shimefi}" %{-b*}%{-a*}-unsigned.efi \
elif [ "%{-b*}%{-a*}" = "shim%{efi_alt_arch}" ] ; then \
cp -av "%{shimefialt}" %{-b*}%{-a*}-unsigned.efi \
elif [ "%{-b*}%{-a*}" = "mm%{efi_arch}" ] ; then \
cp -av "%{mmefi}" %{-b*}%{-a*}-unsigned.efi \
elif [ "%{-b*}%{-a*}" = "mm%{efi_alt_arch}" ] ; then \
cp -av "%{mmefialt}" %{-b*}%{-a*}-unsigned.efi \
elif [ "%{-b*}%{-a*}" = "fb%{efi_arch}" ] ; then \
cp -av "%{fbefi}" %{-b*}%{-a*}-unsigned.efi \
elif [ "%{-b*}%{-a*}" = "fb%{efi_alt_arch}" ] ; then \
cp -av "%{fbefialt}" %{-b*}%{-a*}-unsigned.efi \
fi \
else \
cp -av %{-d*}/%{-b*}%{-a*}.efi %{-b*}%{-a*}-unsigned.efi \
fi \
%{expand:%%sign -i %{-b*}%{-a*}-unsigned.efi -o %{-b*}%{-a*}-signed.efi -n redhatsecureboot501 -a %{SOURCE2} -c %{SOURCE1} } \
%{nil}
# -a <efiarch>
@ -99,16 +130,18 @@ version signed by the UEFI signing service. \
# -b <1|0> # signed by this builder?
# -c <1|0> # signed by UEFI CA?
# -i <shimARCH.efi>
# -d /usr/share dir for this build (full path)
%define define_build(a:A:b:c:i:d:) \
if [ "%{-c*}" = "yes-temporarily-disabled-20180723" ]; then \
%{expand:%%hash -i %{-i*} -a %{-a*} -d %{-d*}} \
fi \
cp %{-i*} shim%{-a*}.efi \
if [ "%{-b*}" = "yes" ]; then \
if [ "%{-b*}" = "yes" ] ; then \
%{expand:%%distrosign -b shim -a %{-a*} -d %{-d*}} \
mv shim%{-a*}-signed.efi shim%{-a*}-%{efi_vendor}.efi \
fi \
if [ "%{-c*}" = "no" ]; then \
if [ "%{-c*}" = "no" ] || \
[ 0%{?_unsigned_test_build:%{_unsigned_test_build}} -ne 0 ] ; then \
cp shim%{-a*}-%{efi_vendor}.efi shim%{-a*}.efi \
fi \
%{expand:%%distrosign -b mm -a %{-a*} -d %{-d*}} \

View File

@ -1,6 +1,6 @@
Name: shim
Version: 15.6
Release: 1%{?dist}
Version: 15.5
Release: 2.el8
Summary: First-stage UEFI bootloader
License: BSD
URL: https://github.com/rhboot/shim/
@ -21,12 +21,20 @@ Source2: redhatsecurebootca5.cer
# match, 1 and 11 match, ...
Source10: BOOTAA64.CSV
Source20: shimaa64.efi
Source30: mmaa64.efi
Source40: fbaa64.efi
Source11: BOOTIA32.CSV
Source21: shimia32.efi
Source31: mmia32.efi
Source41: fbia32.efi
Source12: BOOTX64.CSV
Source22: shimx64.efi
Source32: mmx64.efi
Source42: fbx64.efi
#Source13: BOOTARM.CSV
#Source23: shimarm.efi
#Source33: mmarm.efi
#Source43: fbarm.efi
%include %{SOURCE0}
@ -37,6 +45,8 @@ BuildRequires: pesign >= 0.112-20.fc27
# (shim 16+) by making the unsigned packages all provide "shim-unsigned", so
# we can just BuildRequires that.
%ifarch x86_64
# BuildRequires: %% {unsignedx64} = %% {shimverx64}
# BuildRequires: %% {unsignedia32} = %% {shimveria32}
BuildRequires: %{unsignedx64} = %{shimverx64}
BuildRequires: %{unsignedia32} = %{shimveria32}
%endif
@ -63,6 +73,7 @@ rm -rf shim-%{version}
mkdir shim-%{version}
%build
export PS4='${LINENO}: '
cd shim-%{version}
%if %{efi_has_alt_arch}
@ -101,9 +112,19 @@ install -m 0700 %{shimefi} $RPM_BUILD_ROOT%{efi_esp_dir}/shim.efi
%endif
%changelog
* Mon Jun 06 2022 Peter Jones <pjones@redhat.com> - 15.6-1
- Update to shim-15.6
Resolves: CVE-2022-28737
* Wed Apr 20 2022 Peter Jones <pjones@redhat.com> - 15.5-2.el8
- Include the actual signed shim binaries.
Resolves: rhbz#1970632
Resolves: rhbz#1982071
Resolves: rhbz#2000946
Resolves: rhbz#2002265
* Tue Apr 19 2022 Peter Jones <pjones@redhat.com> - 15.5-1
- Update to shim-15.5
Resolves: rhbz#1970632
Resolves: rhbz#1982071
Resolves: rhbz#2000946
Resolves: rhbz#2002265
* Mon Sep 21 2020 Javier Martinez Canillas <javierm@redhat.com> - 15-16
- Fix an incorrect allocation size

16
sources
View File

@ -1,6 +1,12 @@
SHA512 (BOOTAA64.CSV) = 1c1bac8c2627b704e8b091d2e0c81d55a8bd7420450fe429e20efe8830fa377fdf48c51c2e658e3d0ecee491845bf5cc696ba848669dc26d23687ed5fe5efa76
SHA512 (BOOTX64.CSV) = 7ae7afa4a97243b4023f4402071fd05d7b6569a24ece961a3876aaf83ddf63c3e4be8f17042d3cbb10802eda45fd029c6574227fc5f81079e4b7d129e9011002
SHA512 (BOOTIA32.CSV) = ed7657898a04a02e299fb8b8b830d6aad6ca4c811f5ccfbd711c161d0fbc839fd3d6b13542698382c9b6ef64048b719e6fa7259b5d6155f58c0a2b852e1ec0c5
SHA512 (shimia32.efi) = d4efd625b129aa2de9e92fb31641b9780eac3292ed021ab8e477c87e848a75f151450a1c086b696f75f5639dcfd9b467ffbeea84febc034dd70700cb6f2fdbcc
SHA512 (shimx64.efi) = 647d01c8b2ce88a8ad443f7563cd031dfa4ccba1e7ed36340f2576585e715e3f7cf878cdf29080c44fd4a56166936d9c808fb47aa7a9ee0638585b719a64d97f
SHA512 (shimaa64.efi) = 01efa0b89ec26fa57c1140504528f271e7bb8a3a1cc4bad862ed2ced43e9215f7ae9840642485f82933245041248fb44fdc6e3cb142ca403662bc155cef935fa
SHA512 (shimaa64.efi) = 0457d3b9cce7bbb85eff9efd78a48f36b61a1ddf7c02cf94e7573487806133ea70d360166f088bd855b3ab09593f3179b8fd83cbf8a9e7e6271bc5a63957a5d7
SHA512 (BOOTIA32.CSV) = 149f3c07b3acffacc80f20d17033db86a0696f2db8de7e6a8e3b03a56c0a76816bab6686118c8fe4a17aa82960fccdfd095839e8c29a5b7da2f63bc86dbfc8d6
SHA512 (BOOTX64.CSV) = 3ed565c94bfc6f94136780ebbfebc0b19cb408b80e459bfece5de2e478d66605c1c7dd9f4186864cedbd420626945ae7b86e938e2d67f0163de596d05d859e0b
SHA512 (mmaa64.efi) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
SHA512 (fbaa64.efi) = cf83e1357eefb8bdf1542850d66d8007d620e4050b5715dc83f4a921d36ce9ce47d0d13c5d85f2b0ff8318d2877eec2f63b931bd47417a81a538327af927da3e
SHA512 (shimx64.efi) = 355659cae40d1d5ec9d41ff105b0b63a5a89f7bfda4cab8fe845440a90dffb3d8210ad286505b87606019adcd0a23fc0aad0779cf9b2407b061cc56de62e918b
SHA512 (fbia32.efi) = f9381cfb9ac27c059a6e81fde1b8e1cbb5db6bf36233f73a78c8d61a516172df03483dc04545ad94dea6d6d7e7a62ffef712bbf29a656104b7855488bbce13d8
SHA512 (mmia32.efi) = 3109592ea6a2b018362e5eb75c02b7754e02eb48e4df9bdff60b95d6de605bd292163a261df7095ce44382216546caeb53715a63b12e70b9a07504de23ce1bf6
SHA512 (fbx64.efi) = 026c58715e832092dfd1ee83a598a29b94f275f25622f6ebd1ee95785b3f69b5c61adec2857ddb04f0af7c9c112d6e344965453bb0d2f1f92c102a58fe88ade3
SHA512 (mmx64.efi) = 4c376a2da330705f4f857c360dfd5b8a8e44ace16674f54f2eda492ff7adb33e789535a19fadaf7cb98d6d001490f036b2c17d866c4dfa2c964f106c5a34479e
SHA512 (shimia32.efi) = 573d8397c53a2b54f2b165ea6ace2267257f3b53d58d6edc4ff094f3007ac05287d5963898f9062e08e550ed476f3aa9b42640d699312d3d00180cebef4c24a4