Page MenuHomeFreeBSD

bhyve: reinitialise swtpm's TPM at startup
Needs ReviewPublic

Authored by quentin.thebault_defenso.fr on Wed, Sep 2, 1:47 PM.

Details

Reviewers
corvink
Group Reviewers
bhyve
Summary

bhyve does not currently reinitialise swtpm on startup, which results in
PCRs being carried over across reboots. This means that any guest VM
implementing measured boot controls, such as Windows with BitLocker and
Secure Boot enabled, will consider the system compromised and refuse to
start or ask for a recovery key.

swtpm has a control channel that allows us to send commands for that
purpose: CMD_INIT shuts the TPM down and starts it again. When swptpm
has been configured with flags startup-clear, it clears the PCRs, like a
cold boot on real hardware.

Connect a second socket when the new ctrl_path option is set and send
CMD_INIT there. Without the option nothing changes.

MFC after: 2 weeks
Sponsored by: Defenso

Signed-off-by: Quentin Thébault <quentin.thebault@defenso.fr>

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Skipped
Unit
Tests Skipped
Build Status
Buildable 76405
Build 73288: arc lint + arc unit