CVE-2026-23040 Overview
A Null Pointer Dereference vulnerability has been identified in the Linux kernel's mac80211_hwsim module. The vulnerability stems from a typo in the frequency notification code for WiFi NAN (Neighbor Awareness Networking) functionality. The NAN notification incorrectly references 5475 MHz instead of the correct 5745 MHz frequency (corresponding to channel 149). Since 5475 MHz is not a valid channel, this can lead to a NULL pointer dereference in the cfg80211_next_nan_dw_notif function.
Critical Impact
This vulnerability could allow a local attacker to cause a denial of service condition by triggering a kernel NULL pointer dereference when the WiFi hardware simulator module processes NAN notifications.
Affected Products
- Linux Kernel (versions with vulnerable mac80211_hwsim module)
- Systems using WiFi hardware simulation for development or testing
- Environments utilizing NAN (Neighbor Awareness Networking) functionality
Discovery Timeline
- 2026-02-04 - CVE CVE-2026-23040 published to NVD
- 2026-02-04 - Last updated in NVD database
Technical Details for CVE-2026-23040
Vulnerability Analysis
This vulnerability exists within the mac80211_hwsim driver, which is a software simulator for WiFi hardware used primarily for testing and development purposes. The root issue is a simple but consequential typo in the frequency specification for NAN (Neighbor Awareness Networking) notifications.
The code incorrectly specifies 5475 MHz as the frequency for NAN notifications when it should specify 5745 MHz. Channel 149, which operates at 5745 MHz, is a valid 5 GHz WiFi channel commonly used in the UNII-3 band. However, 5475 MHz does not correspond to any valid WiFi channel, causing the kernel to attempt to process an invalid frequency value.
When the cfg80211_next_nan_dw_notif function receives this invalid frequency, it fails to find a corresponding channel structure, resulting in a NULL pointer being dereferenced. This leads to a kernel panic or oops, causing system instability or a complete denial of service.
Root Cause
The vulnerability is caused by a typographical error in the frequency value used for NAN Discovery Window (DW) notifications. The transposition of digits (5475 instead of 5745) results in an invalid channel reference. When the cfg80211 subsystem attempts to look up channel information for the non-existent 5475 MHz frequency, it returns NULL, and the subsequent dereference of this NULL pointer triggers the crash.
Attack Vector
The attack vector for this vulnerability is local in nature. An attacker would need access to a system running the vulnerable mac80211_hwsim module to trigger the NULL pointer dereference. This could potentially be exploited by:
- Loading the mac80211_hwsim module on a vulnerable system
- Initiating NAN operations that trigger the frequency notification code path
- Causing the kernel to dereference the NULL pointer, resulting in denial of service
Since mac80211_hwsim is primarily used for development and testing environments rather than production systems, the real-world attack surface is limited to development machines, CI/CD environments with WiFi testing capabilities, and systems specifically configured for WiFi driver development.
Detection Methods for CVE-2026-23040
Indicators of Compromise
- Kernel panic or oops messages referencing cfg80211_next_nan_dw_notif in system logs
- Unexpected system crashes or reboots when the mac80211_hwsim module is loaded
- Kernel call traces showing NULL pointer dereference in the cfg80211 or mac80211_hwsim code paths
Detection Strategies
- Monitor kernel logs (dmesg, /var/log/kern.log) for NULL pointer dereference errors related to WiFi subsystems
- Implement kernel oops detection and alerting for systems running mac80211_hwsim
- Use kernel debugging tools like KASAN (Kernel Address Sanitizer) to detect invalid memory accesses
Monitoring Recommendations
- Enable kernel crash dump collection (kdump) to capture diagnostic information when crashes occur
- Monitor for repeated unexpected reboots on development and testing systems
- Implement log aggregation to correlate kernel panics across multiple development environments
How to Mitigate CVE-2026-23040
Immediate Actions Required
- Update the Linux kernel to a patched version that includes the frequency correction
- If updating is not immediately possible, avoid loading the mac80211_hwsim module on affected systems
- Review any automated testing pipelines that may load this module to assess exposure
Patch Information
The vulnerability has been addressed in the Linux kernel through commits that correct the frequency typo from 5475 MHz to 5745 MHz. The patches are available in the kernel stable branches:
- Kernel Git Commit 1251bbdb8f5b2ea86ca9b4268a2e6aa34372ab33
- Kernel Git Commit 333418872bfecf4843f1ded7a4151685dfcf07d5
System administrators should update to the latest stable kernel version that includes these patches.
Workarounds
- Unload or blacklist the mac80211_hwsim module if it is not required for system operation
- Avoid using NAN functionality in WiFi testing environments until the patch is applied
- Consider using alternative WiFi simulation methods that do not rely on the affected module
# Blacklist the mac80211_hwsim module to prevent automatic loading
echo "blacklist mac80211_hwsim" | sudo tee /etc/modprobe.d/blacklist-mac80211_hwsim.conf
# Unload the module if currently loaded
sudo modprobe -r mac80211_hwsim
# Verify the module is not loaded
lsmod | grep mac80211_hwsim
Disclaimer: This content was generated using AI. While we strive for accuracy, please verify critical information with official sources.

