Matthew Garrett ([personal profile] mjg59) wrote2013-03-26 07:25 pm
Entry tags:

Secure Boot and Restricted Boot.

I gave a presentation at Libreplanet this weekend on the topic of Secure Boot and Restricted Boot. There's a copy of the video here - it should be up on the conference site at some point. It turned out to be excellent timing, in that a group in Spain filed a complaint with the European Commission this morning arguing that Microsoft's imposition of Secure Boot on the x86 client PC market is anticompetitive. I suspect that this is unlikely to succeed (the Commission has already stated that the current implementation appears to conform to EU law), and I fear that it's going to make it harder to fight the real battle we face.

Secure Boot means different things to different people. I think the FSF's definition is a useful one - Secure Boot is any boot validation scheme in which ultimate control is in the hands of the owner of the device, while Restricted Boot is any boot validation scheme in which ultimate control is in the hands of a third party. What Microsoft require for x86 Windows 8 devices falls into the category of Secure Boot - assuming that OEMs conform to Microsoft's requirements, the user must be able to both disable Secure Boot entirely and also leave Secure Boot enabled, but with their own choice of trusted keys and binaries. If the FSF set up a signing service to sign operating systems that met all of their criteria for freeness, Microsoft's requirements would permit an end user to configure their system such that it refused to run non-free software. My system is configured to trust things shipped by Fedora or built locally by me, a decision that I can make because Microsoft require that OEMs support it. Any system that meets Microsoft's requirements is a system that respects the freedom of the computer owner to choose how restrictive their computer's boot policy is.

This isn't to say that it's ideal. The lack of any common UI or key format between hardware vendors makes it difficult for OS vendors to document the steps users must take to assert this freedom. The presence of Microsoft as the only widely trusted key authority leaves people justifiably concerned as to whether Microsoft will be equally aggressive in blacklisting its own products as it will be in blacklisting third party ones. Implementation flaws in a (very) small number of systems have resulted in correctly signed operating systems failing to boot, requiring users to update their firmware before being able to install anything but Windows.

But concentrating on these problems misses the wider point. The x86 market remains one where users are able to run whatever they want, but the x86 market is shrinking. Users are purchasing tablets and other ARM-based ultraportables. Some users are using phones as their primary computing device. In contrast to the x86 market, Microsoft's policies for the ARM market restrict user freedom. Windows Phone and Windows RT devices are required to boot only signed binaries, with no option for the end user to disable the signature validation or install their own keys. While the underlying technology is identical, this differing set of default policies means that Microsoft's ARM implementation is better described as Restricted Boot. The hardware vendors and Microsoft define which software will run on these systems. The owner gets no say.

And, unfortunately, Microsoft aren't alone. Apple, the single biggest vendor in this market, implement effectively identical restrictions. Some Android vendors provide unlockable bootloaders, but others (either through personal preference or at the behest of phone carriers) lock down their platforms. A naive user is likely to end up purchasing a device that will, in the absence of exploited security flaws, refuse to run if any system components are modified. Even in cases where the underlying components are built using free software, there's no guarantee that the user will have the ability to assert any of those freedoms.

Why does this matter? Some of these platforms (notably Windows RT and iOS, but also some Android-based devices) will even refuse to run unsigned applications. Users are unable to write their own software and distribute it to others without agreeing to often onerous restrictions. Users with the misfortune of living in the wrong country may be forbidden from even that opportunity. The vendor may choose to block applications that compete with their own, reducing innovation. The ability to explore and tinker with the components of the system is restricted, making it harder for users to learn how modern operating systems work. If I own a perfectly functional phone that no longer receives vendor updates, I don't even have the option of paying a third party to ensure that I can't be compromised by a malicious website and risk the loss of passwords or financial details. The user is directly harmed by these restrictions.

I won't argue that there are no benefits to curated software ecosystems. I won't even argue against devices shipping with a locked down policy by default. I will strongly argue that the owner of a device should not only have the freedom to choose whether they wish to remain within those locked-down boundaries, but should also have the freedom to impose their own boundaries. There should be no forced choice between freedom and security.

Those who argue against Secure Boot risk depriving us of the freedom to make a personal decision as to who we trust. Those who argue against Secure Boot while ignoring Restricted Boot risk depriving us of even more. The traditional PC market is decreasing in importance. Unless we do anything about it, free software will be limited to a niche group of enthusiasts who've carefully chosen from a small set of devices that respect user freedom. We should have been campaigning against Restricted Boot 10 years ago. Don't delay it even further by fighting against implementations that already respect user freedom.

Re: Let the user choose

(Anonymous) 2013-08-29 02:10 pm (UTC)(link)
I think saying SecureBoot==buyerControl && RestrictedBoot==sellerControl is too simplistic. The born with handcuffs example another poster mentioned a couple comments up from here is relevant.

When the baby is born, some Evil Adversary(tm) has to jump in and put on the handcuffs. From that point forwards, the formerly PlainBaby is now just a RestrictedBaby. When the parents get it home from the hospital, they can go on the internet, and learn about how to pick the lock on the particular model of handcuffs their baby was imprisoned with, and after a couple hours or so of wasted effort (assuming they don't need a BIOS mod to the handcuff firmware to overcome some 'accidental' bug or 'security' misfeature). At that point, and only at that point, do the parents have SecureBaby... assuming they put handcuffs of their own choice in place, with handcuff keys only they have, and not the adversary. (The parents might also opt for PlainBaby, with no handcuffs at all.)

I hope the metaphor is clear: PlainBaby is non-UEFI boot, SecureBaby is UEFI-boot with parent-aka-enduser-supplied keys, and RestrictedBaby is what you get from the hospital-aka-factory. But it seems a pretense to say that the enduser is in 'control' of their *plain* hardware device, when it ships by *default* with RestrictedBoot, just like it seems obviously wrong to say that the parent is in 'control' of their baby when the Evil Adversary with dibs on the hospital grounds swoops in to apply the handcuffs and turn a *plain* old baby into a RestrictedBaby.

The application of RestrictedBoot to a product, without the enduser's getting to say whether they want it or not, and if so what *sort* of security they want, is like the application of handcuffs to newborns, without the parents getting the handcuff keys immediately (or the option of no handcuffs whatsoever!). The reason some folks -- not me personally since actually I would love to have RestrictedBoot applied straight from the hardware-factory which only permits software to install if it has been signed with my personal pubkey i.e. no win9 and no bloatware and no trialware and so on -- but the reason some folks complain about SecureBoot just as loudly as they complain about RestrictedBoot is that, invariably from what I have seen, it works just like the handcuff model.

The enduser has to *work* to get the wrong keys out, and the right keys in. The evil adversary gets what they want for free ... by default ... and the public at large, not savvy in the ways of lockpicking, eventually gets used to the idea that all iPhones, then all tablets, then all PCs just *ought* to be locked-down vendor-software-only disposable-every-six-months special-purpose kiosk-devices for content-consumption and spyware and nothing more.

So, while I agree with your technical stance on SecureBoot as a conceivable advantage, I think you're missing the bigger picture. Namely, that whether you call it SecureBoot that the savvy consumer can bypass, or RestrictedBoot that the savvy firmware-modder can bypass, they are in the same basic category: bad things the evil adversary did, before you had a chance to stop them, and now must be undone, or lived with.

Hint -- if 98% of the population lives with it, then the marketshare of Linux on the PC will be 2%... just like now. When you buy a PC that comes pre-installed with Win/iOS/bloatware, you have 'freedom' to undo that stuff, and install what you really wanted in the first place. But there is a difference between freedom without intentional freedom-blocking-hinderances installed at the factory by default, and the *true* situation we live in.

I'm not saying you're wrong, mjg. SecureBoot *is* distinct from RestrictedBoot, for those of us paying close attention. But when what you get from the factory is invariably RestrictedBoot by default, and converting that state into *actual* SecureBoot requires hours or days or forever, depending on the difficulty of the out-of-support-contract firmware reconfig / not-well-documented firmware upgrade / unauthorized-and-warranty-voiding firmware mod, then you are not talking about freedom by default. You are talking about the possibility of jailbreaking... but the default should not be jail.

The default should be PlainBaby, or SecureBaby with keys supplied by the parents (and not copied at the hospital), because RestrictedBaby-by-default will someday soon lead to a world of RestrictedBaby-take-it-or-leave-it. We already live in that world with many phones, tablets, digicams, televisions, auto-puters, and whatnot. I want *that* world to get smaller and smaller, not grow and grow until it encompasses laptops and desktops and servers and everything.