MokSBStateRT strictly inferior to /proc/sys/kernel/moksbstate_disabled

Bug #1604873 reported by Steve Langasek
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
shim-signed (Ubuntu)
Fix Released
High
Unassigned
Precise
Fix Released
High
Unassigned
Trusty
Fix Released
High
Unassigned
Wily
Fix Released
High
Unassigned
Xenial
Fix Released
High
Unassigned

Bug Description

[SRU Justification]
In some cases, incorrect locally-set EFI variables can prevent the shim-signed package from detecting that SecureBoot is active on the system. As a result, the user will not be prompted to disable SecureBoot, and will be left with non-functional dkms modules after reboot to the new kernel.

[Test case]
1. Install Ubuntu on a system (or VM) with SecureBoot enabled.
2. As root, run "printf '\x07\x00\x00\x00\x01' > /sys/firmware/efi/efivars/MokSBStateRT-605dab50-e046-4300-abb6-3dd810dd8b23".
3. Install shim-signed from -updates.
4. Install the dahdi-dkms package.
5. Confirm that you are not prompted to disable secureboot.
6. Install shim-signed from -proposed.
7. Confirm that you *are* prompted to disable secureboot.
8. Run 'sudo rm /sys/firmware/efi/efivars/MokSBStateRT-605dab50-e046-4300-abb6-3dd810dd8b23'.

[Regression potential]
Since /proc/sys/kernel/moksbstate_disabled will not be present on older kernels, and /sys/firmware/efi/efivars/MokSBStateRT-605dab50-e046-4300-abb6-3dd810dd8b23 is always less authoritative than /proc/sys/kernel/moksbstate_disabled if present, I don't see any way that this could regress.

update-secureboot-policy tries to check whether MOK's override has disabled SecureBoot state. However, since the real variable in nvram is not accessible after boot, it needs to use a proxy for this information. There are two that it tries to use:
 - We've specified how shim can mirror the MokSBState variable to MokSBStateRT at boot time, to expose this information to the OS (but this is not implemented in current shim).
 - The recent kernels which honor MokSBState also include support for exposing this value as /proc/sys/kernel/moksbstate_disabled.

Neither of these is guaranteed to be present on any given system. However, if present, the kernel variable should be *unconditionally* preferred over the efi "shadow" variable - because the kernel variable is immutable, whereas MokSBStateRT is just another nvram variable that things can overwrite (though they shouldn't).

We have heard at least one report internally of a system where something other than our shim is setting the value of MokSBStateRT and confusing update-secureboot-policy, so this will be a priority to also fix in SRU.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.18

---------------
shim-signed (1.18) yakkety; urgency=medium

  * update-secureboot-policy: If /proc/sys/kernel/moksbstate_disabled is
    present, prefer this unconditionally over MokSBStateRT. LP: #1604873.

 -- Steve Langasek <email address hidden> Wed, 20 Jul 2016 08:31:17 -0700

Changed in shim-signed (Ubuntu):
status: New → Fix Released
Steve Langasek (vorlon)
description: updated
Steve Langasek (vorlon)
description: updated
description: updated
Revision history for this message
Adam Conrad (adconrad) wrote : Please test proposed package

Hello Steve, or anyone else affected,

Accepted shim-signed into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/shim-signed/1.18~16.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in shim-signed (Ubuntu Xenial):
status: New → Fix Committed
tags: added: verification-needed
Changed in shim-signed (Ubuntu Wily):
status: New → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Steve, or anyone else affected,

Accepted shim-signed into wily-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/shim-signed/1.18~15.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in shim-signed (Ubuntu Trusty):
status: New → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Steve, or anyone else affected,

Accepted shim-signed into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/shim-signed/1.18~14.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in shim-signed (Ubuntu Precise):
status: New → Fix Committed
Revision history for this message
Adam Conrad (adconrad) wrote :

Hello Steve, or anyone else affected,

Accepted shim-signed into precise-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/shim-signed/1.18~12.04.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, and change the tag from verification-needed to verification-done. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Mathew Hodson (mhodson)
Changed in shim-signed (Ubuntu):
importance: Undecided → High
Changed in shim-signed (Ubuntu Precise):
importance: Undecided → High
Changed in shim-signed (Ubuntu Trusty):
importance: Undecided → High
Changed in shim-signed (Ubuntu Wily):
importance: Undecided → High
Changed in shim-signed (Ubuntu Xenial):
importance: Undecided → High
tags: added: verification-done-trusty
tags: removed: verification-needed
tags: added: verification-needed-precise verification-needed-wily verification-needed-xenial
tags: added: verification-done-xenial
removed: verification-needed-xenial
tags: added: verification-done-wily
removed: verification-needed-wily
tags: added: verification-done-precise
removed: verification-needed-precise
tags: added: verification-done
removed: verification-done-precise verification-done-trusty verification-done-wily verification-done-xenial
Revision history for this message
Taihsiang Ho (tai271828) wrote :

tested on 201508-18805 - Dell XPS 13 9350 - Dino 2 SKL with Xenial.
I could reproduce the test case, except that the step2 and the step8 would get "permission denied" and "operation not permitted" respectively.

Revision history for this message
Taihsiang Ho (tai271828) wrote :

tested on 201508-18805 - Dell XPS 13 9350 - Dino 2 SKL with 14.04.4.
I could reproduce the test case, except that the step2 and the step8 would get "permission denied" and "operation not permitted" respectively.
There is no prompt at step5 and there is prompt at step7.

Revision history for this message
Taihsiang Ho (tai271828) wrote :

I could not reproduce the test case on 201508-18805 - Dell XPS 13 9350 - Dino 2 SKL with Ubuntu 12.04.5.

Both of the step5 and step7 did not prompt.

I collected the log as the attachment 201508-18805-12.04.5.tar.gz, which was collected right after the step7.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.18~14.04.1

---------------
shim-signed (1.18~14.04.1) trusty; urgency=medium

  * update-secureboot-policy: If /proc/sys/kernel/moksbstate_disabled is
    present, prefer this unconditionally over MokSBStateRT. LP: #1604873.

 -- Steve Langasek <email address hidden> Wed, 20 Jul 2016 16:21:36 -0700

Changed in shim-signed (Ubuntu Trusty):
status: Fix Committed → Fix Released
Revision history for this message
Brian Murray (brian-murray) wrote : Update Released

The verification of the Stable Release Update for shim-signed has completed successfully and the package has now been released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.18~16.04.1

---------------
shim-signed (1.18~16.04.1) xenial; urgency=medium

  * update-secureboot-policy: If /proc/sys/kernel/moksbstate_disabled is
    present, prefer this unconditionally over MokSBStateRT. LP: #1604873.

 -- Steve Langasek <email address hidden> Wed, 20 Jul 2016 12:09:58 -0700

Changed in shim-signed (Ubuntu Xenial):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.18~15.10.1

---------------
shim-signed (1.18~15.10.1) wily; urgency=medium

  * update-secureboot-policy: If /proc/sys/kernel/moksbstate_disabled is
    present, prefer this unconditionally over MokSBStateRT. LP: #1604873.

 -- Steve Langasek <email address hidden> Wed, 20 Jul 2016 16:20:26 -0700

Changed in shim-signed (Ubuntu Wily):
status: Fix Committed → Fix Released
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shim-signed - 1.18~12.04.1

---------------
shim-signed (1.18~12.04.1) precise; urgency=medium

  * update-secureboot-policy: If /proc/sys/kernel/moksbstate_disabled is
    present, prefer this unconditionally over MokSBStateRT. LP: #1604873.

 -- Steve Langasek <email address hidden> Wed, 20 Jul 2016 16:22:42 -0700

Changed in shim-signed (Ubuntu Precise):
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.