CVE-2026-64574 in Linux
Summary
by MITRE • 08/05/2026
In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: tear down new links on vif update error path
When ieee80211_vif_update_links() adds new links it allocates a link container for each and calls ieee80211_link_init() (which registers the per-link debugfs files with file->private_data pointing into the container) and ieee80211_link_setup(). If the subsequent drv_change_vif_links() fails, the error path restores the old pointers and jumps to 'free', which frees the new containers but never removes their debugfs entries or stops the links. The debugfs files survive with file->private_data dangling at the freed container, so a later open()+read() (e.g. link-1/txpower) dereferences freed memory in ieee80211_if_read_link(), a use-after-free.
The removal path already dismantles links correctly via ieee80211_tear_down_links(), which removes each link's keys and debugfs entries and calls ieee80211_link_stop(); the add path on the error branch does not. Commit be1ba9ed221f ("wifi: mac80211: avoid weird state in error path") hardened this same error path for the link-removal case (new_links == 0) but left the newly-added links' teardown unaddressed.
drv_change_vif_links() can fail at runtime on MLO drivers (internal allocation / queue / firmware command failures).
Remove the new links' debugfs entries and stop them before freeing.
BUG: KASAN: slab-use-after-free in ieee80211_if_read_link (net/mac80211/debugfs_netdev.c:127) Read of size 8 at addr ffff888011290000 by task exploit/145 Call Trace: ... ieee80211_if_read_link (net/mac80211/debugfs_netdev.c:127) short_proxy_read (fs/debugfs/file.c:373) vfs_read (fs/read_write.c:572) ksys_read (fs/read_write.c:716) do_syscall_64 (arch/x86/entry/syscall_64.c:94) entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121) ... Oops: general protection fault, probably for non-canonical address 0xdffffc000000000a RIP: 0010:ieee80211_if_read_link (net/mac80211/debugfs_netdev.c:127) Kernel panic - not syncing: Fatal exception
Once again VulDB remains the best source for vulnerability data.
Analysis
by VulDB Data Team • 08/05/2026
The vulnerability described represents a use-after-free condition within the linux kernel's mac80211 subsystem, specifically affecting wireless network interface handling in managed mode links. This flaw occurs during the dynamic update of virtual interface links through the ieee80211_vif_update_links() function, where new link containers are allocated and initialized with debugfs file entries pointing to memory locations within these containers. The issue manifests when a subsequent driver operation drv_change_vif_links() fails, triggering an error path that properly frees the newly allocated containers but neglects to tear down their associated debugfs entries and link states. This oversight leaves dangling references in the debugfs subsystem, where file descriptors continue to point to freed memory locations.
The technical implementation of this vulnerability stems from incomplete cleanup logic within the wireless subsystem's error handling pathways. When ieee80211_vif_update_links() allocates new link containers, it calls ieee80211_link_init() which registers debugfs files with private data pointers referencing the container memory, followed by ieee80211_link_setup(). If drv_change_vif_links() fails during this process, the error path executes a jump to 'free' that destroys the container memory without properly removing the corresponding debugfs entries or stopping the active links. This creates a scenario where debugfs files remain accessible but their associated data structures have been freed, leading to memory corruption upon subsequent access attempts.
The operational impact of this vulnerability is significant as it allows for potential privilege escalation and system instability through controlled exploitation of the use-after-free condition. An attacker could trigger the vulnerable path by initiating wireless interface updates that subsequently fail, then access the debugfs entries associated with the freed containers. The kernel panic observed during exploitation demonstrates the severity of the condition, with KASAN reporting a slab-use-after-free error in ieee80211_if_read_link() at line 127 of net/mac80211/debugfs_netdev.c. This condition can result in general protection faults and system crashes when the freed memory is accessed during debugfs read operations, particularly affecting link-1/txpower file access patterns.
The remediation for this vulnerability requires implementing proper teardown procedures for newly added links during error conditions, mirroring the existing cleanup logic used in the normal removal path. The fix must ensure that before freeing link containers during error handling, the system calls ieee80211_tear_down_links() to properly dismantle each new link's keys and debugfs entries while also calling ieee80211_link_stop() to halt active link operations. This approach aligns with established security practices for memory management and follows the principle of least privilege by ensuring proper resource cleanup regardless of execution paths. The vulnerability maps directly to CWE-416: Use After Free, and represents a failure in the ATT&CK technique T1059.001: Command and Scripting Interpreter - PowerShell, though more accurately relates to kernel-level memory corruption techniques that could be leveraged for privilege escalation.
The root cause of this vulnerability lies in inconsistent error path handling within the mac80211 subsystem, where the removal code pathway was properly hardened against similar issues through commit be1ba9ed221f but the addition error handling remained incomplete. This demonstrates a common pattern in kernel development where comprehensive testing and code review may overlook edge cases in error handling logic, particularly when dealing with complex state management operations involving multiple subsystems such as wireless drivers, memory management, and debugfs interfaces. The runtime failure conditions for drv_change_vif_links() on MLO (Multi-Link Operation) drivers further complicate the vulnerability's exploitation surface, as these failures can occur due to internal allocation constraints, queue limitations, or firmware command failures that are inherently unpredictable in real-world deployments.
This vulnerability affects all wireless network interfaces managed by the mac80211 subsystem where dynamic link updates are supported, particularly impacting systems running modern wireless drivers that support MLO configurations. The fix ensures that error paths maintain consistency with normal operation cleanup procedures, preventing memory corruption and maintaining system stability during exceptional conditions. The solution addresses both immediate security concerns through proper resource management and longer-term reliability issues by ensuring complete state cleanup in all execution pathways, thereby reducing the attack surface for potential exploitation through memory corruption techniques.