Hibernation doesn't work?
Hibernation doesn't work?
Posted Sep 13, 2012 1:31 UTC (Thu) by JoeBuck (subscriber, #2330)Parent article: LSS: Secure Boot
Says who? I use hibernation on a regular basis. While some users have reported problems on some systems, it works reliably for many. If Red Hat decides to disable hibernation to appease Microsoft, I guess I'll have to go elsewhere.
Why can't hibernation sign the memory dump and verify it on restart?
Posted Sep 13, 2012 1:46 UTC (Thu)
by corbet (editor, #1)
[Link] (18 responses)
Posted Sep 13, 2012 2:27 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (15 responses)
Posted Sep 13, 2012 4:22 UTC (Thu)
by alonz (subscriber, #815)
[Link]
Posted Sep 13, 2012 12:10 UTC (Thu)
by PaXTeam (guest, #24616)
[Link] (13 responses)
and at this point you're going to provide us with proof that the kernel has no information leaking vulnerabilities, right? ;)
Posted Sep 13, 2012 16:53 UTC (Thu)
by hummassa (subscriber, #307)
[Link]
Posted Sep 13, 2012 18:46 UTC (Thu)
by Cyberax (✭ supporter ✭, #52523)
[Link] (1 responses)
Posted Sep 13, 2012 19:32 UTC (Thu)
by PaXTeam (guest, #24616)
[Link]
Posted Sep 13, 2012 20:56 UTC (Thu)
by mjg59 (subscriber, #23239)
[Link] (9 responses)
1) Shim or grub generates keypair and passes the private key to kernel. The public key is saved in a boot services variable, preventing it being read by the running OS.
Since the key is specific to the combination of the machine and the boot, an attacker shouldn't be able to deploy a pre-packaged attack. Am I missing something?
Posted Sep 14, 2012 15:51 UTC (Fri)
by hummassa (subscriber, #307)
[Link] (8 responses)
The fact that the new private key is in memory and the malware can use it to craft and then sign the restore image, that will be restored normally. Damn, the malware can bypass this altogether and generate the pair on the fly, sign the image, and store the public key in the appropriate place.
Posted Sep 14, 2012 16:12 UTC (Fri)
by mjg59 (subscriber, #23239)
[Link] (7 responses)
No it can't - you can't set boot services variables from within the OS.
Posted Sep 14, 2012 16:51 UTC (Fri)
by hummassa (subscriber, #307)
[Link] (6 responses)
Posted Sep 14, 2012 17:08 UTC (Fri)
by mjg59 (subscriber, #23239)
[Link]
Posted Sep 14, 2012 17:19 UTC (Fri)
by raven667 (subscriber, #5198)
[Link] (4 responses)
Even in the case where there is malware running on a system you should still be able to perform a clean boot with verification up to the point where your trust chain stops. Then the problem is post-boot (re)compromise and you can use many tools to combat that, if you can get them into your trusted base.
Posted Sep 14, 2012 19:48 UTC (Fri)
by hummassa (subscriber, #307)
[Link] (3 responses)
No, because crafting a special restore-image/swapfile and forcing a reboot you can, for instance, boot a whole another OS altogether, totally bypassing the "secure" boot nonsense.
> Even in the case where there is malware running on a system you should still be able to perform a clean boot with verification up to the point where your trust chain stops. Then the problem is post-boot (re)compromise and you can use many tools to combat that, if you can get them into your trusted base.
No, because at that point the "phantom" OS can just behave like the "original" OS with a rootkit, rendering symptoms of infection invisible to the original OS.
Suppose the machine is running Windows8, ok? The malware prepares an image that will run some OS that will run Windows8 in an emulated, censored environment that can make a lot of bad things, invisibly to W8. Everytime W8 tries to reboot, it goes thru the hoops again and boots instead the other OS.
Posted Sep 14, 2012 20:59 UTC (Fri)
by raven667 (subscriber, #5198)
[Link]
- Hibernate images are outside the trust boundary because they contain arbitrary code
I don't think Secure Boot attempts or claims to solve the problems of running arbitrary code it only allows you to build a beachhead, ideally an execution chain all the way until user space starts that can't be modified without throwing alarms. That means that re-compromise of a system needs to happen via the normal startup sequence and tools started before the malware can run can potentially block the malware. Once the malware runs it's Blue Pill all the way, you can't trust anything on the system after that.
Posted Sep 14, 2012 22:56 UTC (Fri)
by mjg59 (subscriber, #23239)
[Link] (1 responses)
Yes, and if you can get private information out of the kernel then you can probably also get private information *into* the kernel, and then you can just make the kernel execute your other OS without doing anything with hibernation.
Posted Sep 15, 2012 2:03 UTC (Sat)
by raven667 (subscriber, #5198)
[Link]
Posted Sep 13, 2012 10:09 UTC (Thu)
by etienne (guest, #25256)
[Link] (1 responses)
Posted Sep 13, 2012 13:27 UTC (Thu)
by pjones (subscriber, #31722)
[Link]
There's nothing with our Secure Boot implementation that prevents this from working exactly as it does now on UEFI systems.
Posted Sep 13, 2012 15:34 UTC (Thu)
by cortana (subscriber, #24596)
[Link]
Signing the dump would require having the private key in the kernel. An attacker who could mess with the hibernation image would likely have little difficulty finding that key; after that, the game is done.
Hibernation doesn't work?
Hibernation doesn't work?
1) During the initial boot you generate a random keypair in the shim loader. Store the public part the keypair in the UEFI storage.
2) Kernel keeps the private key in RAM during the normal processing.
3) Use this private key to sign the hibernation image and then discard it (of course, taking care not to write it into the image).
4) During boot you first load the known-good-kernel (checked by the shim) which can then retrieve the public key from the shim and check the signature.
5) If signature matches, it then can load the image.
You forgot step 6: generate a new keypair for use with the next hibernation (as the process obviously lost the original private key from step 1).
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
2) Kernel encrypts the suspend image.
3) Shim (or grub) generates a new keypair and saves the public key. It passes the new private key and the old public key to the kernel, and then wipes the old public key from the variable store.
4) Kernel verifies that the swap image is appropriately signed and then discards the old public key. The new private key is kept so the user can hibernate again.
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
- The fix is to not restore hibernate images
- The proposed signature checking on hibernate images could protect an un-compromised system on disk from being modified before being restored
- There is no security added for a system booted in a VM
- There is no attestation in Secure Boot, a running system can't tell if it's been compromised or not
Hibernation doesn't work?
Hibernation doesn't work?
Hibernation doesn't work?
I also note that having multiple Linux distributions on a single PC will be a problem.
Hibernation doesn't work?
Hibernation doesn't work?