grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Discuss support for the linux kernel's EFI Handover Protocol on x86


From: Michael Chang
Subject: Re: Discuss support for the linux kernel's EFI Handover Protocol on x86 and ARM
Date: Mon, 14 Jan 2019 17:14:21 +0800
User-agent: Mutt/1.10.1 (2018-07-13)

On Mon, Jan 14, 2019 at 08:07:34AM +0100, Ard Biesheuvel wrote:
> On Mon, 14 Jan 2019 at 05:58, Michael Chang <address@hidden> wrote:
> >
> > On Fri, Jan 11, 2019 at 10:58:54AM +0000, Leif Lindholm wrote:
> > > On Thu, Jan 10, 2019 at 09:59:38AM +0100, Alexander Graf wrote:
> > > > > Am 10.01.2019 um 09:12 schrieb Michael Chang <address@hidden>:
> > > > >
> > > > > Hi,
> > > > >
> > > > > With the advent of new verifier framework and shim lock protocol 
> > > > > support
> > > > > to the grub's community, we are driving to the world of UEFI Secure
> > > > > Boot, well, almost ..
> > > > >
> > > > > There is a missing piece in the puzzle remaining, that is booting 
> > > > > linux
> > > > > kernel via it's own EFI Handover Protocol's entry. Strictly speaking,
> > > > > the interface is not part of the UEFI Secure Boot, but we have to use 
> > > > > it
> > > > > to avoid problem of using UEFI LoadImage Protocol, which will not work
> > > > > with shim and it's Machine Owner Key (MOK) as they are not part of
> > > > > firmware's KEK and db.
> > > >
> > > > So really dumb question here: What if we didn't use the MS key? What
> > > > if instead, we just provide a SUSE/openSUSE key and give customers
> > > > the ability to sign their own grub+Linux binaries?
> > > >
> > > > Then we would only need to lobby with platform vendors to include
> > > > our public key in the delivered Keystore in parallel and everything
> > > > would "just work".
> > > >
> > > > The only reason shim needs to provide its own key management is that
> > > > on most x86 systems, we (and customers) don't have control over the
> > > > keystore, right? We can just push to not have that problem on ARM.
> > >
> > > Sure. That's a valid (and I think Ard would say preferable) decision,
> > > and should "just work" with upstream GRUB. But that's for each distro
> > > to decide.
> >
> > It will work as far as it goes. I think part of the reason shim was used
> > is that early x86 UEFI Secure Boot shipped without function to disable
> > it and also no way to enter setup mode. It is then become some sort of
> > vendor lock-in and has legal concern to the open source software like
> > grub if it gets signed to prevent from freely distributed. If ARM
> > provides setup mode and user has the freedom to manipulate on the
> > firmware stores then I think shim may not be necessary.
> >
> > > > Am I missing anything?
> >
> > As time goes by shim has also evolved to do the work than it was
> > expected originally. Here listed some of related features to consider
> > when we get rid of shim or the MOK key store it manages. I don't know
> > ARM folks consider these real issue or not, just for information.
> >
> > 1. Key revocation: To revoke a key in db would require the authenticate
> > varaible support in linux, I didn't know its status much yet. And also
> > it means each distro requires to work with vendor to get its variable
> > signed, compared with shim that each disto could revoke their key
> > indendently it brings way more complex and overhead in the process.
> >
> 
> If the distro's key is in KEK, the distro can sign revocation updates 
> directly.

Yes. Anyhow it is still new to distro, either to deliver the key to
vendor directly as KEK, or revoke them with authenticate var updates
both would require close collaboration between vendors and distro.

> 
> > 2. Some distribution may be using kernel module signing which chains to
> > the MOK store as it is easier to updat from the OS.
> >
> 
> Pardon my ignorance, but I thought MOK keys were only updatable at
> boot time? So why is it easier to update a MOK key than it is to
> update db directly?

AFAIK, MOK is copied to kernel keyring during boot time so it is
accessible during run time. The point of using MOK is that 3rd party can
just sign their kernel modules and enroll pubilc cert via the shim UI.
It doesn't require them to own any KEK to the firmware.

> 
> > 3. The Shim's fallback mode has been used to recreate boot entries after
> > firmware update for x86, not sure if that any problem for ARM.
> >
> 
> It thought fallback was a separate binary? If the distros sign that,
> there is no reason we couldn't load it straight from a Boot#### or
> PlatformRecovery#### entry.

Wouldn't those entry be lost after firmware update like all others?

And also without any boot entry firmware will pick default boot path,
that is grub may be loaded so we need to implant some logic to run
fallback.efi to recreate boot entry including 'new' default then reboot
to it. 

> 
> > >
> > > As I understand it, there was a concern with the wording in UEFI
> > > 2.(3?, 4?) that made it possible to interpret it such that only one key
> > > had to be supported.
> > >
> > > It all comes down to who wants to make sure the key is already in
> > > shipped systems..
> >
> > Do you think all vendors and distro will have to use common secure
> > channel to communicate the key distribution related issues ?
> >
> 
> Define 'secure'. I don't think the distros should be sharing any
> secrets with the vendor, but I guess they would have to establish some
> kind of trust if the any keys get installed in the factory.
> This is similar to how you get your public key hash fused into your
> silicon when you order secure parts from a silicon vendor.

True. It reminds me UEFI used to propose the Audit mode for the factory
usage, and if I remember correctly TPM is required to ensure everything
is not tampered in factory. But TBH I have lost track of it since it has
no real demand for linux distro.

Thanks,
Michael

> 
> _______________________________________________
> Grub-devel mailing list
> address@hidden
> https://lists.gnu.org/mailman/listinfo/grub-devel



reply via email to

[Prev in Thread] Current Thread [Next in Thread]