-
Notifications
You must be signed in to change notification settings - Fork 77
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Encrypted /boot partition - when/how to seal keyfile? #22
Comments
I'm currently working on the same setup. I am trying to use tpm-sealdata-raw while i'm in the OS to seal my keyfile. When sealing only to PCRs 0-9, my boot process works without a problem. Here's what I have so far for the other PCRs: PCR 10 contains thing like the linux-kernel and initird, which you will only be able to access after mounting the encrypted partition with the sealed file. Therefore, sealing to PCR 10 would not make sense in this case. (Also, the PCR is still at all 0s at this stage) Sealing to PCR 12 works - The LUKS header does not change, so this can be done PCR 11 is a bit tricky. In my setup, after the cryptomount command is executed, there are still multiple measurements that influence PCR 11, which I don't want, because I want it to be the same once my OS is booted up as during the cryptomount command is executed.
Further, I patched TrustedGRUB2 so that the linux and initrd command are not measured into PCR 11. (Since the linux-kernel and the initrd itself are anyway measured into PCR10, I don't see a problem with that) The last PCR is 13, which includes "Parts of GRUB2 that are loaded from disk like GRUB2-modules". Here, a lot of things are also measured after the cryptomount command, so you won't be able to seal your file to the value PCR 13 has once the OS is booted up. One more thing that I still need to figure out: Even if I manage to seal my file to PCR 11, which measures all the commands and arguments to scripts, what would prevent an attacker from booting up the system, edit the boot entry, remove the last four lines (which would in my case be echo, linux, echo, initrd), and then press f10 so that all other commands are executed in the right order and cryptomount successfully mounts the encrypted disk? In this case, the attacker would be able to enter a GRUB command shell and have access to the unencrypted partition... |
Add various small patches to improve netboot support
It's been quite a while since the earlier posts, but this issue doesn't seem to be dealt with anywhere, so I think it's worth discussing.. I'm working with a modified version of the CoreOS GRUB package (TPM 2.0 support on EFI systems). I've modified it so it can read PCR locked data from nvram, which is analogous to the TrustedGRUB2 sealed file support. The way I deal with the problem you've been discussing is as follows;
|
Unfortunately, this project is deprecated and no longer maintained. I will be closing this issue. |
I am thinking of using TrustedGRUB2 in a situation where the /boot partition is encrypted, with only TG2 itself being on a clear partition. I understand from the readme that the use of a sealed keyfile is supported for bootloader-stage decryption of /boot. So far so good.
However, in order to actually take the proper measurements and seal the keyfile, I would have to do so within the TG2 boot process itself, wouldn't I? Since doing it later would mean that PCR 10 will be in a different state due to loading the /boot contents.
Furthermore, I wonder how this interacts with PCR 11 and PCR 12.
Perhaps you can clarify what the proper process of using TG2 in such a scenario might be - I take it from the extension of the cryptomount command that this is an intended use case?
The text was updated successfully, but these errors were encountered: