Skip to main content
Vulnerability Database/CVE-2024-53191

CVE-2024-53191: Linux Kernel Use-After-Free Vulnerability

CVE-2024-53191 is a use-after-free flaw in the Linux kernel's ath12k WiFi driver that causes double-free memory corruption during device unbinding. This post covers the technical details, affected versions, and mitigation.

Published:

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

CVE-2024-53191 Overview

CVE-2024-53191 is a double free vulnerability [CWE-415] in the Linux kernel's ath12k Wi-Fi driver. The flaw affects the firmware initialization path for Qualcomm Wi-Fi 7 chipsets supported by the ath12k_pci module. When firmware initialization fails, the driver releases the dp->tx_ring[i].tx_status buffers but does not clear the pointers. The device unbind path then frees the same buffers again, triggering a kernel warning in free_large_kmalloc from mm/slub.c. The issue is reproducible from a virtual machine because MSI addressing initialization fails in that environment.

Critical Impact

A local, low-privileged user can trigger kernel memory corruption through the ath12k Wi-Fi driver, potentially leading to privilege escalation or denial of service.

Affected Products

  • Linux Kernel (mainline branches prior to the fixing commits)
  • Linux distributions shipping the ath12k Wi-Fi driver
  • Systems using Qualcomm Wi-Fi 7 PCIe adapters bound via ath12k_pci

Discovery Timeline

  • 2024-12-27 - CVE-2024-53191 published to NVD
  • 2026-06-17 - Last updated in NVD database

Technical Details for CVE-2024-53191

Vulnerability Analysis

The vulnerability resides in the Linux kernel ath12k driver, which supports Qualcomm Wi-Fi 7 devices. During device initialization, the driver allocates tx_status buffers within the dp->tx_ring[i] data path ring structures. When firmware initialization fails midway, the error handling path calls the free routine on those buffers. The pointers are not reset to NULL after being released.

When the system later unbinds the device through ath12k_pci_remove, the deinitialization path in ath12k_dp_free reaches the same ring structures and attempts to free the buffers again. This triggers a double free condition detected by the slab allocator, producing a warning at mm/slub.c:4689 in free_large_kmalloc.

The reporter confirmed the fault is consistently reproducible inside virtual machines because MSI (Message Signaled Interrupts) address setup fails during probe, forcing the error path to execute.

Root Cause

The root cause is improper state tracking in the ath12k data path cleanup logic. Freed pointers in dp->tx_ring[i].tx_status remain non-NULL, so later cleanup code treats them as still-valid allocations. This is a classic double free [CWE-415] pattern caused by missing pointer invalidation after release.

Attack Vector

Exploitation requires local access with low privileges on a system running an affected kernel with the ath12k driver loaded. An attacker who can trigger firmware initialization failures, for example by rebinding the PCI device or operating inside a virtualization context where MSI setup fails, forces the vulnerable code path. Successful triggering corrupts slab allocator metadata and can lead to memory corruption that an attacker may escalate to arbitrary kernel code execution.

The vulnerability is network-adjacent only in the sense that it affects a wireless driver; the actual exploitation vector is local. No authentication beyond ordinary device access is required when the driver can be bound and unbound by the attacker.

For technical details on the fix, refer to the upstream commits 223b546, 90556b9, 94c9100, and ca68ce0.

Detection Methods for CVE-2024-53191

Indicators of Compromise

  • Kernel log entries containing WARNING: CPU: ... at mm/slub.c:4689 free_large_kmalloc with a call trace including ath12k_dp_free and ath12k_core_deinit.
  • Repeated ath12k_pci probe failures referencing MSI addressing initialization errors.
  • Unexpected ath12k_pci_remove events following firmware load failures in dmesg output.

Detection Strategies

  • Monitor /var/log/kern.log and journalctl -k for the specific free_large_kmalloc warning associated with the ath12k call stack.
  • Audit kernel package versions across the fleet to identify hosts running kernels that predate the fixing commits in the affected stable branches.
  • Alert on repeated driver bind/unbind cycles for ath12k_pci devices, which can indicate an attempt to trigger the vulnerable error path.

Monitoring Recommendations

  • Forward kernel ring buffer events to a centralized logging platform and build detections for the double free warning signature.
  • Track slab allocator warnings and panics as high-signal indicators of kernel memory corruption attempts.
  • Correlate PCI rescan or hotplug activity on wireless devices with subsequent kernel warnings to surface exploitation attempts.

How to Mitigate CVE-2024-53191

Immediate Actions Required

  • Update to a Linux kernel version that includes the upstream fix commits for ath12k.
  • On systems that cannot be patched immediately, unload the ath12k and ath12k_pci modules if the hardware is not in use.
  • Restrict local shell access and the ability to bind or unbind PCI devices to trusted administrators only.

Patch Information

The fix is upstream in the Linux kernel. It sets the dp->tx_ring[i].tx_status pointers to NULL after they are released in the error path, preventing the second free during driver teardown. Patched commits are available at 223b546, 90556b9, 94c9100, and ca68ce0. Apply vendor-provided kernel updates from your distribution as they become available.

Workarounds

  • Blacklist the ath12k and ath12k_pci modules on systems that do not require Qualcomm Wi-Fi 7 hardware.
  • Avoid passing affected Wi-Fi PCI devices into virtual machines where MSI setup fails and reliably triggers the vulnerable error path.
  • Limit unprivileged access to sysfs PCI bind and unbind interfaces to reduce opportunities for local triggering.
bash
# Prevent the vulnerable module from loading until the kernel is patched
echo 'blacklist ath12k' | sudo tee /etc/modprobe.d/ath12k-blacklist.conf
echo 'blacklist ath12k_pci' | sudo tee -a /etc/modprobe.d/ath12k-blacklist.conf
sudo update-initramfs -u
# Verify the module is not loaded
lsmod | grep ath12k

Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

Sources: National Vulnerability Database, CISA KEV, Exploit-DB

Experience the Most Advanced Cybersecurity Platform

See how the world’s most intelligent, autonomous cybersecurity platform can protect your organization today and into the future.