-
Notifications
You must be signed in to change notification settings - Fork 308
Untrusted components contained in a Trusted/Signed UKI fail to load with shim 16 #741
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
I think @ardbiesheuvel idea is to add the authenticode hash to MokListRT instead of maintaining a separate list (as implemented by #740). Not fully sure what side effects that would have on measurements though. |
That is what I suggested on the thread, and actually, what Jan is quoting here is more @vathpela's suggestion rather than mine. What I suggested before is adding a PE section to an image carrying an ephemeral extension of |
In case the implementation adds the hash to MokListRT, is the content of MokListRT measured in a PCR? |
I don't think adding it to any existing allowlist without special flagging is enough, if compatibility is the goal. To not break comaptibility we need to avoid any extra measurements. |
Is the extra measurement actually wrong though?
Not that I love breaking compatibility. |
Yeah we'd really prefer to avoid it, the UKI spec only allows a single kernel, so there's never a doubt as to what gets booted |
Is that still true with the profiles added recently? They are meant to allow multiple command lines and such, but do they explicitly outlaw multiple kernels? |
Yes, even with profiles, this is documented explicitly:
https://www.freedesktop.org/software/systemd/man/latest/systemd-stub.html#Multi-Profile%20UKIs |
Due to calling back into the loader protocol every object that's loaded ends up going through a verification. A UKI that's signed with a trusted key is loaded, but any object it contains, for example a kernel, is then validated again individually. Strictly speaking this verification is not required and will in fact result in measuring the kernel twice.
This is an issue for anyone that's building a UKI and then enrolling it in a trust differs from the contained components. Whether that's a kernel signed with a key that's not trusted in the context that the UKI is loaded in or simply an unsigned kernel.
Even just measuring the kernel twice will mean measurements for those components will change just by updating to shim 16, which is not desirable either.
Please consider if this impacts you before getting a shim 16 signed.
@ardbiesheuvel suggested we fix this by adding hashes of validated sections of a UKI to the db and then check objects that are subsequently loaded against that.
@kukrimate has prototyped a fix here: #740
The text was updated successfully, but these errors were encountered: