logoalt Hacker News

staff3203yesterday at 5:22 AM2 repliesview on HN

On my system, I used `tpm2-measure-pcr=yes` in `/etc/crypttab.initramfs`, then used `--tpm2-pcrs=0+2+7+15:sha256=0000000000000000000000000000000000000000000000000000000000000000` with `systemd-cryptenroll`.

As soon as a volume is decrypted, initrd will write `volume-key` to PCR 15, so any further executables can no longer access the data stored in the TPM.


Replies

usr1106yesterday at 9:03 AM

Yes, that seems a good extra level of defense. Allow unsealing only once. We extend a PCR with random data.

show 1 reply
oddlamayesterday at 12:20 PM

This is great if you only have a single disk, but if you have multiple encrypted disks that are unlocked in the initrd this way, then if you can gain control flow by faking data on the last decrypted disk you can still gain access to all the previously unlocked partitions.

Of course you cannot unseal the secret from the TPM anymore.

show 3 replies