The TPM bus encryption and integrity protection changes prepared by @jejb and @jarkko were merged for #Linux 6.10: https://git.kernel.org/torvalds/c/b19239143e393d4b52b3b9a17c7ac07138f2cfd4
"[…] The key pair on TPM side is generated from so called null random seed per power on of the machine [1]. This supports the TPM encryption of the hard drive by adding layer of protection against bus interposer attacks. […]"
I should publish this humble and not so exciting crate (stalled since Dec) and now I found the motivating factor. I make it compile with gccrs
.
Maybe this will leads to contributions, who knows, or epic failure but should be interesting and exciting in all cases :-)
The stimulus obviously comes from GCC 14 release, which has the first experimental version of gccrs
. And in my free time I do prefer GPL licensed code base for utilities and apps over MIT/Apache, so gccrs
makes more sense for me than rustc
in that sense (and not judging other viewpoints, it is my personal and subjective preference).
@lindi2 @pid_eins good news, Linus pulled my PR’s in queue:https://social.kernel.org/notice/AhrCE3Z7RqcBa1p1Hc. So the changes are now in the mainline.
For security research: HMAC pipe is for the kernel clients we do not want to layer /dev/tpm0
. It can be done just as well in the user space (and should be when required).
I.e. right now for trusted keys, and soon’ish for asymmetric keys (feature requried for x.509 certificates [1]). You can also grep the call sites by:
$ git grep "tpm2_start_auth_session(.*);"
drivers/char/tpm/tpm2-cmd.c: rc = tpm2_start_auth_session(chip);
drivers/char/tpm/tpm2-cmd.c: err = tpm2_start_auth_session(chip);
include/linux/tpm.h:int tpm2_start_auth_session(struct tpm_chip *chip);
security/keys/trusted-keys/trusted_tpm2.c: rc = tpm2_start_auth_session(chip);
security/keys/trusted-keys/trusted_tpm2.c: rc = tpm2_start_auth_session(chip);
security/keys/trusted-keys/trusted_tpm2.c: rc = tpm2_start_auth_session(chip);
x.509 part will be 6.11 feature.
[1] https://datatracker.ietf.org/doc/draft-woodhouse-cert-best-practice/ NOTE: a bit out of date, I chatted quickly with David and he is planning to remove TPM 1.2 and DSA keys from the draft.
My first trial to split pull request to TPM, trusted keys, keyring parts: all three pull requests taken by pr-tracker-bot
:—–O
One more left for asymmetric keys. Cannot believe this, I always screw up with this dance at least first time :-) Really made my Monday!