Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
*** Description of problem:
The EnrollListOfX509Certs() function reaches the first
EFI_ERROR (Status)
check without Status being ever initialized or assigned, if the first (= size computation) loop before it succeeds. This is undefined behavior, as Status has automatic storage duration, and at this point, indeterminate value.
The issue has never been experienced in practice before, but Ard's upstream edk2 work to enable gcc -O2 optimization for X64 has exposed it:
http://thread.gmane.org/gmane.comp.bios.edk2.devel/14615/focus=14706
Given that EnrollDefaultKeys.efi is downstream-only (although Open Source, of course), we have to fix this in downstream; no rebase will fix it for us.
I'll also send Gerd an updated (squashed) patch for EnrollDefaultKeys.efi, for his own personal RPMs, and for the Fedora package.
*** Version-Release number of selected component (if applicable):
ovmf-20160608-2.git988715a.el7
*** How reproducible:
Not reproducible unless built with Ard's upstream build infrastructure changes.
*** Actual results:
EnrollDefaultKeys.efi reports an error even when it should succeed:
info: SetupMode=1 SecureBoot=0 SecureBootEnable=1 CustomMode=1 VendorKeys=0
error: EnrollListOfX509Certs("db",
D719B2CB-3D3A-4596-A3BC-DAD00E67656F): Invalid Parameter
*** Expected results:
info: SetupMode=1 SecureBoot=0 SecureBootEnable=1 CustomMode=1 VendorKeys=0
info: SetupMode=0 SecureBoot=1 SecureBootEnable=1 CustomMode=0 VendorKeys=0
info: success
*** Additional info:
Sanity testing (key enrollment, Secure Boot verification) suffices for testing. (Already part of QE's OVMF test plan.)
Comment 2Miroslav Rezanina
2016-08-04 11:48:48 UTC
Test it in OVMF Function test, no problem exist with OVMF SB.
Verified Version:
Kernel version:3.10.0-504.el7.x86_64
qemu-kvm-rhev version:qemu-kvm-rhev-2.6.0-22.el7.x86_64
OVMF version:OVMF-20160608-3.git988715a.el7.noarch
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory, and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://rhn.redhat.com/errata/RHBA-2016-2608.html