Script 'mail_helper' called by obssrc Hello community, here is the log from the commit of package shim for openSUSE:Factory checked in at 2021-06-15 16:37:00 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/shim (Old) and /work/SRC/openSUSE:Factory/.shim.new.32437 (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "shim" Tue Jun 15 16:37:00 2021 rev:97 rq:900009 version:15.4 Changes: -------- --- /work/SRC/openSUSE:Factory/shim/shim.changes 2021-06-02 22:10:28.152127832 +0200 +++ /work/SRC/openSUSE:Factory/.shim.new.32437/shim.changes 2021-06-15 16:37:12.693680451 +0200 @@ -1,0 +2,12 @@ +Fri Jun 4 09:22:51 UTC 2021 - Gary Ching-Pang Lin <g...@suse.com> + +- Add shim-bsc1185232-relax-loadoptions-length-check.patch to + ignore the odd LoadOptions length (bsc#1185232) + +------------------------------------------------------------------- +Fri Jun 4 07:02:03 UTC 2021 - Gary Ching-Pang Lin <g...@suse.com> + +- shim-install: reset def_shim_efi to "shim.efi" if the given + file doesn't exist + +------------------------------------------------------------------- @@ -33 +45 @@ - (bsc#1185441) + (bsc#1185441, bsc#1187071) New: ---- shim-bsc1185232-relax-loadoptions-length-check.patch ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ shim.spec ++++++ --- /var/tmp/diff_new_pack.HwiD8w/_old 2021-06-15 16:37:13.401681676 +0200 +++ /var/tmp/diff_new_pack.HwiD8w/_new 2021-06-15 16:37:13.405681684 +0200 @@ -83,6 +83,8 @@ Patch8: shim-bsc1185621-relax-max-var-sz-check.patch # PATCH-FIX-UPSTREAM shim-bsc1185261-relax-import_mok_state_check.patch bsc#1185261 g...@suse.com -- Relax the check for import_mok_state() when Secure Boot is off Patch9: shim-bsc1185261-relax-import_mok_state-check.patch +# PATCH-FIX-UPSTREAM shim-bsc1185232-relax-loadoptions-length-check.patch bsc#1185232 g...@suse.com -- Relax the check for the LoadOptions length +Patch10: shim-bsc1185232-relax-loadoptions-length-check.patch BuildRequires: dos2unix BuildRequires: mozilla-nss-tools BuildRequires: openssl >= 0.9.8 @@ -130,6 +132,7 @@ %patch7 -p1 %patch8 -p1 %patch9 -p1 +%patch10 -p1 %build # generate the vendor SBAT metadata ++++++ shim-bsc1185232-relax-loadoptions-length-check.patch ++++++ >From 795c62cb023886d39f1ee15977dc3194e01da57f Mon Sep 17 00:00:00 2001 From: Gary Lin <g...@suse.com> Date: Fri, 4 Jun 2021 17:02:31 +0800 Subject: [PATCH] shim: don't fail on the odd LoadOptions length Some firmware feeds the LoadOptions with an odd length when booting from an USB device(*). We should only skip this kind of LoadOptions, not fail it, or the user won't be able to boot the system from USB or CD-ROM. (*) https://bugzilla.suse.com/show_bug.cgi?id=1185232#c62 Signed-off-by: Gary Lin <g...@suse.com> --- shim.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/shim.c b/shim.c index c5cfbb83..dd563cf6 100644 --- a/shim.c +++ b/shim.c @@ -1411,9 +1411,16 @@ EFI_STATUS set_second_stage (EFI_HANDLE image_handle) return efi_status; } - /* Sanity check since we make several assumptions about the length */ + /* Sanity check since we make several assumptions about the length + * Some firmware feeds the following load option when booting from + * an USB device: + * + * 0x46 0x4a 0x00 |FJ.| + * + * The string is meaningless for shim and so just ignore it. + * */ if (li->LoadOptionsSize % 2 != 0) - return EFI_INVALID_PARAMETER; + return EFI_SUCCESS; /* So, load options are a giant pain in the ass. If we're invoked * from the EFI shell, we get something like this: -- 2.31.1 ++++++ shim-install ++++++ --- /var/tmp/diff_new_pack.HwiD8w/_old 2021-06-15 16:37:13.509681864 +0200 +++ /var/tmp/diff_new_pack.HwiD8w/_new 2021-06-15 16:37:13.509681864 +0200 @@ -28,7 +28,7 @@ [ ! -r /usr/etc/default/shim ] || . /usr/etc/default/shim [ ! -r /etc/default/shim ] || . /etc/default/shim -if [ -z "$def_shim_efi" ] ; then +if [ -z "$def_shim_efi" -o ! -e ${source_dir}/${def_shim_efi} ] ; then def_shim_efi="shim.efi" fi