Skip to content

systemd: build without TPM2 support - #689

Closed
JanZachmann wants to merge 1 commit into
mainfrom
jz-2026-08-21-systemd-no-tpm2
Closed

systemd: build without TPM2 support#689
JanZachmann wants to merge 1 commit into
mainfrom
jz-2026-08-21-systemd-no-tpm2

Conversation

@JanZachmann

@JanZachmann JanZachmann commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary

Build systemd without its TPM2 feature set (-Dtpm2=disabled). That drops systemd-tpm2-setup.service and -early, the NvPCR initialization and the systemd-pcr* units.

Reason

systemd-tpm2-setup seals an NvPCR anchor secret into the TPM on every boot. The seal is dictionary attack protected, so it fails while the TPM's failed-tries counter sits at maxTries: the unit fails, the system state turns degraded, and an update under validation is rolled back although the update is fine. The counter climbs on its own, because every reset without an orderly TPM2_Shutdown adds one and nothing ever resets it.

Nothing uses the feature: there are no encrypted volumes, no TPM sealed credentials, and no reference to NvPCRs in this layer. The TPM stays available to the identity service, which links libtss2 directly, and to tpm2-tools. Images built before the feature was turned on report -TPM2 and ship no such unit.

The TPM2 feature set brings systemd-tpm2-setup, which since the NvPCR
addition seals an anchor secret into the TPM on every boot. That seal is
dictionary attack protected, so once the TPM's failed-tries counter is
exhausted the unit fails, the system state turns degraded, and an update
being validated is rolled back although it is fine.

None of what the feature offers is used: there are no encrypted volumes
and no TPM sealed credentials. The TPM itself keeps working for the
identity service and the tpm2 tools, which do not go through systemd.

Signed-off-by: Jan Zachmann <50990105+JanZachmann@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants