CVE-2026-98845: tpm: Disable TPM on null key name mismatch
In the Linux kernel, the following vulnerability has been resolved:
tpm: Disable TPM on null key name mismatch
The null key name check exists to protect against TPM reset attacks, so a mismatch should stop the device from serving further requests. Currently it does not disable the chip when it finds a mismatch.
The mismatch is logged:
tpm tpm0: null key integrity check failed
but the chip keeps serving commands:
/ # tpm2getcap -c properties-fixed TPMPTFAMILYINDICATOR: as UINT32: 0x08322e3000 as string: "2.0" ...
tpm2loadnull() where the null key name check is run sets the chip as disabled only if the rc is non zero. When the mismatch is seen, rc is zero at that point and it returns success. The other issue is that the caller expects the null key handle to be populated when the function returns 0 which it does here without writing the handle and proceeds assuming the null key handle is valid.
During the test, I noticed that tpm2startauthsession() uses the uninitialized stack value as the key handle since tpm2loadnull() returns 0 despite the integrity failure and proceeds with TPM2CCSTARTAUTHSESS with this value as salt key handle.
Set rc to -ENODEV on the mismatch. The error path then disables the chip and returns the correct code to the caller.
Tested in QEMU with swtpm and CONFIGTCGTPM2HMAC=y by making TPM2CCCONTEXTLOAD fail with TPM2RCINTEGRITY and changing the name of the re-created null key. The chip is now disabled on the mismatch.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Compensating control
Disable the TPM when a null key name mismatch is detected, return -ENODEV to the caller, and prevent the device from serving further requests.
Event History
Frequently Asked Questions
How can I tell whether a system has encountered this condition?
The kernel logs a null key integrity failure, for example: "tpm tpm0: null key integrity check failed". On affected code, the TPM may continue to accept commands after that message.
What condition is required for the unsafe behavior to occur?
The TPM null key name integrity check must detect a mismatch. This check is intended to protect against TPM reset attacks.
What can happen after the integrity check fails on affected kernels?
The null-key loading function can return success without populating the null key handle, while callers assume the handle is valid. A TPM authorization-session request can then use an uninitialized stack value as its salt key handle.