by arjvik on 1/17/25, 3:00 AM with 129 comments
by staff3203 on 1/17/25, 5:22 AM
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.
by rollcat on 1/17/25, 4:03 PM
[0]: https://0pointer.de/blog/brave-new-trusted-boot-world.html
Then I read about the implementation details[0], and it's a complex bloody mess with an unending chain of brittle steps and edge cases, that are begging for a mistake and get exploited. So here we are.
I'm convinced that "measure the kernel" into "measure the initrd" into "show login screen" is all it should take.
by acheong08 on 1/17/25, 4:12 AM
Entering a password on boot isn't even that much work
by ARob109 on 1/17/25, 5:24 AM
Store the root hash of the dm verity formatted rootfs in the PCR. If a malicious partition is presented to initrd, its root hash will not match the trusted one stored in the TPM.
Or if you need a writeable rootfs, use fs verity and store the signature of init into the PCR. The trusted init signature won’t match signature of malicious init.
LUKS for encryption and verity for integrity/verification.
by keeperofdakeys on 1/17/25, 5:15 AM
Also AFAIK there is no standard way to guess the new PCRs on reboot so you can't pre-update them before rebooting. So you either need to unlock manually or use a network decryption like dracut-sshd.
by blastrock on 1/17/25, 6:47 PM
I am the author of one of the older guides https://blastrock.github.io/fde-tpm-sb.html .
I was wondering about the solution you propose which seems a bit complicated to me. Here's my idea, please tell me if I'm completely wrong here.
What if I put a file on the root filesystem with some random content (say 32 bytes), let's name it /prehash. I hash this file (sha256, blake2, whatever). Then, in the signed initrd, just after mounting the filesystem, I assert that hash(/prehash) == expected_hash or crash the system otherwise. Do you think it would be enough to fix the issue?
by fguerraz on 1/17/25, 9:30 AM
I personally replace the firmware certificates (PK, KEK, db, dbx, …) with my own and sign every kernel/initrd update, I also unlock my disks with a passphrase anyways, but I'm on the fence WRT if it's more secure than TPM.
Yes in theory TPM key extraction is feasible (and even easy if it's performed by a chip other than your CPU https://pulsesecurity.co.nz/articles/TPM-sniffing ) but it is harder than filming/watching you type the passphrase or installing a discrete key-logger ?
by tommiegannert on 1/17/25, 7:28 AM
So if you use this PCR state machine, the problem is that the step before initrd doesn't require the correct password to move the PCR forward? It accepts any password that decrypts the next stage, which didn't have its integrity verified here.
Seems there are multiple ways of solving this, and adding integrity checks is only one. It could also let the TPM verify the disk decryption password (when it's needed.)
by kukrimate on 1/25/25, 1:10 PM
Capping off the PCRs with any arbitrary value before execing into root would stop this.
by lxgr on 1/17/25, 8:26 PM
Does the default configuration not somehow tangle a user-entered password to authentication against the TPM?
That's still not perfect (i.e. how do you make PIN/password entry non-keyloggable), but anything else, in particular extending the trusted computing base to the entire kernel and the hardware it runs on and hoping that they will both be bug-free and impossible to impersonate, seems like a bad idea.
The TPM is also in a much better position to properly velocity check PIN/password entries than the OS.
by huslage on 1/17/25, 5:19 AM
by honestSysAdmin on 1/18/25, 8:22 AM
We have had not just secure boot but had it better on Linux (and other Unix-like) systems for a very long time.
by varispeed on 1/17/25, 9:01 PM
If someone steals the NAS how easily can they get to the data? Assuming volumes are encrypted, but the are automatically mounted on boot?
How to ensure the data is safe in case of theft.
by mateusz834 on 1/17/25, 11:06 AM
by tiberious726 on 1/17/25, 4:16 PM
by shitter on 1/17/25, 2:25 PM
Edit: never mind, I think it's still vulnerable.
by kopirgan on 1/17/25, 9:45 AM
I recently changed motherboard on my laptop, had the bitlocker key if not I was told I'll have to reinstall Windows all over again.
Even with the key, one must decrypt and re-encrypt.
by jdoss on 1/17/25, 5:26 PM