HIGH Introduced in 6.12
mwifiex AuthFrame Overflow
CVE-2026-98184
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
01Description
In the Linux kernel, the following vulnerability has been resolved: wifi: mwifiex: prevent authentication frame length truncation mwifiex_cfg80211_authenticate() derives the authentication frame length from req->ie_len and req->auth_data_len, both of type size_t, but stores it in a u16. NL80211_ATTR_AUTH_DATA only has a minimum length policy. Since nla_len is a u16, a single attribute can carry up to 65531 bytes of payload, so the sum can exceed U16_MAX before it is assigned to pkt_len. The truncated pkt_len determines the skb frame area, while the copy length remains req->auth_data_len - 4, resulting in a heap buffer overflow. For example, with auth_data_len equal to 65510 and no IEs, the sum is 65546. It is truncated to 10 and then reduced by four to 6. The driver appends only six bytes to the skb with skb_put(), but then copies 65506 user-provided bytes into the authentication body. Reaching this path requires CAP_NET_ADMIN in the user namespace owning the network namespace, an up station netdev, and a suitable BSS/SAE authentication request. Compute the length in size_t, reject values that cannot be represented by the firmware's u16 frame length field, and only then assign it to pkt_len.
02KernelScan AI Analysis
Risk summary
A local attacker with CAP_NET_ADMIN (obtainable via user namespaces) can trigger a heap buffer overflow in the Marvell mwifiex WiFi driver by sending an oversized authentication request. The overflow writes attacker-controlled data into kernel heap memory, enabling potential privilege escalation or kernel crash. Products with mwifiex WiFi hardware and unprivileged user namespace access are at risk.
Vulnerability analysis
The driver computes an authentication frame length from user-supplied data sizes and fixed header constants, but stores the result in a smaller variable than the calculation uses. When the true total exceeds the smaller variable's limit, the value is silently truncated. The truncated value determines how much memory is allocated for the outgoing frame, while the copy operation still uses the original larger size, producing a heap buffer overflow with attacker-controlled bytes. The fix performs the length calculation in a type large enough to hold the sum, rejects any value too large for the firmware's frame-length field, and only then assigns the validated result. The vulnerable path is reached through the wireless authentication request interface, which requires network-admin capability in the owning user namespace — obtainable by an unprivileged local user when user namespaces are enabled — along with an active station interface and a suitable authentication request.
Lifecycle
03Fix Versions
| Branch | Introduced | Fixed in | Patch commit |
|---|---|---|---|
| 6.12 | 6.12 | 6.12.112 | 25c45a2075cc |
| 6.18 | 6.12 | 6.18.54 | 5747eaa38a7f |
| 7.2 | 6.12 | 7.2.8 | 877b61a67d5e |
| mainline | 6.12 | 7.3-rc4 | fa00193eb991 |