←back to thread

189 points arjvik | 4 comments | | HN request time: 0.601s | source
Show context
staff3203 ◴[] No.42734355[source]
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(2): >>42735476 #>>42736760 #
1. oddlama ◴[] No.42736760[source]
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.

replies(3): >>42737732 #>>42742055 #>>42742348 #
2. bean-weevil ◴[] No.42737732[source]
If you have tpm encryption on your boot disk, then you can simply store decryption keys for your otyer disks on it.
3. ◴[] No.42742055[source]
4. staff3203 ◴[] No.42742348[source]
What to do for a single root fs spanned over 2 encrypted partitions on 2 separate disks?