shim and systemd-boot when used together result in surprising behavior for me
- shim installs hooks only if vendor cert or vendor dbx is compiled in
- systemd-boot relies on hooks and does not call
SHIM_LOADER_PROTOCOL->LoadImage.
- I intended to use shim without vendor cert (only for the sake of SBAT as a rollback protection mechanism)
Putting together everything, this has the effect that systemd-boot happily loads UKIs that should actually be revoked by my custom SBAT entries. Because, no hook, means LoadImage goes straight to UEFI, means no SBAT check by shim.
Asking at systemd, @bluca said that systemd-boot works as intended and that providers of shim are expected to ensure it functions correctly.
Which currently translates to "you have to build with a vendor cert".
Could shim do something about it, e.g. remove that if (vendor_authorized_size || vendor_deauthorized_size) guard?
If both shim and systemd stick to works-as-intended, it would be good to document the intended configuration. Something like "don't build shim without vendor cert, it may bypass some security checks".
shim and systemd-boot when used together result in surprising behavior for me
SHIM_LOADER_PROTOCOL->LoadImage.Putting together everything, this has the effect that systemd-boot happily loads UKIs that should actually be revoked by my custom SBAT entries. Because, no hook, means LoadImage goes straight to UEFI, means no SBAT check by shim.
Asking at systemd, @bluca said that systemd-boot works as intended and that providers of shim are expected to ensure it functions correctly.
Which currently translates to "you have to build with a vendor cert".
Could shim do something about it, e.g. remove that
if (vendor_authorized_size || vendor_deauthorized_size)guard?If both shim and systemd stick to works-as-intended, it would be good to document the intended configuration. Something like "don't build shim without vendor cert, it may bypass some security checks".