Vulnerability in tpm package: Fix Reference Counting for struct tpm_chip
Summary
GSD-2022-1002285: tpm: fix reference counting for struct tpm_chip. Affects Kernel versions >= fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66, < a27ed2f3695baf15f9b34d2d7a1f9fc105539a81. No fix is published. How to fix ↓
Check if this vulnerability affects your application
Upload a manifest or SBOM and we'll show whether you're affected, plus every other risky package in the same scan.
No signup required · Results in about 60 seconds
Background
The tpm package is a component of the Linux Kernel that provides support for Trusted Platform Modules (TPMs). TPMs are hardware devices that provide cryptographic functions and secure storage for keys, measurements, and other sensitive data. The tpm_chip structure represents a TPM chip and is used by various drivers and subsystems within the kernel. This vulnerability in the tpm package relates to a flaw in the reference counting mechanism for the struct tpm_chip, which can lead to use-after-free and double-free vulnerabilities.
Vulnerability Detail
The vulnerability arises from incorrect reference counting in the struct tpm_chip. When multiple references to a tpm_chip are held, improper handling of reference counting can result in use-after-free or double-free vulnerabilities. An attacker could exploit this vulnerability to execute arbitrary code, escalate privileges, or cause a denial-of-service condition. The vulnerability was introduced in version v4.12 of the Linux Kernel and is fixed in version v5.4.189.
How To Fix
No fixed version is published for this vulnerability.
Tip — Not sure whether your app is affected? Vulert can check the versions your app actually runs. Scan free →
Workaround
If updating the Linux Kernel is not immediately feasible, a possible workaround is to disable the TPM driver or module. This can be done by blacklisting the tpm module or removing the tpm driver from the kernel configuration. However, this workaround may impact the functionality of TPM-related features and should be considered temporary until the kernel can be updated.
Conclusion
The vulnerability in the tpm package's struct tpm_chip reference counting mechanism can lead to use-after-free and double-free vulnerabilities. It is crucial to update the Linux Kernel to version v5.4.189 or later to mitigate this vulnerability. If immediate updating is not possible, disabling the TPM driver or module can serve as a temporary workaround. For further support and assistance in vulnerability remediation, please contact DevNack.com.
See every vulnerability recorded for Kernel →
FAQ
The vulnerability can allow an attacker to execute arbitrary code, escalate privileges, or cause a denial-of-service condition.
You can use the Vulert Playground at Vulert Scanner to check if your system is affected by this vulnerability. Simply upload your package-lock.json file to the playground and it will alert you in real-time if the vulnerability is present.
Yes, the vulnerability is fixed in version v5.4.189 of the Linux Kernel. It is recommended to update to this version or later to mitigate the vulnerability.
At the time of this report, there are no known public exploits for this vulnerability. However, it is important to apply the fix as soon as possible to prevent potential exploitation.
Yes, disabling the TPM driver or module can serve as a temporary workaround until the kernel is updated. However, this may impact TPM-related functionality and should be considered a temporary solution.
Related vulnerabilities
Recent vulnerabilities recorded for Kernel.