CVE-2022-49823

5.5 MEDIUM

📋 TL;DR

This CVE describes a NULL pointer dereference vulnerability in the Linux kernel's libata-transport subsystem. When the ata_tdev_add() function fails to properly handle errors from transport_add_device(), it can cause a kernel crash during module removal. This affects Linux systems using the libata subsystem for ATA/SATA device management.

💻 Affected Systems

Products:
  • Linux kernel
Versions: Kernel versions before the fix commits (specific versions vary by distribution, but generally before kernel 6.1.x with backports)
Operating Systems: Linux distributions using vulnerable kernel versions
Default Config Vulnerable: ⚠️ Yes
Notes: Only affects systems using the libata subsystem (most systems with SATA/ATA storage). The vulnerability is triggered during module removal operations.

📦 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

Kernel panic leading to system crash and denial of service, potentially causing data loss or corruption if the crash occurs during disk operations.

🟠

Likely Case

System crash when unloading the libata module (e.g., during driver updates or system maintenance), resulting in temporary denial of service.

🟢

If Mitigated

System remains stable as the error is properly handled and resources are cleaned up correctly.

🌐 Internet-Facing: LOW - This vulnerability requires local access to trigger via module operations and does not provide remote exploitation vectors.
🏢 Internal Only: MEDIUM - Local users with sufficient privileges (typically root) can trigger the crash, potentially disrupting system availability.

🎯 Exploit Status

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

Exploitation requires local access and privileges to load/unload kernel modules. The vulnerability is triggered by specific error conditions during device addition.

🛠️ Fix & Mitigation

✅ Official Fix

Patch Version: Fixed in kernel commits: 1ff36351309e3eadcff297480baf4785e726de9b, ef2ac07ab83163b9a53f45da20e14302591ad9cc, f23058dc2398db1d8faca9a2b1ce30b85cdd8b22, f54331962883f4fc4bf5e487e6e7cf07c4567fef

Vendor Advisory: https://git.kernel.org/stable/c/1ff36351309e3eadcff297480baf4785e726de9b

Restart Required: Yes

Instructions:

1. Update to a patched kernel version from your distribution vendor. 2. For custom kernels, apply the fix commits to your kernel source. 3. Rebuild and install the kernel. 4. Reboot the system to load the patched kernel.

🔧 Temporary Workarounds

Restrict module loading

linux

Prevent unauthorized users from loading/unloading kernel modules to reduce attack surface

echo 1 > /proc/sys/kernel/modules_disabled
chmod 600 /lib/modules
set kernel.modules_disabled=1 in sysctl.conf

Limit privileged access

linux

Restrict root/sudo access to prevent triggering the vulnerability

visudo to edit sudoers file
Implement role-based access control

🧯 If You Can't Patch

  • Implement strict access controls to prevent unauthorized users from loading/unloading kernel modules
  • Monitor system logs for kernel panic events and module removal operations

🔍 How to Verify

Check if Vulnerable:

Check kernel version and if it contains the vulnerable code. For distributions: 'uname -r' and compare with vendor advisories.

Check Version:

uname -r

Verify Fix Applied:

Verify the kernel version includes the fix commits or check with distribution-specific tools like 'rpm -q --changelog kernel | grep CVE-2022-49823' for RPM-based systems

📡 Detection & Monitoring

Log Indicators:

  • Kernel panic messages in /var/log/messages or dmesg
  • 'Unable to handle kernel NULL pointer dereference' errors
  • Module removal failures

Network Indicators:

  • None - this is a local vulnerability

SIEM Query:

source="kernel" AND ("NULL pointer dereference" OR "ata_tdev_add" OR "CVE-2022-49823")

🔗 References

📤 Share & Export