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

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

CVE-2024-35789 is a use-after-free vulnerability in the Linux Kernel's mac80211 wifi subsystem that can lead to system crashes or exploitation. 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-35789 Overview

CVE-2024-35789 is a use-after-free vulnerability [CWE-416] in the Linux kernel's mac80211 wireless subsystem. The flaw affects the fast receive path handling for non-4addr station VLAN changes. When a station moves out of a VLAN and the VLAN is subsequently deleted, the fast_rx entry retains a dangling pointer to the VLAN's netdev structure. A local attacker with the ability to trigger VLAN reconfiguration on wireless interfaces can exploit this condition to corrupt kernel memory. Successful exploitation can lead to privilege escalation, kernel information disclosure, or system crashes. The vulnerability was resolved upstream by immediately calling ieee80211_check_fast_rx after any VLAN change.

Critical Impact

Local attackers can trigger a kernel use-after-free in the mac80211 fast receive path, potentially leading to arbitrary code execution in kernel context and full system compromise.

Affected Products

  • Linux Kernel (multiple versions through 6.9-rc1, including 5.12, 5.12-rc7, 5.12-rc8)
  • Debian Linux 10.0
  • Siemens industrial products referenced in advisory SSA-265688

Discovery Timeline

  • 2024-05-17 - CVE-2024-35789 published to NVD
  • 2024-06-17 - Debian LTS security advisory released
  • 2024-06-20 - Additional Debian LTS security advisory released
  • 2026-10-15 - Last updated in NVD database

Technical Details for CVE-2024-35789

Vulnerability Analysis

The vulnerability resides in the mac80211 subsystem, which implements the IEEE 802.11 software MAC layer for SoftMAC wireless drivers in Linux. The fast_rx optimization path caches frequently used receive context, including a reference to the station's associated netdev.

When a non-4addr station is moved out of a Virtual LAN (VLAN) and the VLAN interface is subsequently deleted, the cached fast_rx entry is not refreshed. The pointer to the deleted VLAN netdev remains valid in the fast_rx structure. Subsequent packet processing dereferences this freed memory, producing a classic use-after-free condition in kernel space.

Root Cause

The root cause is a missing invalidation step in the station VLAN transition logic. The code did not call ieee80211_check_fast_rx after modifying a station's VLAN association. Without this refresh, the fast_rx cache held stale references after the backing netdev was released. The upstream fix invokes ieee80211_check_fast_rx immediately after the VLAN change to ensure stale pointers are cleared.

Attack Vector

Exploitation requires local access with low privileges on a system running an affected kernel with wireless mac80211 functionality enabled. An attacker who can trigger station VLAN changes, for example on access-point style configurations using hostapd with per-station VLAN assignment, can race the deletion of the VLAN interface against incoming wireless traffic. The resulting dangling pointer dereference in kernel context can be shaped into memory corruption primitives that attackers use to achieve privilege escalation. The vulnerability affects confidentiality, integrity, and availability of the host.

No public proof-of-concept exploit code is referenced in the enriched advisory data. Technical details of the fix are documented across multiple kernel.org stable commits, including 2884a50f, 4f2bdb3c, 6b948b54, 7eeabcea, be1dd925, c8bddbd9, e8678551, e8b067c4, and ea9a0cfc.

Detection Methods for CVE-2024-35789

Indicators of Compromise

  • Unexpected kernel oops or panic entries in dmesg referencing ieee80211_rx, fast_rx, or mac80211 call frames.
  • KASAN use-after-free reports naming VLAN netdev structures when kernel debugging is enabled.
  • Repeated creation and deletion of VLAN interfaces attached to wireless stations in hostapd or iw logs.

Detection Strategies

  • Enumerate running kernel versions across Linux hosts and compare against the fixed versions referenced in the kernel.org stable commits.
  • Monitor privileged process activity that invokes ip link, iw, or hostapd_cli to manipulate VLAN assignments on wireless interfaces.
  • Review centralized kernel logs for crash signatures involving mac80211 fast receive paths and VLAN teardown events.

Monitoring Recommendations

  • Forward syslog and kmsg output to a central log platform to catch kernel crash traces and KASAN reports.
  • Alert on unexpected kernel module reloads or wireless interface restarts that may indicate exploitation attempts or crash recovery.
  • Track package versions of linux-image-* across Debian hosts to ensure patched kernels are deployed.

How to Mitigate CVE-2024-35789

Immediate Actions Required

Patch Information

The fix is distributed across multiple stable kernel branches. Reference commits include Kernel Commit 2884a50, Kernel Commit 4f2bdb3, Kernel Commit 6b948b54, Kernel Commit 7eeabcea, Kernel Commit be1dd925, Kernel Commit c8bddbd9, Kernel Commit e8678551, Kernel Commit e8b067c4, and Kernel Commit ea9a0cfc. Rebuild or re-deploy any custom kernels incorporating one of these commits.

Workarounds

  • Where patching is not immediately possible, avoid dynamic VLAN assignment for wireless stations via hostapd configuration.
  • Unload the mac80211 module on systems that do not require wireless functionality.
  • Limit which users can execute network configuration tools and remove CAP_NET_ADMIN from non-administrative service accounts.

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.