[personal profile] mjg59
I'm pleased to say that a usable version of shim is now available for download. As I discussed here, this is intended for distributions that want to support secure boot but don't want to deal with Microsoft. To use it, rename shim.efi to bootx64.efi and put it in /EFI/BOOT on your UEFI install media. Drop MokManager.efi in there as well. Finally, make sure your bootloader binary is called grubx64.efi and put it in the same directory.

Now generate a certificate and put the public half as a binary DER file somewhere on your install media. On boot, the end-user will be prompted with a 10-second countdown and a menu. Choose "Enroll key from disk" and then browse the filesystem to select the key and follow the enrolment prompts. Any bootloader signed with that key will then be trusted by shim, so you probably want to make sure that your grubx64.efi image is signed with it.

If you want, you're then free to impose any level of additional signing restrictions - it's entirely possible to use this signing as the basis of a complete chain of trust, including kernel lockdowns and signed module loading. However, since the end-user has explicitly indicated that they trust your code, you're under no obligation to do so. You should make it clear to your users what level of trust they'll be able to place in their system after installing your key, if only to allow them to make an informed decision about whether they want to or not.

This binary does not contain any built-in distribution certificates. It does contain a certificate that was generated at build time and used to sign MokManager - you'll need to accept my assurance that the private key was deleted immediately after the build was completed. Other than that, it will only trust any keys that are either present in the system db or installed by the end user.

A couple of final notes: As of 17:00 EST today, I am officially (rather than merely effectively) no longer employed by Red Hat, and this binary is being provided by me rather than them, so don't ask them questions about it. Special thanks to everyone at Suse who came up with the MOK concept and did most of the implementation work - without them, this would have been impossible. Thanks also to Peter Jones for his work on debugging and writing a signing tool, and everyone else at Red Hat who contributed valuable review feedback.
Page 2 of 2 << [1] [2] >>
From: (Anonymous)
hello ;p

first off, i sincerely want to thank you so much for spending $99 and developing such an application in order to thwart microsoft's disabled mental ability/retardedness it has caught up these days.

anyways, you get my gist.


what im trying to do is that im trying to integrate this with hackintosh bootloader from here:

http://sourceforge.net/projects/cloverefiboot/files/Bootable_ISO/

with the ISO 906.

Any help is appreciated. if this can be done, then secure-boot better secure-its-anal-virginity cuz we won't leave any b**ches left behind.

thanks for reading. im definitely looking forward to Microsoft's bitching and lawsuit... crap we better get ready *shurg*
From: (Anonymous)
mhm i follow u... just one part i don't get:

when u say signing key, do you mean a x.509 certificate.. or?
From: (Anonymous)
would SBsigntool from ubuntu be equal to Signtool in windows's architecture?

Date: 2012-12-09 07:01 pm (UTC)
From: (Anonymous)
Would GPG be a sufficient signing tool to use? The relevant Fedora wiki article mentioned OpenSSL but GPG has the ability to make x509 certificates.

...Perhaps I just answered my question.

Date: 2012-12-10 12:02 am (UTC)
From: (Anonymous)
My bootloader boots fine, but when I it tries to load vmlinuz it says access denied.

I've signed both the bootloader and vmlinuz with the exact same certificate and the same tool, and enroled the key to the database. What's going on?

Date: 2012-12-10 12:04 am (UTC)
From: (Anonymous)
I'm using Gummiboot for my bootmanager, by the way.

Date: 2012-12-10 02:53 am (UTC)
From: (Anonymous)
So does that mean distros are stuck using GRUB or rEFInd until Gummiboot and Syslinux provide decent EFI support?

Date: 2012-12-10 04:20 am (UTC)
From: (Anonymous)
No. The issue is with follow-on boot programs from shim that load EFI executables. Currently, rEFInd and gummiboot both launch Linux kernels in this way, using the kernel's EFI stub loader to load and launch the kernel as an EFI application. (So does rEFIt, but it can't pass arguments, so it's very awkward in this role.) GRUB Legacy, GRUB 2, and ELILO all launch kernels without relying on their EFI stub loaders or the EFI system calls that are used to launch EFI applications. Therefore, if you sign one of these boot loaders, it can launch anything. The downside to this is that the commonly-available boot loader binaries don't verify that a kernel has been signed. The Fedora 18 pre-release archives include a version of GRUB 2 that performs such checks, but if anybody's done anything with GRUB Legacy or ELILO that's similar, I don't know about it. The last I checked, Syslinux wasn't an issue because there was no Syslinux EFI support, although I heard the Syslinux people were working on it.

So in summary, shim->F18 GRUB2->kernel and shim->rEFInd 0.5.0->kernel both now provide authenticated boot paths; shim->kernel could in principle be authenticated, but this will depend on getting a patched shim signed; shim->GRUB Legacy->kernel and shim->ELILO->kernel both provide an unauthenticated boot path; and shim->gummiboot->kernel won't work in Secure Boot mode unless/until gummiboot adds shim support. (Note that I've not tried launching either GRUB Legacy or ELILO directly from shim, so I can't be sure those paths will actually work.)

(no subject)

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

(no subject)

From: (Anonymous) - Date: 2012-12-10 06:37 pm (UTC) - Expand

Date: 2012-12-10 02:58 am (UTC)
From: (Anonymous)
Or, er, rather, in Gummiboot's case, proper shim support.

Date: 2012-12-10 02:59 am (UTC)
From: (Anonymous)
There's a bug in shim that prevents it from loading a Linux kernel; it's a bit too strict in its checks for relocation information. The Linux kernel lacks EFI stub relocation information but loads just fine if the bulk of the relocation function is skipped. (This is what an actual EFI implementation does if the kernel is signed with a regular Secure Boot key.) Also, any post-shim boot manager that uses standard EFI calls to launch a boot loader must call back to shim and jump through some extra hoops, since the standard EFI calls don't "talk" to shim themselves. AFAIK, gummiboot doesn't yet do this. My own rEFInd (http://www.rodsbooks.com/refind/) does, as of version 0.5.0.

Date: 2012-12-10 03:02 am (UTC)
From: (Anonymous)
I was about to hunt down your boot manager, as a matter of fact. I don't mean this in a bad way (because I really do appreciate your work) but you do advertise yourself quite often. ;)

Date: 2012-12-10 03:10 am (UTC)
From: (Anonymous)
To expand on this, here's a patch that fixes the problem with shim being unable to load a Linux kernel:

http://www.rodsbooks.com/shim.patch

FWIW, I "borrowed" a few shim functions for rEFInd 0.5.0, and I incorporated this patch in my version of relocate_coff(). Feel free to use it in future versions of shim.

EFI

Date: 2012-12-31 07:05 pm (UTC)
From: (Anonymous)
Why cant the hardware manufactuers instigate a procedure so that the enduser can sign their own implementation of EFI, and so boot whatever OS they desire. surely this would then take this whole debacle out of certain proprietary companies hands?

The Business Model Drives The Complex

Date: 2013-01-09 01:40 pm (UTC)
From: (Anonymous)
Decades ago before any of this happened I saw it on some PBS show on TV. A man being interviewed said that vendors would offer the hardware for (nearly?) free expecting to make it up selling software.

SONY PS2 is the classic case. SONY PS2 had a very powerful GPU which could be used in clusters to build supercomputers. SONY sold the PS2 at a fraction of what it cost them because they expected to recoup by selling games. They did not anticipate very large numbers of PS2s being purchased to run Linux in clusters. The losses were so bad they tried to renege on letting PS2 run Linux by putting out a software update the turned off the ability. I could see not offering new PS2s with the Linux option but do you really think that you could turn a datacenter cluster into kids buying games by shutting off the Linux option? Did they really think they could undo the lost game sales that way?

Fast-forward and Microsoft is trying to avoid the hole in the "free hardware recouped by paid software" business model by restricting the hardware to just their software in the case of their ARM tablets the where the "secure" boot can't be turned off.

The business model works because people will sell their freedom for $10 discount on a tablet especially when most of them don't understand what they are doing.

how to put it in the /EFI/BOOT?

Date: 2013-02-17 01:12 am (UTC)
From: (Anonymous)
Hey, I think this fix will finally help me install Ubuntu in a new machine...my question is how can I "put it in /EFI/BOOT on your UEFI install media"


Trying to create public certificate in Windows 8

Date: 2013-02-19 04:57 pm (UTC)
From: [personal profile] inthiyan
Hi

How do i create public certificate (DER file) in Windows 8? Please help!!!
Page 2 of 2 << [1] [2] >>

Profile

Matthew Garrett

About Matthew

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

Expand Cut Tags

No cut tags