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 11 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)

Stop this nonsense now!


(Anonymous)
2012-06-04 11:41 am UTC (link)
Therefore all this post and all this rant and all this time is just lost energy.
The FSF is going to act, take it for granted, and the keys will be distributed and they will be misused and subsequently banned and we won't be able to install gnulinuxes and we will all cry but it'll be too late since vendors will only have the wrong hardware to offer. We will all lose precious time.

Just stop this nonsense. How many times do we have to fail in traps until we learn? You can not and must not trust Microsoft, boy, it is as simple as that.

And we needn't do it. All that cloud hardware must run gnulinuxes and friends, they will never buy Win8-only hardware, so that's a huge force that we have. Let's simply not give up. This is another battle to be fought, let's not be cowards and easy-going. Yeah, some vendors will change sides, but most won't sell themselves completely out to MS in the midterm, and that be all. We will only lose if we don't fight, but how awful it'll be, much worse than saying just "NO, we keep our and other's freedom alive".

Do not make this strategic mistake, it is not going to be easier going that road, on the contrary.
Enlighten yourselves again.

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



(Anonymous)
2012-06-04 12:12 pm UTC (link)
Does any of this apply at all to the new UEFI ARM SoC-based machines apparently coming soon?

Does the mandatory requirement to have no option to disable secure boot also imply that there will be no option to enroll keys?

(Reply to this


No more live CDs?


(Anonymous)
2012-06-04 01:06 pm UTC (link)
This seems to suggest no more live CDs on such equipment?

(Reply to this


Re: No more live CDs?


[personal profile] mjg59
2012-06-04 01:07 pm UTC (link)
Why not? LiveCDs should still work fine.

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


Real solution: don't buy Microsoft Windows 8 hardware


(Anonymous)
2012-06-04 02:27 pm UTC (link)
The solution is very simple. Just build your own box. It's easy to do and takes maybe half an hour these days, plus you can choose better hardware. Long gone are the days when it took 3+ hours to build a box. On principle, if it says "Windows 8" on it, I won't use that hardware in my home. At work, I've gotta use what they tell me, but not in my home.

Microsoft can take their UEFI and shove it, far as I'm concerned.

(Reply to this


Re: Power User Installs


(Anonymous)
2012-06-04 02:29 pm UTC (link)
There is nothing requiring motherboard manufacturers to even permit you to add any new keys to the board's white list.

And even if a particular board manufacturer does permit users to modify the board's list of keys, the modification itself must be accompanied with the vendor's own private key, and that key may be different for each individual revision of each model manufactured by each vendor.

There will be nothing automagic about anything related to the process.

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



(Anonymous)
2012-06-04 04:01 pm UTC (link)
"Fedora is currently the #3 distro."

Actually it's the #1 distro. But that doesn't matter. The idea that Fedora has enough "weight" to allow it to not only "stand up" to Microsoft but "win" is ludicrous. You've offered no concrete proposal as to how exactly Fedora would "stand up" at this time (not some imaginary time in the future when "everybody else who hates this insane policy" not only actually gets off their rear end but also manages to come to an agreement on what should be done). In other words,you've added nothing constructive to the discussion.

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


Re: Totally unacceptable


(Anonymous)
2012-06-04 04:14 pm UTC (link)
And I believe that someday pigs will fly. Doesn't mean it's going to happen.

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


Re: Redhat should join the UEFI Forum and make them responsible for maintaining the keys


(Anonymous)
2012-06-04 04:26 pm UTC (link)
And Canonical -- the company behind Ubuntu -- is also a member. It didn't help.

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


Re: Redhat should join the UEFI Forum and make them responsible for maintaining the keys


[personal profile] the_ridikulus_rat
2012-06-04 04:57 pm UTC (link)
I don't see why this can't be done. UEFI Secure boot is defined in the UEFI Specificatio which is written and maintained by the UEFI forum. Why can't the forum take up the responsibility for maintaining the necessary secure boot infrastructure? I should one of the members (Microsoft) along with the an outside partner (Verisign) do the job, especially when the other companies do not trust this combo. UEFI forum taking up the respobsibility is a perfectly valid solution, and one in which Redhat and Canonical can have a say in the matters concerned.

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


Linux Foundation as Linux key provider in the long term?


(Anonymous)
2012-06-04 08:44 pm UTC (link)
I would like that we get out of the situation where one single vendor (here: Microsoft) is essentially in control of all the keys. This kind of centralized power and lack of competition is never healthy and always risky.

To me it seems that the Linux Foundation would be a natural choice for providing a Linux Key signing service. It has many or most of the hardware vendors as members, so there is an established (and reasonably distro/vendor-neutral) communication channel for convincing them to ship this key on their hardware.

Please consider pushing in that direction in the future.

-- Jon Nordby, www.jonnor.com

(Reply to this


Re: Just say NO. Loudly, and clearly.


(Anonymous)
2012-06-04 09:47 pm UTC (link)
But no hardware vendors are going to care too much about loosing the 1% of the market that Linux represents. That's a big gamble hoping that they will care.

You should be glad that Microsoft are driving a solution to this issue. Security is after all a much bigger problem for Linux than it is for current Windows versions.

I note ~ 200 vulnerabiities in Windows 7 versus ~ 3500 in SUSE 10 (according to Secunia).

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


Re: Legally dubious?


(Anonymous)
2012-06-04 11:04 pm UTC (link)
"If disabling secure boot is too hard, God help anyone who has to change the boot order so they can boot from CD to install the damn thing."

On most modern BIOSes you can change the boot order from a menu at runtime (usually by hitting some Fn function key) without having to go into the BIOS setup. On the boot screen it will even tell you what key to hit for that. So I do think it's easier than disabling Secure Boot in the UEFI setup will be.

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


Re: Totally unacceptable


[identity profile] robsku.wordpress.com
2012-06-04 11:50 pm UTC (link)
I'm not sure if you are trolling or if you just skipped reading (parts of) the article...

1st, the x86 will allow you to disable SB.

2nd, ARM will not, but this is what The Friendly Article above says:

"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."

What's your issue?

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


FOSS


(Anonymous)
2012-06-05 03:26 am UTC (link)
Ok.... son unos vendidos, me moveré a una distro realmente libre, como es Debian, años perdidos usando Fedora...

(Reply to this


Re: Legally dubious?


(Anonymous)
2012-06-05 08:19 am UTC (link)
Hmm, aren't they explicitly preventing people from disabling secure boot on arm systems?

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


Fedora and Windows


(Anonymous)
2012-06-05 11:16 am UTC (link)
Hi.
In your post, you suppose that anyone buys PC "Windows 8 branded".
To install Fedora (or other distro GNU/Linux), the buyer should use a bootloader/kernel/module signed to no harm to Windows. Therefore Linux becomes a protection for Windows, but GNU/Linux distros are not "a protection for something else".
Also, if i buy a PC without Windows8, should i use a "Fedora signed" ?

(Reply to this



(Anonymous)
2012-06-05 03:33 pm UTC (link)
> If code signed with your key is used to attack
> Windows then Microsoft can blacklist your key
> and push that update out via Windows update.

Obviously, when running Windows on top of a rootkit, it would be trivial to prevent them from updating that blacklist... (which might render Windows Update broken, but why care about that as a malware writer?).

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


omg


(Anonymous)
2012-06-05 06:45 pm UTC (link)
Secure Boot damages GNU/Linux distros and free software philosophy! The free software can't grow up with this limitations, i'm sure that Fedora users can have a lillte advantage from your "donation" to Microsoft but all the linux world will be mashed.
This way will be really hard for linux developers, the few money that now grease the free software gears will be less and too many projects will end soon... and you are helping that!

We must fight against this things, don't PAY Microsoft to destroy free software!

(Reply to this


Re: Just say NO. Loudly, and clearly.


(Anonymous)
2012-06-05 08:51 pm UTC (link)
I wholeheartedly agree. Basically this is another Microsoft ploy! IMHO it's needed because M$ is totally incapable of building anything approaching a seccure system, and that is an excuse to implement this mickey mouse idea, and long term I believe your scenario is accurate

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


A little more


(Anonymous)
2012-06-05 08:59 pm UTC (link)
(disclaimer: I speak for myself here. I do not represent my employer in any way)

Some stuff people might be missing here:
1) While Windows 8 seems to allow you to use the machine in "unsecured" mode, it might NOT be
true in the future (Windows 9, 10?)
1.1) While (1), I'm pretty sure Windows 8 will make sure you know you're running in "unsecured"
mode. This can and will disturb dualboot users
2) It's up to Microsoft to certificate or not if they let your future distros boot in a
"secured" platform. This can be used for "evil" purposes if Linux ever picks up steam.
3) There will be users wanting to take advantage of the secure platform to run Linux. With or
without dual-boot. Matthew's work here matters.
4) History showed us "windows devices" (remember winmodems?) and how they *do* get popular
because they're cheaper because they sell more because they're cheaper.
4.1) If for any reason vendors decide to leave the off option out (to "cut costs" a.k.a. "we
simply don't care about the rest of the market") people will have true "wincomputers" unless
we have some sort of option
4.1.1) And winmodems showed us that users aren't willing to spend money to use linux. Other
situations like schools that will go for the cheaper computers and will end up locked down
to Microsoft will have no alternative.

So I believe Matthew's initiative is valid: he's being proactive in providing *option*. It's
up to all of us to make sure the vendors hear us and stop this crap.

This has a big potential of causing a lot of harm on converting users from Windows to Linux.

I personally pay more for less performance in ATI/AMD cards (or Intel's, mandatory for my
laptops) for years because I despise the lack of open source support by NVIDIA.

(Reply to this


risk management


(Anonymous)
2012-06-06 01:41 am UTC (link)
The fact that your already compromised system is hosed is a lot less important than making sure that the other billion or so computers in the world don't get hit by the same attack.

Security is not, never has been, and never can be 100%. It's all risk management. There will always be failures. The goal is to minimize those failures and to prevent the same attacks from working twice.

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


Re: what about video driver blobs?


(Anonymous)
2012-06-06 02:05 am UTC (link)
That's some small amount of code to make the basic hardware work. It does not give anywhere close to the same level of features or performance as the binary drivers. Which is in no small part because the entire Linux graphics stack is still missing the capability to support those features or optimize shaders and hardware calls to similar levels of performance, of course, but shifting the blame doesn't negate the problem.

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


Re: Generic Linux Key


(Anonymous)
2012-06-06 02:16 am UTC (link)
A custom CA is much less useful if the CA's root cert is not installed the UEFI images shipped with hardware. And since the UEFI format does not allow multiple signatures on a binary, an OS has two choices:

1) Use the Microsoft key that ALL consumer hardware is going to have, and hence always work.
2) Use a Linux CA that a small fraction of hardware is going to have, and hence only work on a small fraction of hardware

The vast, VAST majority of Linux users get started out of pure curiosity, and just to tinker. They do not usually start out as Free Software supporters (yes, exceptions exist, and I don't care about your personal anecdotes) until _after_ they're exposed in depth to Free Software. Making it hard for novice users to even give Linux a try means that the Linux adoption rate will go from it's current snail pace to (worst case) a sub-1.0 rate (as in, less users come in than leave, due to age or those of us who just give up on Linux ever being a truly competetive desktop OS).

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


Re: Just say NO. Loudly, and clearly.


(Anonymous)
2012-06-06 02:23 am UTC (link)
While I do agree that Win7 is more secure as a desktop OS for a great many reasons, _that_ is certainly not one of them.

Windows comes with basically nothing but the OS. SUSE comes with 10,000 other random packages, for which most of those security notices are for. Many of those packages are cross-platform software that also runs on Windows, and has the same vulnerabilities there as it does on Linux.

It's hence not fair to count vulnerabilities in a Linux distro unless you limit them solely to packages that are required as part of the default minimal desktop environment.

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



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

Page 11 of 14

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