Matthew Garrett ([personal profile] mjg59) wrote,
@ 2012-05-30 11:11 pm UTC
Entry tags:advogato, fedora
Edit 16:17EDT 31/5/12: Clarification of who gets the $99
Edit 02:10EDT 01/6/12: Clarification that it's a one-off payment

(Brief disclaimer - while I work for Red Hat, I'm only going to be talking about Fedora here. Anything written below represents only my opinions and my work on Fedora, not Red Hat's opinions or future plans)

Fedora 17 was released this week. It's both useful and free, and serves as a welcome addition to any family gathering. Do give it a go. But it's also noteworthy for another reason - it's the last Fedora release in the pre-UEFI secure boot era. Fedora 18 will be released at around the same time as Windows 8, and as previously discussed all Windows 8 hardware will be shipping with secure boot enabled by default. While Microsoft have modified their original position and all x86 Windows machines will be required to have a firmware option to disable this or to permit users to enrol their own keys, it's not really an option to force all our users to play with hard to find firmware settings before they can run Fedora. We've been working on a plan for dealing with this. It's not ideal, but of all the approaches we've examined we feel that this one offers the best balance between letting users install Fedora while still permitting user freedom.

Getting the machine booted


Most hardware you'll be able to buy towards the end of the year will be Windows 8 certified. That means that it'll be carrying a set of secure boot keys, and if it comes with Windows 8 pre-installed then secure boot will be enabled by default. This set of keys isn't absolutely fixed and will probably vary between manufacturers, but anything with a Windows logo will carry the Microsoft key[1].

We explored the possibility of producing a Fedora key and encouraging hardware vendors to incorporate it, but turned it down for a couple of reasons. First, while we had a surprisingly positive response from the vendors, there was no realistic chance that we could get all of them to carry it. That would mean going back to the bad old days of scouring compatibility lists before buying hardware, and that's fundamentally user-hostile. Secondly, it would put Fedora in a privileged position. As one of the larger distributions, we have more opportunity to talk to hardware manufacturers than most distributions do. Systems with a Fedora key would boot Fedora fine, but would they boot Mandriva? Arch? Mint? Mepis? Adopting a distribution-specific key and encouraging hardware companies to adopt it would have been hostile to other distributions. We want to compete on merit, not because we have better links to OEMs.

An alternative was producing some sort of overall Linux key. It turns out that this is also difficult, since it would mean finding an entity who was willing to take responsibility for managing signing or key distribution. That means having the ability to keep the root key absolutely secure and perform adequate validation of people asking for signing. That's expensive. Like millions of dollars expensive. It would also take a lot of time to set up, and that's not really time we had. And, finally, nobody was jumping at the opportunity to volunteer. So no generic Linux key.

The last option wasn't hugely attractive, but is probably the least worst. Microsoft will be offering signing services through their sysdev portal. It's not entirely free (there's a one-off $99 fee to gain access edit: The $99 goes to Verisign, not Microsoft - further edit: once paid you can sign as many binaries as you want), but it's cheaper than any realistic alternative would have been. It ensures compatibility with as wide a range of hardware as possible and it avoids Fedora having any special privileges over other Linux distributions. If there are better options then we haven't found them. So, in all probability, this is the approach we'll take. Our first stage bootloader will be signed with a Microsoft key.

Bootloaders


We've decided to take a multi-layer approach to our signing for a fairly simple reason. Signing through the Microsoft signing service is a manual process, and that's a pain. We don't want to have bootloader updates delayed because someone needs to find a copy of Internet Explorer and a smartcard and build packages by hand. Instead we're writing a very simple bootloader[2]. This will do nothing other than load a real bootloader (grub 2), validate that it's signed with a Fedora signing key and then execute it. Using the Fedora signing key there means that we can build grub updates in our existing build infrastructure and sign them ourselves. The first stage bootloader should change very rarely, and we don't envisage updating it more than once per release cycle. It shouldn't be much of a burden on release management.

What about grub? We've already switched Fedora 18 over to using grub 2 by default on EFI systems, but it still needs some work before it's ready for secure boot. The first thing is that we'll be disabling the module loading. Right now you can load arbitrary code into grub 2 at runtime, and that defeats the point of secure boot. So that'll be disabled. Next we'll be adding support for verifying that the kernel it's about to boot is signed with a trusted key. And finally we'll be sanitising the kernel command line to avoid certain bits of functionality that would permit an attacker to cause even a signed kernel to launch arbitrary code. These restrictions will all vanish if secure boot is disabled.

Kernel


Secure boot is built on the idea that all code that can touch the hardware directly is trusted, and any untrusted code must go through the trusted code. This can be circumvented if users can execute arbitrary code in the kernel. So, we'll be moving to requiring signed kernel modules and locking down certain aspects of kernel functionality. The most obvious example is that it won't be possible to access PCI regions directly from userspace, which means all graphics cards will need kernel drivers. Userspace modesetting will be a thing of the past. Again, disabling secure boot will disable these restrictions.

Signed modules are obviously troubling from a user perspective. We'll be signing all the drivers that we ship, but what about out of tree drivers? We don't have a good answer for that yet. As before, we don't want any kind of solution that works for us but doesn't work for other distributions. Fedora-only or Ubuntu-only drivers are the last thing anyone wants, and this really needs to be handled in a cross-distribution way.

Wait signed what


Secure boot is designed to protect against malware code running before the operating system. This isn't a hypothetical threat. Pre-boot malware exists in the wild, and some of it is nastier than you expect. So obviously bootloaders need to be signed, since otherwise you'd just replace the signed bootloader with an unsigned one that installed malware and booted your OS.

But what about the kernel? The kernel is just code. If I take a signed Linux bootloader and then use it to boot something that looks like an unsigned Linux kernel, I've instead potentially just booted a piece of malware. And if that malware can attack Windows then the signed Linux bootloader is no longer just a signed Linux bootloader, it's a signed Windows malware launcher and that's the kind of thing that results in that bootloader being added to the list of blacklisted binaries and suddenly your signed Linux bootloader isn't even a signed Linux bootloader. So kernels need to be signed.

And modules? Again, modules are just code. It's a little trickier, but if your signed kernel loads an unsigned module then that unsigned module can set up a fake UEFI environment and chain into a compromised OS bootloader. Now the attacker just has to include a signed kernel and a minimal initramfs that loads their malware module. It'd slow down boot by a couple of seconds, but other than that it'd be undetectable. X? If you can access the registers on a GPU then you can get the GPU to DMA over the kernel and execute arbitrary code. Trickier again, but still achievable - and if you've locked down every other avenue of attack, it's even attractive.

If we produce signed code that can be used to attack other operating systems then those other operating systems are justified in blacklisting us. That doesn't seem like a good outcome.

Customisation


A lot of our users want to build their own kernels. Some even want to build their own distributions. Signing our bootloader and kernel is an impediment to that. We'll be providing all the tools we use for signing our binaries, but for obvious reasons we can't hand out our keys. There's three approaches here. The first is for a user to generate their own key and enrol it in their system firmware. We'll trust anything that's signed with a key that's present in the firmware. The second is to rebuild the shim loader with their own key installed and then pay $99 and sign that with Microsoft. That means that they'll be able to give copies to anyone else and let them install it without any fiddling. The third is to just disable secure boot entirely, at which point the machine should return to granting the same set of freedoms as it currently does.

But I don't trust Microsoft


A system in custom mode should allow you to delete all existing keys and replace them with your own. After that it's just a matter of re-signing the Fedora bootloader (like I said, we'll be providing tools and documentation for that) and you'll have a computer that will boot Fedora but which will refuse to boot any Microsoft code. It may be a little more awkward for desktops because you may have to handle the Microsoft-signed UEFI drivers on your graphics and network cards, but this is also solvable. I'm looking at ways to implement a tool to allow you to automatically whitelist the installed drivers. Barring firmware backdoors, it's possible to configure secure boot such that your computer will only run software you trust. Freedom means being allowed to run the software you want to run, but it also means being able to choose the software you don't want to run.

You've sold out


We've been working on this for months. This isn't an attractive solution, but it is a workable one. We came to the conclusion that every other approach was unworkable. The cause of free software isn't furthered by making it difficult or impossible for unskilled users to run Linux, and while this approach does have its downsides it does also avoid us ending up where we were in the 90s. Users will retain the freedom to run modified software and we wouldn't have accepted any solution that made that impossible.

But is this a compromise? Of course. There's already inequalities between Fedora and users - trademarks prevent the distribution of the Fedora artwork with modified distributions, and much of the Fedora infrastructure is licensed such that some people have more power than others. This adds to that inequality. It's not the ideal outcome for anyone, and I'm genuinely sorry that we weren't able to come up with a solution that was better. This isn't as bad as I feared it would be, but nor is it as good as I hoped it would be.

What about ARM


Microsoft's certification requirements for ARM machines forbid vendors from offering the ability to disable secure boot or enrol user keys. While we could support secure boot in the same way as we plan to on x86, it would prevent users from running modified software unless they paid money for a signing key. We don't find that acceptable and so have no plans to support it.

Thankfully this shouldn't be anywhere near as much of a problem as it would be in the x86 world. Microsoft have far less influence over the ARM market, and the only machines affected by this will be the ones explicitly designed to support Windows. If you want to run Linux on ARM then there'll be no shortage of hardware available to you.

Is this all set in stone?


No. We've spent some time thinking about all of this and are happy that we can implement it in the Fedora 18 timescale, but there's always the possibility that we've missed something or that a new idea will come up. If we can increase user freedom without making awful compromises somewhere else then we'll do it.

[1] In fact, chances are that everything will carry the Microsoft key. Secure boot requires that UEFI drivers also be signed. The signing format only permits a single signature per binary. For compatibility, approximately all add-on hardware shipped will be signed with Microsoft's key, and that means that all system vendors have to recognise Microsoft's key in order to permit that hardware to run on their systems.
[2] Current source is here. It relies on a port of the UEFI crypto library and OpenSSL that I have building with some handholding, and which I'll upload as soon as possible.


Page 4 of 14

<<   [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
[11] [12] [13] [14]
  >>

(346 comments) - (Post a new comment)
(Threaded) (Top-level comments only)

Re: list of kernel restrictions?


[personal profile] mjg59
2012-05-31 03:55 pm UTC (link)
*mem, raw PCI access through sysfs, iopl, forcing signatures on kexec, a small number of debugfs interfaces, various kernel parameters (acpi_rsdp is an obvious one), probably some I've missed.

(Reply to this)  (Thread from start)  (Parent


Re: What about tracing modules?


[identity profile] fche.myopenid.com
2012-05-31 04:02 pm UTC (link)
One assumes that this enrollment can only take place during trusted boot/bios, not at run time.

What about key management for the fedora kernel builds? Are they to be archived, or generated & disposed of during koji builds? There must be some way for fedora infrastructure machines to generate+sign new kernels, if not new modules for existing kernels. Or is that to be a highly manual process (with people pressing buttons)?

(Reply to this)  (Thread from start)  (Parent


what about video driver blobs?


[identity profile] fche.myopenid.com
2012-05-31 04:05 pm UTC (link)
Any idea what amd / nvidia are planning to do with their linux blobs in the secure-boot world?

(Reply to this


Re: What about tracing modules?


[personal profile] mjg59
2012-05-31 04:09 pm UTC (link)
Right, unless you already have the private half of an enrolled KEK, any further key enrolment has to happen in the firmware.

Current assumption was that we'd probably discard the module key after a kernel build, but that's not an absolute. The kernel signing itself will probably be something along the lines of RPM signing, where a build machine will have a crypto device containing the key and will generate a signature.

(Reply to this)  (Thread from start)  (Parent


Re: what about video driver blobs?


[personal profile] mjg59
2012-05-31 04:09 pm UTC (link)
As yet, no.

(Reply to this)  (Thread from start)  (Parent


Totally unacceptable


(Anonymous)
2012-05-31 04:17 pm UTC (link)
This completely unacceptable to me. I'm very disappointed with Redhat. Redhat is a billion dollar company with a large market share in the server market, therefore has a lot of influence on hardware manufactures (a lot of server manufacturers also make laptops and desktops), therefore Redhat should have used its influence to force a solution that would be acceptable to the FOSS world. I will NEVER buy any hardware where 'secure boot' cannot be FULLY DISABLED (either by a BIOS option or by flashing a custom BIOS or with a hardware dip-switch) and if that means I will be stuck with 2012 hardware then so be it.

(Reply to this


Re: Complexity


(Anonymous)
2012-05-31 04:24 pm UTC (link)
Placed bets already.

(Reply to this)  (Thread from start)  (Parent


Re: Totally unacceptable


(Anonymous)
2012-05-31 04:34 pm UTC (link)
Note that this currently only applies to machines certified with the Windows 8 "Client" logo. Servers aren't included. I'll let you reach your own conclusions as to why.

-- pjones

(Reply to this)  (Thread from start)  (Parent


novalis: (hunting, prayer, thanks)

Re: Virtualization


[personal profile] novalis
2012-05-31 04:48 pm UTC (link)
I don't know if this is possible with UEFI, but in the original TCG (then TCPA) standard, the "solution" to this was remote attestation. I say "solution", because what this meant was that any network service that you regard as essential would effectively be able to control what software you run.

(Reply to this)  (Thread from start)  (Parent


Generic Linux Key


(Anonymous)
2012-05-31 05:07 pm UTC (link)
Relying on this Microsoft signing service for more than one or two releases would be a mistake in my opinion. However, I realize that setting up your own CA is an expensive and risky option. Have you tried approaching any existing CAs to see if they would be willing to manage a generic Linux root cert? StartCom in particular would be a good one to talk to, since they have their own Linux distro.

(Reply to this


Re: The signing format only permits a single signature per binary?


(Anonymous)
2012-05-31 05:27 pm UTC (link)
On top of what Matthew said in his reply - it is possible that a future version of the spec could support a change to allow multiple signers. That's something I do intend to bring up to USWG, probably at the plugfest in July when we're (mostly) all in person.

(Reply to this)  (Thread from start)  (Parent


Re: Totally unacceptable


(Anonymous)
2012-05-31 05:30 pm UTC (link)
I'm very disappointed with Redhat.

Ahem. Red Hat.

If you want to be disappointed with Red Hat for making it possible to install Linux on a machine without screwing with the firmware settings, that's your choice. If you want to be disappointed with at Red Hat for giving you the tools to take advantage of the additional security this can give you, that's your choice. If you want to disappointed with Red Hat for doing all this in a way that does not place any Linux vendor in a privileged position, that's your choice.

Me, though? I can think of other entities I'd be upset with first.

(Yes I'm a Red Hat employee. My opinions are my own.)

- ajax

(Reply to this)  (Thread from start)  (Parent


Paying Microsoft


(Anonymous)
2012-05-31 06:19 pm UTC (link)
I'm sorry to hear that Fedora is going to be paying Microsoft. I never thought I'd see that.

(Reply to this


Re: Virtualization


(Anonymous)
2012-05-31 06:25 pm UTC (link)
That avenue of attack is exactly what TPM is supposed to protect against. It provides a piece of hardware that can't be spoofed to a virtual machine without a way of extracting the cryptographic keys from the chip it's self (which is theoretically possible, but practically impossible).

I'm assuming that the presence of a TPM is part of this whole SecureBoot thing.

(Reply to this)  (Thread from start)  (Parent


Re: Virtualization


[personal profile] mjg59
2012-05-31 06:27 pm UTC (link)
No, secure boot is designed not to require a TPM.

(Reply to this)  (Thread from start)  (Parent


Intent of distribution counts?


(Anonymous)
2012-05-31 07:14 pm UTC (link)
That is an interesting interpretation. So then it depends on the intent of the distribution whether or not full installation information has to be provided? So as long as you redistribute Fedora and don't have ties to any hardware company you can use fedora as is, but otherwise you cannot?

Or is the backdoor simply to split the conveying in two transactions, one for the software and one for the hardware?

Isn't that a giant bug/loophole in GPLv3 then? Time for a patch :)

(Reply to this)  (Thread from start)  (Parent


One time $99 fee...


(Anonymous)
2012-05-31 07:16 pm UTC (link)
"it would mean finding an entity who was willing to take responsibility for managing signing or key distribution [...] nobody was jumping at the opportunity to volunteer."

But that is, essentially, what Microsoft are charging the $99 for. I'm sure folks at Microsoft believe they're doing this for a good cause, but of course it'll eventually turn into a clusterf*k when their suits decide to see if their competition can survive without hardware support longer than it takes to get to court...

(Reply to this


How will RHEL handle the problem?


(Anonymous)
2012-05-31 07:23 pm UTC (link)
Will the RHEL clones (Scientific Linux, CentOS) have to register their own keys with Microsoft or will Redhat allow them to use the RHEL keys?

(Reply to this


Exactly


(Anonymous)
2012-05-31 07:36 pm UTC (link)
You hit it right on the nose. This has NOTHING to do with security because it's completely ineffective at what it was built to do. It's all about control and making it harder for the competitor to have an even footing. Anti-competitive behavior all over again.

It's just like the fight against piracy and the inclusion of DRM in games and media. DRM has NOTHING to do with piracy (it's not effective) but everything to do with control of the market.

(Reply to this)  (Thread from start)  (Parent


Re: GPL


(Anonymous)
2012-05-31 07:37 pm UTC (link)
Requiring GPL-2 code to be signed before executing does not violate the license. You're thinking of GPL-3. Search for "tivoization" for more information.

The Apple store conflict has nothing to do with signed code. It is related to the additional restrictions that Apple's ToS includes on (such as redistribution limitations).

(Reply to this)  (Thread from start)  (Parent


win update mod firmware?


(Anonymous)
2012-05-31 07:41 pm UTC (link)
Does that imply that Windows update will be updating the keys used by the UEFI environment? I.E. Redmond OWNS my system

(Reply to this)  (Thread from start)  (Parent


Re: How will RHEL handle the problem?


(Anonymous)
2012-05-31 07:45 pm UTC (link)
We won't be in a position to allow them. Even if we wanted to (which I doubt) we wouldn't be able to procedurally.

-- pjones

(Reply to this)  (Thread from start)  (Parent


Just say NO. Loudly, and clearly.


(Anonymous)
2012-05-31 07:45 pm UTC (link)
The minute a Linux vendor sells-out -- like this -- is the minute we're all doomed.

MS will lead them on for a couple of years, and then quietly insist that x86 vendors comply with the same restrictions that ARM vendors have already kowtowed to.

At which point, only Redhat Linux will boot and run. No others. Or at least not until all of the others also sign-up and pay MS for permission to run non-MS software on end-user hardware.

Then, a year or two later, MS will raise the signing fees, and eventually begin blacklisting Linux systems for various "reasons".

By then, it's too late to do anything about the situation.

Much, MUCH better to just not comply from Day-1. Don't pay MS for key-signing. This means that a user has to enter the BIOS *once* to get Linux installed. Big Deal.

Hardware vendors will be loath to ever implement stage-2 as a result -- they'll refuse to disable non-secureboot because it would lock them out of the Linux market.

But if we pay-up to MS on Day-1, then the hardware vendors will not have as big an issue with locking everyone out later on.

Just say NO. This is a very clever MS scheme, and an very bad idea for Redhat to comply.

(Reply to this


Time to make calls to your congressional representative.


(Anonymous)
2012-05-31 07:48 pm UTC (link)
It's interesting that RedHat is not going to the government claiming anti-trust. I wonder if their plan is to just pay Microsoft some hush money to allow another OS install option? I also don't see how secure boot will make things any safer in the Windows world or Unix Like OS world.

(Reply to this


Re: Totally unacceptable


(Anonymous)
2012-05-31 07:50 pm UTC (link)
I'm disappointed that Redhat hasn't fought this much more vigorously from the beginning. They would have had enough corporate and market power to prevent this situation from arising.

If Redhat had refused to play Microsoft's game, then hardware vendors would have been forced to provide hardware that works without 'secure boot', but instead by playing along, hardware vendors will see no reason to provide a possibility to COMPLETELY disable 'secure boot' (no having to deal with self-signed keys is NOT a solution, it's a messy workaround that's just cause of annoyance and it increases the barrier for relatively inexperienced people to do their own thing).

I'm standing by my opinion that this is a total 'sell out' of all FOSS users by Redhat.

(Reply to this)  (Thread from start)  (Parent



(346 comments) - (Post a new comment)
(Threaded) (Top-level comments only)

Page 4 of 14

<<   [1] [2] [3] [4] [5] [6] [7] [8] [9] [10]
[11] [12] [13] [14]
  >>