Vulnerability in tpm package: Fix Reference Counting for struct tpm_chip

Kernel Updated 02 Oct 2025

Summary

24/04/2022
N/A
No i
Unrated
Not published

GSD-2022-1002285: tpm: fix reference counting for struct tpm_chip. Affects Kernel versions >= fdc915f7f71939ad5a3dda3389b8d2d7a7c5ee66, < a27ed2f3695baf15f9b34d2d7a1f9fc105539a81. No fix is published. How to fix ↓

Free scan

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.

Check my app free

No signup required · Results in about 60 seconds

Upload your dependency manifest or SBOM

Drag & drop your file here or

Java Javascript PHP Python Go Rust Ruby Dart C/C++ Elixir CycloneDX SPDX

Upload a supported dependency manifest or SBOM. No installation or source-code access required.

See supported files and SBOM formats
SBOM sbom.json · bom.json · bom.xml · *.spdx.json · *.cdx.json · *.cdx.xml
Java pom.xml · gradle.lockfile · buildscript-gradle.lockfile
Javascript package-lock.json · yarn.lock · pnpm-lock.yaml
PHP composer.lock
Python poetry.lock · requirements.txt · Pipfile.lock
Go go.mod
Rust Cargo.lock
Ruby Gemfile.lock
Dart pubspec.lock
C/C++ conan.lock
Elixir mix.lock
Enter your work email to receive your report link.

Verify your email to view the full report and start 30 days of continuous monitoring. No credit card required.

Sponsored Devnack Penetration testing for web, API and mobile Manual testing by engineers who build software, not an auditor's checklist. Trusted by teams at Swift and Google Talk to Devnack

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 →

Share this vulnerability

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.

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 →

Subscribe to Vulert on Telegram
Daily digest of new CVEs, critical and high severity, affected packages and fixes — plus a weekly roundup.
Join the channel →
Help improve this record
Report an issue or send feedback