CVE-2024-53085: tpm: Lock TPM chip in tpm_pm_suspend() first
In the Linux kernel, the following vulnerability has been resolved:
tpm: Lock TPM chip in tpmpmsuspend() first
Setting TPMCHIPFLAGSUSPENDED in the end of tpmpmsuspend() can be racy according, as this leaves window for tpmhwrngread() to be called while the operation is in progress. The recent bug report gives also evidence of this behaviour.
Aadress this by locking the TPM chip before checking any chip->flags both in tpmpmsuspend() and tpmhwrngread(). Move TPMCHIPFLAGSUSPENDED check inside tpmgetrandom() so that it will be always checked only when the lock is reserved.
Other sources
In the Linux kernel, the following vulnerability has been resolved:
tpm: Lock TPM chip in tpmpmsuspend() first
Setting TPMCHIPFLAGSUSPENDED in the end of tpmpmsuspend() can be racy according, as this leaves window for tpmhwrngread() to be called while the operation is in progress. The recent bug report gives also evidence of this behaviour.
Aadress this by locking the TPM chip before checking any chip->flags both in tpmpmsuspend() and tpmhwrngread(). Move TPMCHIPFLAGSUSPENDED check inside tpmgetrandom() so that it will be always checked only when the lock is reserved.
— NVD
This CVE was automatically created from a reference found in an email or other text. If you are reading this, then this CVE entry is probably erroneous, since this text should be replaced by the official CVE description automatically.
— Launchpad
Affected Software
Remediation
Event History
Frequently Asked Questions
What is the severity of CVE-2024-53085?
CVE-2024-53085 is rated as a medium severity vulnerability due to the potential for race conditions in the TPM handling code.
How do I fix CVE-2024-53085?
To fix CVE-2024-53085, update the Linux kernel to a version that is 6.12-rc7 or later, or apply the appropriate patches provided by kernel maintainers.
Which versions of the Linux kernel are affected by CVE-2024-53085?
CVE-2024-53085 affects Linux kernel versions from 6.4 to 6.11.8 and specific 6.12 release candidates.
What component of the Linux kernel is impacted by CVE-2024-53085?
CVE-2024-53085 impacts the TPM (Trusted Platform Module) handling in the Linux kernel.
Is CVE-2024-53085 exploitable in production environments?
Yes, CVE-2024-53085 may be exploitable in production environments if the affected kernel versions are in use and TPM functionality is enabled.