-
Notifications
You must be signed in to change notification settings - Fork 34
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
[RFE] full-disk encryption leveraging systemd-cryptsetup and TPM #593
Comments
I see this as blocked on using systemd-boot #867 because of this whole signed PCR policy topic which is needed for unlocking after OS updates. |
Any idea when are we planning to release this bug? This is important from a security point of view. |
I agree and we're always looking for volunteers that have the time and expertise to help out on topics such as this one. This issue involves changes to many parts of the OS. |
A first version of this should use the TPM as simple key store, without a protection. It has some security benefits over storing the key to hard disk thus prevents a "hard disk copy attack" but doesn't offer protection against online system compromise where root or an alternatively booted OS can kindly ask the TPM to give the key. |
Our internal appsec team has flagged the lack of LUKS2 support. Can this be escalated please @t-lo ? |
I wrote some assessment of the current state in #590 (comment) Currently for TPMs that means either not binding to PCRs or disabling auto-updates. One could also try to make use of systemd-pcrlock together with GRUB with some update-integration to loosen security for the update reboot. |
The next Alpha will be able to set up a TPM-backed rootfs with clevis or systemd-cryptenroll. There are no docs yet except for the example in the linked PR and the one below. Also for clevis one needs to write a plain Ignition JSON file and for systemd-cryptenroll one needs to add a helper service in the Butane YAML/Ignition JSON config. Clevis example:
|
Hello, I tried the following workflow, but at the next reboot I get a hanging systemd
|
The new nightly should work, as it needs this PR flatcar/scripts#1807 |
Yes, it needs the PR that was just merged.
|
Docs PR: flatcar/flatcar-website#317 |
Disk encryption works in the Flatcar Alpha release with some limitations due to GRUB measures the OS state and how it changes after first boot. But one can already try it out as mentioned in the docs PR above and it gives some security benefits. We hope to improve this in Flatcar and also address some holes in the design.
|
Current situation
Flatcar doesn't currently support full-disk encryption AFAIK.
Impact
Ideal future situation
Disks are encrypted, leveraging the TPM as a secret store to bind to a specific machine. We can also make it so the machine must boot up with the installed flatcar in order to access the encrypted disk (eliminating the attack vector of booting into a different OS on the machine in order to unlock the disk).
Implementation options
From systemd 248, systemd-cryptsetup supports three hardware encryption techniques including TPM based. See https://0pointer.net/blog/unlocking-luks2-volumes-with-tpm2-fido2-pkcs11-security-hardware-on-systemd-248.html for details.
Additional information
We should also consider removable media. While not an issue for most servers, still there is the potential attack vector of inserting a USB drive to exfiltrate data, which could be mitigated by making that drive only work when inserted into the server.
The text was updated successfully, but these errors were encountered: