Bug 1297273 - MokManager.efi fails to enroll MOK public keys at boot.
MokManager.efi fails to enroll MOK public keys at boot.
Status: NEW
Product: Fedora
Classification: Fedora
Component: shim (Show other bugs)
25
x86_64 Linux
unspecified Severity high
: ---
: ---
Assigned To: Matthew Garrett
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-10 23:16 EST by Juan A. Burgos
Modified: 2017-03-13 11:25 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-12-20 12:46:31 EST
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Juan A. Burgos 2016-01-10 23:16:45 EST
Description of problem:

MokManager.efi fails to enroll public keys added with "mokutil --import key.der".
Mokmanager.efi ask to import the key after reboot, but key is not imported anyway. 


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

$ rpm -q shim mokutil openssl
shim-0.8-8.x86_64
mokutil-0.2.0-3.fc23.x86_64
openssl-1.0.2e-3.fc23.x86_64

How reproducible:

Always, several tries with different keys has been performed.

Steps to Reproduce:
1. Generate a key pair with openssl
2. Import key with "mokutil --import"
3. Verify key is pending to import looking at /sys/firmware/efi/efivars/MokNew-XXX...
4. Reboot
5. Use MokManager.efi interface to import pending key.
6. Reboot
7. Use "keyctl list %:.system_keyring" to view current public keys in keyring.

Actual results:

Four public keys listed

# keyctl list %:.system_keyring
4 keys in keyring:
893647049: ---lswrv     0     0 asymmetric: Fedora kernel signing key: 89ceaf5380b1d1504056cb00aa3c46346beb2e05
 49271380: ---lswrv     0     0 asymmetric: Fedora Secure Boot CA: fde32599c2d61db1bf5807335d7b20e4cd963b42
164585263: ---lswrv     0     0 asymmetric: Microsoft Corporation UEFI CA 2011: 13adbf4309bd82709c8cd54f316ed522988a1bd4
757346961: ---lswrv     0     0 asymmetric: Microsoft Windows Production PCA 2011: a92902398e16c49778cd90f99e4f9ae17c55af53



Expected results:

Five public keys listed, the previous ones plus the one we wish to import.


Additional info:

Hardware HP Zbook 15 G2, latest firmware:

# dmidecode |grep 'BIOS Rev'
	BIOS Revision: 1.12

As no MOK key could be imported, no custom module can be loaded into kernel with secureboot enabled until this is solved.
Comment 1 Juan A. Burgos 2016-01-10 23:21:53 EST
# tree /boot/efi/
/boot/efi/
├── EFI
│   ├── BOOT
│   │   ├── BOOTX64.EFI
│   │   └── fallback.efi
│   └── fedora
│       ├── BOOT.CSV
│       ├── fonts
│       │   └── unicode.pf2
│       ├── fw
│       ├── fwupx64.efi
│       ├── gcdx64.efi
│       ├── grub.cfg
│       ├── grubenv
│       ├── grubx64.efi
│       ├── MokManager.efi
│       ├── shim.efi
│       └── shim-fedora.efi
├── mach_kernel
└── System
    └── Library
        └── CoreServices
            └── SystemVersion.plist
Comment 2 todd 2016-06-13 21:30:12 EDT
I'm having the same issue. Cant import keys using mokutil --import.
Seems pretty much all functions of mokutil are not working.

fedora 23 
kernel = 4.5.6-200.fc23.x86_64
shim-0.8-8.x86_64
mokutil-0.2.0-3.fc23.x86_64
Comment 3 Fedora End Of Life 2016-11-24 09:50:10 EST
This message is a reminder that Fedora 23 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 23. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '23'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora 23 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora, you are encouraged  change the 'version' to a later Fedora 
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 4 Fedora End Of Life 2016-12-20 12:46:31 EST
Fedora 23 changed to end-of-life (EOL) status on 2016-12-20. Fedora 23 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 5 Knut J BJuland 2016-12-21 01:51:50 EST
mokutil --import public_key.der 
input password: 
input password again: 
Failed to enroll new keys


This is with fedora 25.
Comment 6 Juan A. Burgos 2016-12-21 07:14:37 EST
Still present in fedora 25.
Comment 7 Knut J BJuland 2017-03-13 10:23:47 EDT
duplicate of 1406868
Comment 8 Juan A. Burgos 2017-03-13 11:25:48 EDT
(In reply to Knut J BJuland from comment #7)
> duplicate of 1406868

1406868 could be a duplicate of this, but not the way around as this predates the other in about a year.

Note You need to log in before you can comment on or make changes to this bug.