always call mokutil with --timeout -1 when enrolling dkms keys
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
shim-signed (Ubuntu) |
Fix Released
|
Undecided
|
Unassigned | ||
Xenial |
Fix Released
|
Undecided
|
Unassigned | ||
Bionic |
Fix Released
|
Undecided
|
Unassigned | ||
Eoan |
Won't Fix
|
Undecided
|
Unassigned | ||
ubiquity (Ubuntu) |
Fix Released
|
High
|
Unassigned |
Bug Description
[SRU Justification]
The version of MokManager currently in all releases supports a MokTimeout variable, which can be set with mokutil --timeout, to control how long MokManager waits for input instead of having a hard-coded timeout of 10 seconds.
If the timeout is reached on boot with no input, MokManager clears the MOK requests and passes control back to shim, which falls back to booting the OS.
So if you miss seeing MokManager on boot, you have to restart the key enrollment process from the OS and reboot again.
When we are invoking mokutil automatically on behalf of the user as part of key generation for dkms modules, we should disable the timeout. We should never leave the user with broken dkms modules on the system because they were looking away from the console at the wrong point in time during a reboot.
[Test case]
1. On a system with SecureBoot enabled, install the virtualbox-dkms package.
2. Set a password to use for MOK enrollment.
3. Reboot.
4. Observe that there is a countdown on MokManager. Let the timer expire.
5. Install the shim-signed package from -proposed.
6. Purge the virtualbox-dkms and dkms packages.
7. sudo rm -rf /var/lib/
8. Repeat steps 1 through 3.
9. Observe that there is no countdown on MokManager, and that it waits indefinitely for input (confirm that this is the case by sitting at the screen for at least 1 minute).
[Regression potential]
If a wrong version of mokutil is called with this additional argument and doesn't support it and as a result mokutil fails, this could result in users not having their MOK enrolled who otherwise would have.
This prevents systems which have a pending MOK enrollment due to dkms from rebooting unattended back to Ubuntu. If anyone is automating configuration of dkms/shim, during an install or otherwise, and expecting the system to reboot back to Ubuntu without intervention at the console, this will stop working. However, such a system is broken with respect to dkms modules and SecureBoot anyway; the user should either not install dkms modules, or plan for handling the MOK request at the console (serial console or otherwise) on the next reboot.
If the user does not have console access to the system but does have power access, they can still bypass MokManager by power cycling the system, again giving them a system which is booted but does not properly support the dkms modules under SecureBoot.
Related branches
- Ubuntu Core Development Team: Pending requested
-
Diff: 1637 lines (+1444/-0) (has conflicts)24 files modifiedCanonicalMasterCA.crt (+25/-0)
Makefile (+39/-0)
MicCorUEFCA2011_2011-06-27.crt (+35/-0)
debian/bzr-builddeb.conf (+2/-0)
debian/changelog (+424/-0)
debian/control (+24/-0)
debian/copyright (+9/-0)
debian/lintian-overrides (+1/-0)
debian/po (+1/-0)
debian/real-po/POTFILES.in (+1/-0)
debian/real-po/templates.pot (+110/-0)
debian/rules (+30/-0)
debian/shim-signed.dirs (+2/-0)
debian/shim-signed.install (+7/-0)
debian/shim-signed.links (+1/-0)
debian/shim-signed.postinst (+100/-0)
debian/shim-signed.postrm (+10/-0)
debian/shim-signed.triggers (+1/-0)
debian/source/format (+4/-0)
debian/source_shim-signed.py (+58/-0)
debian/templates (+53/-0)
download-signed (+183/-0)
openssl.cnf (+27/-0)
update-secureboot-policy (+297/-0)
- Ubuntu Installer Team: Pending requested
-
Diff: 28 lines (+8/-1)2 files modifieddebian/changelog (+7/-0)
scripts/simple-plugins (+1/-1)
- Jean-Baptiste Lallement: Approve
-
Diff: 27 lines (+8/-0)2 files modifieddebian/changelog (+7/-0)
scripts/simple-plugins (+1/-0)
description: | updated |
Changed in ubiquity (Ubuntu Eoan): | |
status: | New → Won't Fix |
Changed in shim-signed (Ubuntu Bionic): | |
status: | New → In Progress |
Changed in shim-signed (Ubuntu): | |
status: | New → Fix Committed |
description: | updated |
description: | updated |
no longer affects: | ubiquity (Ubuntu Eoan) |
no longer affects: | ubiquity (Ubuntu Bionic) |
no longer affects: | ubiquity (Ubuntu) |
Changed in ubiquity (Ubuntu): | |
status: | New → Triaged |
importance: | Undecided → High |
Changed in ubiquity (Ubuntu): | |
status: | Triaged → Fix Committed |
This bug was fixed in the package shim-signed - 1.40
---------------
shim-signed (1.40) focal; urgency=medium
* Pass --timeout -1 to mokutil so that users don't end up with broken
systems by missing MokManager on reboot after install. LP: #1856422.
* Add a versioned dependency on the mokutil that introduces --timeout.
-- Steve Langasek <email address hidden> Sat, 14 Dec 2019 20:26:42 -0800