The Linux Foundation's UEFI secure boot system
In a nutshell, the Linux Foundation will obtain a Microsoft Key and sign a small pre-bootloader which will, in turn, chain load (without any form of signature check) a predesignated boot loader which will, in turn, boot Linux (or any other operating system). The pre-bootloader will employ a 'present user' test to ensure that it cannot be used as a vector for any type of UEFI malware to target secure systems. This pre-bootloader can be used either to boot a CD/DVD installer or LiveCD distribution or even boot an installed operating system in secure mode for any distribution that chooses to use it."
      Posted Oct 10, 2012 23:18 UTC (Wed)
                               by pjones (subscriber, #31722)
                              [Link] (15 responses)
       
     
    
      Posted Oct 10, 2012 23:47 UTC (Wed)
                               by pjones (subscriber, #31722)
                              [Link] (14 responses)
       
     
    
      Posted Oct 11, 2012 0:50 UTC (Thu)
                               by ebiederm (subscriber, #35028)
                              [Link] (13 responses)
       
This approach looks very interesting as it allows a transition to a system without Microsoft's key, something that has been lacking in the other efi secure boot approaches I have seen so far. 
Thanks James 
 
     
    
      Posted Oct 11, 2012 1:17 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] (12 responses)
       
     
    
      Posted Oct 11, 2012 1:34 UTC (Thu)
                               by ebiederm (subscriber, #35028)
                              [Link] (11 responses)
       
- Booting in setup gives you the option to install the key of the bootloader  you are booting into EFI.  Presumably that bootloader has not been signed by the Microsoft key. 
- There is also another program you can run LockDown.efi that you can run in setup mode that will replace all of the EFI keys. 
For more details have a look at the README 
http://git.kernel.org/?p=linux/kernel/git/jejb/efitools.git;... 
 
     
    
      Posted Oct 11, 2012 1:40 UTC (Thu)
                               by pjones (subscriber, #31722)
                              [Link] 
       
     
      Posted Oct 11, 2012 1:43 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] (9 responses)
       
(I've read the code, thanks. I wrote most of it)  
     
    
      Posted Oct 11, 2012 3:50 UTC (Thu)
                               by ebiederm (subscriber, #35028)
                              [Link] (8 responses)
       
If you can't get to the point making it an option to disable Microsofts key what is the point? 
 
 
     
    
      Posted Oct 11, 2012 4:14 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] (6 responses)
       
That's the reason for the MOK design that Suse came up with. It adds an additional key database that has different constraints, permitting users to add their own keys without having to handle different firmware UIs. I've recently added bootloader-level UI code for this (located at https://github.com/mjg59/shim/tree/mok ), which means that the end user can be prompted to enrol a new key at boot time without having to deal with firmware UI. The Linux Foundation approach doesn't support this, and as a result is pretty much useless. 
     
    
      Posted Oct 11, 2012 14:24 UTC (Thu)
                               by jake (editor, #205)
                              [Link] (5 responses)
       
But, something the LF approach will do, that the shim won't (if i understand correctly), is boot an unsigned bootloader/kernel ... albeit after the user presses "OK" or whatever ... right now, for a distro that doesn't want to deal with signing their GRUB2 (or whatever) and/or their kernels, they have no way to boot in a secure-boot-enabled device. 
Or am I (as usual) missing something? 
jake 
     
    
      Posted Oct 11, 2012 14:28 UTC (Thu)
                               by pjones (subscriber, #31722)
                              [Link] (4 responses)
       
     
    
      Posted Oct 11, 2012 14:40 UTC (Thu)
                               by jake (editor, #205)
                              [Link] (1 responses)
       
Ah I see, thanks for the info ... does that mean that when I want to boot a LiveCD (say), I have to write stuff (even "empty" stuff) to the UEFI boot variables of the machine?  Or can shim just bypass all of that and, in effect, provide the same "always present user" boot style that the LF approach takes?  At some level, I guess I am asking if shim is a complete superset of the LF approach. 
There may be times or reasons that someone booting doesn't want to write to the firmware of the box ... 
jake 
     
    
      Posted Oct 11, 2012 14:57 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] 
       
     
      Posted Oct 11, 2012 15:21 UTC (Thu)
                               by jake (editor, #205)
                              [Link] (1 responses)
       
Hmm, thinking further on this, what does having an "empty internal key list" actually mean?  I assume it means that something gets written to the firmware in the MOK boot variable area.  Does that wipe out my existing MOK keys?  or just allow unsigned booting forevermore? 
I have a Fedora secure boot system installed, with its key in the MOK, now I want to boot JRandom LiveCD.  It has an unsigned second-stage bootloader (GRUB2 or equivalent) and unsigned kernel.  Can it use shim as its first stage?  It would seem that either that would mean I lose my Fedora key in the MOK or I add an empty key that allows anything to boot thereafter.  But if it uses the LF first-stage, it can boot (after I press OK) and not change the state of the system. 
Or have I got that wrong? 
thanks! 
jake 
     
    
      Posted Oct 11, 2012 15:29 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] 
       
1) The UEFI spec database (db) - this is checked in order to conform to the spec 
So, for instance, the Fedora shim will have the Fedora key in (3). If the idea is to leave control up to the user then leaving (3) empty achieves that. 
This actually allows for some interesting possibilities. If a vendor wants to set up a Linux CA (which would be expensive to do properly, and potentially open to legal risks, but it *could* be done) then they could do this by simply embedding their key in (3) and getting that copy of shim signed by Microsoft. They could then provide keys that chain back to the key in (3) to whoever was interested, using whatever policy they wanted. This is a great deal easier than getting their key into every platform's firmware, but means that an overly lax security policy could result in blacklisting by Microsoft. We'll see if anyone decides to make that happen. 
     
      Posted Oct 11, 2012 15:14 UTC (Thu)
                               by rgmoore (✭ supporter ✭, #75)
                              [Link] 
       
     
      Posted Oct 11, 2012 0:27 UTC (Thu)
                               by jcm (subscriber, #18262)
                              [Link] (5 responses)
       
     
    
      Posted Oct 11, 2012 0:30 UTC (Thu)
                               by vonbrand (subscriber, #4458)
                              [Link] (3 responses)
       I guess that won't fly: This would open the door to boot any random junk. 
     
    
      Posted Oct 11, 2012 1:58 UTC (Thu)
                               by geofft (subscriber, #59789)
                              [Link] (2 responses)
       
     
    
      Posted Oct 11, 2012 4:18 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] 
       
     
      Posted Oct 11, 2012 12:07 UTC (Thu)
                               by vonbrand (subscriber, #4458)
                              [Link] 
       "User's informed consent" when they have been conditioned to just click on any random carefully-designed-for-scary-look dialog that pops up, as otherwise you won't ever get anything done... Yeah, right. Check that one. 
     
      Posted Oct 11, 2012 4:17 UTC (Thu)
                               by mjg59 (subscriber, #23239)
                              [Link] 
       
     
      Posted Oct 11, 2012 8:11 UTC (Thu)
                               by epa (subscriber, #39769)
                              [Link] (11 responses)
       
     
    
      Posted Oct 11, 2012 9:33 UTC (Thu)
                               by dgm (subscriber, #49227)
                              [Link] (2 responses)
       
     
    
      Posted Oct 11, 2012 13:21 UTC (Thu)
                               by pjones (subscriber, #31722)
                              [Link] 
       
     
      Posted Oct 11, 2012 17:23 UTC (Thu)
                               by Flukas88 (guest, #87138)
                              [Link] 
       
     
      Posted Oct 11, 2012 13:27 UTC (Thu)
                               by gidoca (subscriber, #62438)
                              [Link] (4 responses)
       
     
    
      Posted Oct 11, 2012 14:33 UTC (Thu)
                               by pjones (subscriber, #31722)
                              [Link] (1 responses)
       
     
    
      Posted Oct 11, 2012 14:45 UTC (Thu)
                               by pjones (subscriber, #31722)
                              [Link] 
       
     
      Posted Oct 11, 2012 14:52 UTC (Thu)
                               by epa (subscriber, #39769)
                              [Link] (1 responses)
       
Clearly, if you can plug in a USB key then you have physical access to the machine.  The criterion for defeating malware is surely that you can't change the bootloader without physical access.  Somebody with that access could equally well install a keylogger or (in principle) just replace the motherboard with a trojaned one. 
In fact, you could argue that physically plugging something in is how it should have worked from the beginning.  Like an old Nintendo console, your PC or tablet device could come with a Windows cartridge installed, and if you want to boot something else you have to remove that and plug in a different cartridge (which may still allow booting Windows if you wish).  Unfortunately that would make the devices a couple of dollars more expensive, so we have these shenanigans with signed bootloaders instead. 
     
    
      Posted Oct 11, 2012 15:09 UTC (Thu)
                               by raven667 (subscriber, #5198)
                              [Link] 
       
     
      Posted Oct 11, 2012 15:07 UTC (Thu)
                               by raven667 (subscriber, #5198)
                              [Link] (2 responses)
       
     
    
      Posted Oct 11, 2012 15:37 UTC (Thu)
                               by Cyberax (✭ supporter ✭, #52523)
                              [Link] (1 responses)
       
     
    
      Posted Oct 11, 2012 19:14 UTC (Thu)
                               by dlang (guest, #313)
                              [Link] 
       
     
      Posted Oct 11, 2012 15:33 UTC (Thu)
                               by mpalamara (guest, #69530)
                              [Link] 
       
     
      Posted Oct 11, 2012 22:37 UTC (Thu)
                               by Richard_J_Neill (subscriber, #23093)
                              [Link] (3 responses)
       
Also, will the LXF make a version without the present user check? For example, if I wanted to boot a machine off Knoppix, and to ensure that every time after a power-cut, it would come up automatically and unattended?    
     
    
      Posted Oct 12, 2012 3:25 UTC (Fri)
                               by pjones (subscriber, #31722)
                              [Link] 
       
So the firmware downloads shim.efi from the server, and then it does whatever steps it needs to after that using UEFI APIs. 
     
      Posted Oct 12, 2012 3:30 UTC (Fri)
                               by jmorris42 (guest, #2203)
                              [Link] (1 responses)
       
We need to always vote with our wallets for open hardware.  But if want to continue to evangelize the unconverted we need these compromises to get Linux to boot in some fashion on their DRM encumbered hardware.  No it won't be as clean or open as now. 
     
    
      Posted Oct 12, 2012 5:54 UTC (Fri)
                               by mjg59 (subscriber, #23239)
                              [Link] 
       
     
    The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
> pretty much useless.
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
> to this plan
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
> analogous to this plan
The Linux Foundation's UEFI secure boot system
      
2) The MOK database - this is checked in order to allow users to modify their trusted keys without having to use firmware-specific UI
3) A built in database - this is baked in at build time. The idea here is for the distribution to include their public key in shim when they build it, and after that shim will trust any binaries built and signed by that distribution.
The Linux Foundation's UEFI secure boot system
      Is there a way to change the EFI keys programatically?
There shouldn't be a way of doing this programatically, since it undermines the whole point of the secure boot system.  The goal of the system is to make sure that you can't run unsigned code without user intervention.  If you could bypass the secure boot without user intervention, then malicious code could do exactly the same thing and the system would be worthless for preventing boot sector malware.  The goal of all these open source approaches to secure boot is to let open source take advantage of the real benefits of the system.
      
          The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      The Linux Foundation's UEFI secure boot system
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
Present user test
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
The Linux Foundation's UEFI secure boot system
      
           