CVE-2022-49724

7.8 HIGH

📋 TL;DR

This CVE describes a use-after-free vulnerability in the Linux kernel's goldfish TTY driver where free_irq() is called with an incorrect device ID during driver removal. This can cause kernel warnings and potential system instability. It affects Linux systems using the goldfish TTY driver, typically in virtualization environments like Android emulators.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Linux kernel versions before the fix commits (specific versions vary by distribution)
Operating Systems: Linux distributions with vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Primarily affects systems using the goldfish TTY driver, commonly found in Android emulators and virtualization environments. Not all Linux installations include this driver.

📦 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 →

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

Kernel panic or system crash leading to denial of service, potentially allowing privilege escalation if combined with other vulnerabilities.

🟠

Likely Case

Kernel warning messages and system instability when the goldfish TTY driver is unloaded, causing denial of service for affected virtualized environments.

🟢

If Mitigated

Minor system warnings with no significant impact if the driver isn't actively used or removed.

🌐 Internet-Facing: LOW - This is a kernel driver issue that requires local access or virtualization environment access.
🏢 Internal Only: MEDIUM - Could affect virtualized development environments, emulators, or containers using the goldfish driver.

🎯 Exploit Status

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

Exploitation requires local access and ability to trigger driver removal. The vulnerability is in driver cleanup code, making reliable exploitation challenging.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Linux kernel versions containing commits: 499e13aac6c7, 65ca4db68b68, a6fcd7ffd76a, c4b0b8edccb0, or c83a1d40dc62

Vendor Advisory: https://git.kernel.org/stable/c/499e13aac6c762e1e828172b0f0f5275651d6512

Restart Required: Yes

Instructions:

1. Update Linux kernel to patched version from your distribution vendor. 2. For custom kernels, apply the relevant commit from kernel.org. 3. Reboot system to load new kernel.

🔧 Temporary Workarounds

Disable goldfish TTY driver

Linux

Prevent loading of the vulnerable driver module

echo 'blacklist goldfish_tty' >> /etc/modprobe.d/blacklist.conf
rmmod goldfish_tty

🧯 If You Can't Patch

  • Avoid using Android emulators or virtualization environments that load the goldfish driver
  • Implement strict access controls to prevent unauthorized users from unloading kernel modules

🔍 How to Verify

Check if Vulnerable:

Check if goldfish_tty module is loaded: lsmod | grep goldfish_tty. Check kernel version against patched versions.

Check Version:

uname -r

Verify Fix Applied:

Verify kernel version includes fix commits. Check dmesg for absence of 'Trying to free already-free IRQ' warnings during driver operations.

📡 Detection & Monitoring

Log Indicators:

  • Kernel logs showing 'WARNING: CPU: 0 PID: 30 at kernel/irq/manage.c:1895 free_irq'
  • 'Trying to free already-free IRQ' messages in dmesg

Network Indicators:

  • None - this is a local kernel vulnerability

SIEM Query:

source="kernel" AND "free already-free IRQ" OR "goldfish_tty" AND "WARNING"

🔗 References

📤 Share & Export