cryptsetup: measure volume key and keyslot via the pcrextend Varlink service (#43109)
Motivated by https://github.com/systemd/systemd/pull/43041#discussion_r3595022610. Switch systemd-cryptsetup's volume-key and keyslot measurements from driving the TPM directly (tpm2-util) to the io.systemd.PCRExtend Varlink service, aligning it with how the verity and imds measurements already work. Some notes on decisions taken: - The volume key is sent over the wire. systemd-pcrextend will do the hmac. The socket is root only. Otherwise we would need to do bank negotiation via varlink and pollute the interface with it. - `tpm2-measure-bank=` deprecated/dropped. Same reason as above. - `tpm2-device=` now only affects unlocking. The device for measurements is selected by pcrextend. - Measuring requires the presence of `systemd-pcrextend.socket` in the initrd, should be already given as systemd-veritysetup relies on it, too. - Logs are done on the pcrextend side.
This commit is contained in:
@@ -31,6 +31,12 @@ CHANGES WITH 262:
|
||||
older systemd versions, however systemd continues to accept TPM-sealed
|
||||
credentials that were created before this change.
|
||||
|
||||
* The "tpm2-measure-bank=" crypttab option of systemd-cryptsetup is
|
||||
now deprecated and has no effect. Volume key measurements are
|
||||
performed via varlink call to systemd-pcrextend, which automatically
|
||||
selects all suitable TPM2 PCR banks; the banks can no longer be
|
||||
restricted per volume.
|
||||
|
||||
* The legacy socket for controlling systemd-udevd has been removed, and
|
||||
udevadm now unconditionally uses Varlink IPC. The legacy UNIX socket
|
||||
/run/udev/control, which is sometimes used to check whether udevd is
|
||||
|
||||
Reference in New Issue
Block a user