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

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

CVE-2024-46673 is a use-after-free vulnerability in the Linux Kernel SCSI aacraid driver that causes double-free memory errors during probe failure. This article covers 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-46673 Overview

CVE-2024-46673 is a double-free vulnerability [CWE-415] in the Linux kernel's aacraid SCSI driver. The flaw resides in the probe failure path of the Adaptec AACRAID adapter driver. When aac_init_adapter() fails after allocating memory for aac_dev::queues, it frees the memory but does not clear the pointer. The subsequent error-handling path in aac_probe_one() then frees the same memory region a second time.

The issue affects multiple stable Linux kernel branches and the 6.11 release candidates. Local attackers with low privileges may trigger heap corruption, potentially leading to privilege escalation or denial of service.

Critical Impact

A local attacker able to trigger probe failure of the aacraid driver can corrupt kernel heap state through a double-free, potentially enabling privilege escalation or system crash.

Affected Products

  • Linux kernel (multiple stable branches prior to the fix commits)
  • Linux kernel 6.11 release candidates rc1 through rc5
  • Debian LTS distributions shipping the vulnerable aacraid driver

Discovery Timeline

  • 2024-09-13 - CVE-2024-46673 published to NVD
  • 2026-08-04 - Last updated in NVD database

Technical Details for CVE-2024-46673

Vulnerability Analysis

The aacraid driver supports Adaptec SCSI RAID host bus adapters. During device probe, aac_probe_one() invokes hardware-specific initialization through the aac_driver_ident::init function pointer. Each hardware-specific path ultimately calls aac_init_adapter(), which allocates memory for the aac_dev::queues field used to track adapter command queues.

If aac_init_adapter() encounters an error after this allocation, it frees the queues memory but leaves the aac_dev::queues pointer dangling. The function then returns an error to the hardware-specific init routine, which propagates the failure back to aac_probe_one(). The caller enters its own cleanup path and calls kfree() on aac_dev::queues a second time, operating on an already-freed object.

Root Cause

The root cause is missing pointer invalidation after kfree() in the error path of aac_init_adapter(). Freeing memory without clearing the owning structure field violates the ownership contract between the init routine and its caller. Both functions assume responsibility for releasing the same allocation, producing the classic double-free pattern tracked under [CWE-415].

Attack Vector

Exploitation requires local access with privileges sufficient to trigger aacraid device probing or re-probing. Attack scenarios include driver reload operations, hot-plug events on systems exposing the SCSI subsystem, or forcing probe failure through crafted hardware state in virtualized environments where the adapter is passed through. A successful double-free corrupts kernel slab metadata, which attackers can leverage for arbitrary kernel memory manipulation and privilege escalation.

The fix clears aac_dev::queues to NULL after freeing it within aac_init_adapter(), ensuring the subsequent kfree() in aac_probe_one() becomes a no-op. Refer to the upstream commits linked in the kernel.org stable tree for the exact patch.

Detection Methods for CVE-2024-46673

Indicators of Compromise

  • Kernel oops or panic messages referencing aacraid, aac_probe_one, or aac_init_adapter in dmesg or /var/log/kern.log
  • SLUB/SLAB allocator warnings such as double free detected in cache or kernel BUG at mm/slub.c correlated with aacraid module load events
  • Repeated modprobe aacraid or rmmod aacraid activity from non-administrative contexts

Detection Strategies

  • Audit kernel ring buffer logs for aacraid probe failures followed by slab allocator errors.
  • Monitor loaded kernel module versions against patched builds to identify hosts still running vulnerable aacraid code.
  • Use kernel address sanitizer (KASAN) builds in test environments to surface double-free conditions during driver stress testing.

Monitoring Recommendations

  • Forward kernel logs to a centralized logging platform and alert on kernel panic signatures referencing SCSI driver paths.
  • Track insmod, modprobe, and rmmod operations through auditd rules to detect unauthorized driver manipulation.
  • Inventory running kernel versions across the fleet and flag hosts matching vulnerable version ranges identified in the NVD advisory.

How to Mitigate CVE-2024-46673

Immediate Actions Required

Patch Information

The fix is upstream in the Linux kernel across multiple stable branches. Reference commits include d237c7d0, 4b540ec7, 564e1986, 60962c3d, 85449b28, 8a3995a3, 919ddf83, and 9e96dea7. Each commit clears the aac_dev::queues pointer after freeing it, eliminating the double-free. See the full set of kernel.org commits for details.

Workarounds

  • Blacklist the aacraid module on systems that do not require Adaptec SCSI RAID support by adding blacklist aacraid to /etc/modprobe.d/blacklist.conf.
  • Limit kernel module loading to privileged automation only, and disable user-triggered hot-plug paths where feasible.
  • Enable kernel lockdown mode to reduce the attack surface available to local accounts while patches are rolled out.
bash
# Blacklist the vulnerable driver until patched kernels are deployed
echo 'blacklist aacraid' | sudo tee /etc/modprobe.d/disable-aacraid.conf
sudo update-initramfs -u
# Verify the module is not loaded
lsmod | grep aacraid

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.