Bug 1686697

Summary: shim-x64 fails to load embedded key onto MokListRT when MokList empty; kdump service can't start when secure boot enabled
Product: Red Hat Enterprise Linux 8 Reporter: Lenny Szubowicz <lszubowi>
Component: shimAssignee: Bootloader engineering team <bootloader-eng-team>
Status: CLOSED DUPLICATE QA Contact: Release Test Team <release-test-team-automation>
Severity: urgent Docs Contact:
Priority: unspecified    
Version: 8.0CC: fmartine, wangdawei18
Target Milestone: rcFlags: pm-rhel: mirror+
Target Release: 8.0   
Hardware: x86_64   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-05-27 13:14:51 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lenny Szubowicz 2019-03-08 03:16:24 UTC
Description of problem:

This is very likely the RHEL8.0 manifestation of RHEL7.6 BZ 1659270

https://bugzilla.redhat.com/show_bug.cgi?id=1649270 contains a more detailed discussion of the problem.

The symptoms on RHEL8.0 are exactly the same although the shim versions are not exactly the same:

When the MokList is empty, shim fails to copy any embedded public keys it has onto the MokListRT.

When Secure Boot is enabled with a production signed kernel, this shim embedded public key is needed to authenticate the loading of the kdump kernel. Therefore, because it's missing, the kdump service fails to start.

This problem wasn't detected until the RHEL8.0 nightly build 20190307 with  kernel-4.18.0-76.el8.x86_64, which was probably the first one signed by the Red Hat Secure Boot (CA key 1). Earlier builds required a Beta or Test key on the MokList to test Secure Boot, so they didn't expose this problem.


Version-Release number of selected component (if applicable):

shim-x64-15-5.x86_64


Steps to Reproduce:
1. Install nightly build 20190307.n.0 or newer
2. Make sure MokList is empty, e.g. # moktutil --reset
3. Reboot with UEFI secure boot enabled

Actual results:

The kernel will complain about an empty MokListRT
The kdump service will fail to start

Additional info:

RHEL8.0 shim-x64-15-5.x86_64 is newer than RHEL 7.6 shim-x64-15-1.el7.x86_64
and I didn't check the shim-x64-15-5.x86_64 source to verify that it still has that exact same problem diagnosed in BZ 1649270.

Similar to BZ 1649270, there is an effective work-around that enables kdump to start correctly with secure boot enabled;

 # moklist --import /usr/share/doc/kernel-keys/$(uname -r)/kernel-signing-ca.cer

Comment 1 Lenny Szubowicz 2019-11-13 18:32:03 UTC
I've noticed that this problem appears to have been resolved in RHEL 8.1. Probably means that this BZ can be closed.

                            -Lenny.

Comment 2 Javier Martinez Canillas 2020-05-27 13:14:51 UTC
(In reply to Lenny Szubowicz from comment #1)
> I've noticed that this problem appears to have been resolved in RHEL 8.1.
> Probably means that this BZ can be closed.
> 
>                             -Lenny.

Indeed, this is duplicate of Bug #1668966 that was fixed in shim-15-6.

*** This bug has been marked as a duplicate of bug 1668966 ***