CVE-2022-49287

7.8 HIGH

📋 TL;DR

This is a use-after-free vulnerability in the Linux kernel's TPM (Trusted Platform Module) subsystem. It allows local attackers to potentially crash the system or execute arbitrary code by exploiting improper reference counting when TPM modules are removed while devices are still open. Systems using TPM hardware with affected kernel versions are vulnerable.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution, generally 5.10.x and earlier affected versions)
Operating Systems: Linux distributions using affected kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Requires TPM hardware and the tpm_tis_spi module (or similar TPM modules). Systems without TPM hardware or with TPM disabled are not vulnerable.

📦 What is this software?

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

Linux Kernel by Linux

The Linux Kernel is the core component of the Linux operating system, serving as the critical interface between computer hardware and software processes. As the heart of millions of servers, cloud infrastructure, embedded systems, Android devices, and IoT deployments worldwide, the Linux Kernel mana...

Learn more about Linux Kernel →

⚠️ Risk & Real-World Impact

🔴

Worst Case

Local privilege escalation to kernel-level code execution, potentially leading to complete system compromise.

🟠

Likely Case

Kernel panic or system crash causing denial of service.

🟢

If Mitigated

No impact if proper access controls prevent local users from accessing TPM devices or loading/unloading kernel modules.

🌐 Internet-Facing: LOW - Requires local access to exploit.
🏢 Internal Only: MEDIUM - Local attackers with access to TPM devices could exploit this vulnerability.

🎯 Exploit Status

Public PoC: ✅ No
Weaponized: UNKNOWN
Unauthenticated Exploit: ✅ No
Complexity: MEDIUM

Exploitation requires local access and ability to load/unload kernel modules. The vulnerability is in the TPM subsystem reference counting logic.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Kernel versions containing commits 290e05f346d1829e849662c97e42d5ad984f5258 and related fixes

Vendor Advisory: https://git.kernel.org/stable/c/290e05f346d1829e849662c97e42d5ad984f5258

Restart Required: No

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. For custom kernels, apply commits 290e05f346d1829e849662c97e42d5ad984f5258 and 2f928c0d5c02dbab49e8c19d98725c822f6fc409. 3. Rebuild and install the kernel.

🔧 Temporary Workarounds

Restrict TPM device access

all

Limit access to /dev/tpm* devices to prevent exploitation

chmod 600 /dev/tpm*
chown root:root /dev/tpm*

Disable TPM module autoloading

all

Prevent automatic loading of TPM modules

echo 'blacklist tpm_tis_spi' >> /etc/modprobe.d/blacklist.conf
echo 'blacklist tpm_tis_core' >> /etc/modprobe.d/blacklist.conf

🧯 If You Can't Patch

  • Restrict local user access to systems with TPM hardware
  • Implement strict module loading policies using capabilities or SELinux/AppArmor

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if TPM modules are loaded: uname -r && lsmod | grep tpm

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version is patched and test by attempting to reproduce the sequence: open /dev/tpmrm, remove tpm_tis_spi module, write to file descriptor

📡 Detection & Monitoring

Log Indicators:

  • Kernel warnings about refcount_t: addition on 0; use-after-free
  • System crashes or kernel panics related to TPM operations
  • Failed attempts to load/unload TPM modules

Network Indicators:

  • None - local vulnerability only

SIEM Query:

source="kernel" AND ("refcount_t" OR "use-after-free" OR "tpm")

🔗 References

📤 Share & Export