systemd-stub should provide a way to be forced to use handover
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
systemd (Ubuntu) |
Won't Fix
|
Undecided
|
Unassigned | ||
Noble |
Fix Released
|
Medium
|
Nick Rosbrook | ||
Oracular |
Won't Fix
|
Undecided
|
Unassigned |
Bug Description
[Original description/Impact]
Since systemd 252, systemd-stub does LoadImage/
See origin PR: https:/
Before, it was using the "EFI handover protocol". Unfortunately kernel handover is now deprecated. Also it was only for x86, and missing some features. So upstream decided to use LoadImage/
In order to use LoadImage, it needs to be able to prevent signature verification and measurement. Because the .linux section is part of the UKI that is already signed and measured. Do that that, it overrides the functions in security architectural protocols.
Security architectural protocols are part of the platform initialization specifications. They are optional in these specifications, and the platform initialization specifications are optional by themselves. So some UEFI firmware will not support systemd-stub.
For upstream this is not really an issue. UKIs are still something new that has not been used by many distributions yet. And there is probably not that many firmware that does not support the needed features.
However, Ubuntu Core has been shipping UKIs since Ubuntu Core 20. And kernel handover has been in use by users that have firmware that do not support the needed features.
The bugs that can be caused are:
* If EFI_SECURITY2_
* If EFI_SECURITY_
Ubuntu Core 24 uses systemd-stub with LoadImage/
systemd-stub still has a fallback to handover entry point if the embedded kernel is too old to support the PE/COFF entry point. The kernel from 24.04 does support both LoadImage/
We need to be able to force systemd-stub to use handover for some of our users.
Ubuntu Core supports kernel command line changes from the gadget (since we use PCR12 as part of the PCR policies to unseal storage keys, it is safe). So it is easy to pass the information to enable handover that way. So I propose we look for the "signal" there and force handover.
Here is my proposed patch: https:/
[Test plan]
Unfortunately, because of the way the pc-kernel snap is built, we cannot trivially test changes once they land in -proposed. In order to test this ahead of time, we applied this patch in a PPA[1], and then rebuilt the kernel snap in a private PPA such that we could deploy something testable to the affected customer.
To get a full end-to-end test, we need to release the fix to -updates first so that a genuine pc-kernel snap can be built and tested by the customer.
[1] https:/
[Where problems could occur]
This patch adds logic to systemd-stub to obey a magic kernel command line. It is limited to systemd-stub, which currently is only used in Ubuntu core, so this should not have any impact on classic systems whatsoever.
By default, when the command line option is not set, no behavior should change. However, if there are problems with the command line parsing that would potentially cause problems for Ubuntu core users.
tags: | added: systemd-sru-next |
description: | updated |
description: | updated |
tags: |
added: verification-done-noble removed: verification-needed-noble |
Status changed to 'Confirmed' because the bug affects multiple users.