[personal profile] mjg59
The plan for supporting UEFI Secure Boot in Fedora is still pretty much as originally planned, but it's dependent upon building a binary which has the Fedora key embedded, and then getting that binary signed by Microsoft. Easy enough for us to do, but not necessarily practical for smaller distributions. There's a few possible solutions for them.

  • Require that Secure Boot be disabled

    Not ideal. The UI for doing this is going to vary significantly between machines, making it difficult to document. It also means that the security benefits of Secure Boot are lost.

  • Require that the machine be placed in Setup Mode

    Clearing the enrolled Platform Key results in the system transitioning into Setup Mode, and from then on new keys can be enrolled into the key database until a new Platform Key is enrolled. Distributions could ship an unsigned bootloader that then writes the distribution keys into the database - James Bottomley has an example here. This means that the distribution can still benefit from Secure Boot, but otherwise has the same downside that the UI for doing this will vary between machines.

  • Ship with a signed bootloader that can add keys to its own database

    This is more interesting. Suse's bootloader design involves the bootloader having its own key database, distinct from those provided by the UEFI specification. The bootloader will execute any second stage bootloaders signed with a key in that database. Since the bootloader is in charge of its own key enrolment, the bootloader is free to impose its own policy - including enrolling new keys off a filesystem.

I've taken Suse's code for key management and merged it into my own shim tree with a few changes. The significant difference is a second stage bootloader signed with an untrusted key will cause a UI to appear, rather than simply refusing to boot. This will permit the user to then navigate the available filesystems, choose a key and indicate that they want to enrol it. From then on, the bootloader will trust binaries signed with that key.

Distributions are then able to take an existing signed copy of shim and put it on their install media, along with a file containing their key. If a user attempts to boot then the boot will fail because the second stage bootloader isn't signed with a trusted key, but the user can then use the navigator and select the distribution's key file. After providing confirmation and rebooting, the second stage bootloader's signature will now be recognised and the installer will boot.

This has the advantage over the first two options that the UI is consistent, making it easier to document the install process. The primary disadvantage is that the distribution won't be able to rebuild shim and will have to ship a pre-compiled binary. This may well be unacceptable to distributions like Debian, but should still provide a viable approach for other distributions who are either unwilling or unable to deal with Microsoft themselves.

Remove Microsoft/other keys from shim?

Date: 2012-10-07 11:53 pm (UTC)
From: (Anonymous)
Is it possible for the shim layer to remove Microsoft's or other keys? That would be nice for those of us who view Windows as malware.

Re: Remove Microsoft/other keys from shim?

Date: 2012-10-08 09:13 am (UTC)
From: [identity profile] http://apebox.org/wordpress/
Remember that device firmware (e.g. your video card's BIOS) must also be signed by a valid key with Secure Boot. And that is going to be Microsoft's key in every practical case. So purging Microsoft's key means losing hardware support, unless you turn off Secure Boot.

Re: Remove Microsoft/other keys from shim?

From: (Anonymous) - Date: 2012-10-08 02:09 pm (UTC) - Expand

Re: Remove Microsoft/other keys from shim?

From: (Anonymous) - Date: 2012-10-09 12:49 am (UTC) - Expand

Re: Remove Microsoft/other keys from shim?

From: (Anonymous) - Date: 2012-12-01 09:52 am (UTC) - Expand

There is still a fundamental problem here!

Date: 2012-10-08 10:54 am (UTC)
From: (Anonymous)
However you workaround this there remains a fundamental problem and that is "How has the situation been allowed to arise that Microsoft is the single signing authority for Securely-booted systems?".

If there is no way for a user to disable Secure Boot then they are entirely at the mercy of Microsoft in even being able to start their computers. This is monopolistic practice at its worst and should be fought strongly.

Re: There is still a fundamental problem here!

Date: 2012-10-09 12:50 am (UTC)
From: (Anonymous)
"How has the situation been allowed to arise that Microsoft is the single signing authority for Securely-booted systems?"

The answer is very simple: no-one else wants to do it. Microsoft has done nothing to stop anyone else acting as a signing authority. No-one else has expressed any interest in being one. Or at least, not a public one. I guess Apple might implement SB and self-sign their own stuff. Who knows, they're Apple.

Thanks

Date: 2012-10-08 11:57 am (UTC)
From: (Anonymous)
Thank you for this, as one of the smaller distribution builders I want you to know that we really appreciate the time you have spent considering us.

-Andrew, Fuduntu

UEFI secure boot won't work

Date: 2012-10-08 01:28 pm (UTC)
From: (Anonymous)
Debian user reporting. I think UEFI secure boot won't work in the long run. Soon, malware writers will find a way around it, and it will just hurt legimate users wanting to use Linux, similar to ISPs blocking servers just because it was used to send spam, even when I want to run a server from home.

And should the Linux community build an completely open source computer, without restrictions like these?

Re: UEFI secure boot won't work

From: (Anonymous) - Date: 2012-10-08 03:01 pm (UTC) - Expand

Re: UEFI secure boot won't work

From: (Anonymous) - Date: 2012-10-08 05:04 pm (UTC) - Expand

Re: UEFI secure boot won't work

From: (Anonymous) - Date: 2012-10-08 05:41 pm (UTC) - Expand

Re: UEFI secure boot won't work

From: (Anonymous) - Date: 2012-10-12 08:31 am (UTC) - Expand

Date: 2012-10-08 03:33 pm (UTC)
From: (Anonymous)
What about signed bootloader that generates hash like graphical image plus text, next to kernel/bootloader name, to help user identify changes? To me it looks much more userful.

Date: 2012-10-08 05:19 pm (UTC)
damerell: NetHack. (normal)
From: [personal profile] damerell
SuSE's shim sounds like the least worst option.

Date: 2012-10-08 07:57 pm (UTC)
From: (Anonymous)
But secure boot is still a bad technology.

(no subject)

From: [personal profile] damerell - Date: 2012-10-08 08:18 pm (UTC) - Expand

Why?

Date: 2012-10-08 09:55 pm (UTC)
From: (Anonymous)
I mean: why didn't you say or do that earlier?

This is great news for Very Small Or Even Ultimately Tiny Distributions. If I can also load Nvidia drivers I will stop bitching about secure boot.

I'll start again if Microsoft won't sign, it will blacklist it immediately, firmware will include some unexpected stuff...

What about revokation?

Date: 2012-10-09 08:00 am (UTC)
From: (Anonymous)
I'm afraid that a first-stage bootloader capable of loading whatever it fits appropiate by its own keyring will be deemed inappropiate by Microsoft policy and have ultimately its signature revoked.

Re: What about revokation?

From: (Anonymous) - Date: 2012-10-11 08:56 am (UTC) - Expand

Date: 2012-10-09 11:49 am (UTC)
From: (Anonymous)
Why don't all the major Linux vendors sue Microsoft for secure boot? It's probably anti-competitive behavior.

(no subject)

From: (Anonymous) - Date: 2012-10-09 04:11 pm (UTC) - Expand

(no subject)

From: (Anonymous) - Date: 2012-10-09 04:55 pm (UTC) - Expand

Status of SuSE's plan

Date: 2012-10-10 04:55 am (UTC)
From: (Anonymous)
So what's the status on Microsoft's approval of SuSE's plan? Presumably we're waiting on them to say "yes, we'll sign the shim", but I can't find any information on it.

Date: 2012-10-10 09:49 am (UTC)
From: (Anonymous)
Is it such a big deal? Pay 99$ to MS, sign your bootloader and all problems solved. 99$ per year is not a big load of money even for small distributions.

Date: 2012-10-10 11:36 am (UTC)
From: (Anonymous)
It's a $99 one time fee.
Apple charges $99 to allow developers put their iPhone apps in the app store. Small developers have a problem with this fee.

(no subject)

From: (Anonymous) - Date: 2012-10-10 11:42 am (UTC) - Expand

MS's $99 way already available?

Date: 2012-10-26 11:27 am (UTC)
From: (Anonymous)
Hi, The only one way I found is the MS's sysdev (HW) website to sign it, but there should be another way or website. Is there a official way to contact with MS for "$99 sign"?

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-29 01:40 am (UTC) - Expand

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-29 03:24 am (UTC) - Expand

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-30 05:03 am (UTC) - Expand

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-30 12:39 pm (UTC) - Expand

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-31 02:55 am (UTC) - Expand

Re: MS's $99 way already available?

From: (Anonymous) - Date: 2012-10-31 05:34 am (UTC) - Expand

Rebuilding the shim

Date: 2012-10-10 11:20 pm (UTC)
From: [identity profile] patscomputerservices.myopenid.com
In the article, you say that the major disadvantage is that the shim cannot be rebuilt. Is that because you have to pre-sign the shim with all keys, so the first stage bootloader will accept it?

Also, would the distributor have to create keys for all versions of their distro? For example (using Ubuntu since they have multiple "distros"), would Canonical have to create a key for "Ubuntu", a key for "Kubuntu", a key for "Edubuntu", a key for "Lubuntu", and a key for "Xubuntu"? Or would the one key cover all binaries--as they are all based on the same foundation?

Have a great day:)
Patrick.

Re: Rebuilding the shim

From: [personal profile] cjwatson - Date: 2012-10-16 08:41 am (UTC) - Expand

Date: 2012-10-13 12:45 am (UTC)
From: (Anonymous)
> Clearing the enrolled Platform Key results in the system transitioning into Setup Mode, and from then on new keys can be enrolled into the key database until a new Platform Key is enrolled.

Is this actually the case? OVMF does not require clearing the PK before enrolling KEK/DB certificates and keys. See Secure Boot instructions (http://dee.su/liberte-install) for Liberté Linux.

Acceptability to distributions like Debian

Date: 2012-10-24 07:59 pm (UTC)
From: (Anonymous)
Debian ships some binaries it does not rebuild, for example in the firmware-free package. As long as the code satisfies their free software guidelines, I suspect they'd be able to ship shim.

Which licenze do you use for shim?

Date: 2012-12-03 11:24 pm (UTC)
From: (Anonymous)
Hello which licence are you use for shim?
I can find this information on this site.
Thank you for information!

Profile

Matthew Garrett

About Matthew

Power management, mobile and firmware developer on Linux. Security developer at Nebula. Member of the Linux Foundation Technical Advisory Board. Ex-biologist. @mjg59 on Twitter. Content here should not be interpreted as the opinion of my employer.

Expand Cut Tags

No cut tags