wifi: mwifiex: bound uAP association event IEs to the event buffer
- Published
- Last modified
- Where the record stands: published, rejected by its publisher, or superseded by another id.What do these mean? →
- published
- Whether CISA lists it in its Known Exploited Vulnerabilities catalog: proof that attackers are using it.What do these mean? →
- Not listed in CISA KEV
- Fix
- Fixed in 5.10.265, 5.15.216, 6.1.183, 6.6.148, 6.12.101, and 2 more
- Whether working attack code is public (Exploit-DB, Metasploit, Nuclei or GitHub). Public code makes attacks easier.What do these mean? →
- None on Exploit-DB, Metasploit or GitHub
- Exploitation: none
- Automatable: no
- Technical impact: total
Summary
In the Linux kernel, the following vulnerability has been resolved: wifi: mwifiex: bound uAP association event IEs to the event buffer mwifiex_process_uap_event() handles EVENT_UAP_STA_ASSOC by exposing the (re)association request IEs that the firmware copies into the event: sinfo->assoc_req_ies = &event->data[len]; len = (u8 *)sinfo->assoc_req_ies - (u8 *)&event->frame_control; sinfo->assoc_req_ies_len = le16_to_cpu(event->len) - (u16)len; event->len is supplied by the device firmware and is never validated, and the subtraction is unchecked. assoc_req_ies points into adapter->event_body[MAX_EVENT_SIZE], a fixed-size array embedded in the kmalloc()'d struct mwifiex_adapter. On the ap_11n_enabled path mwifiex_set_sta_ht_cap() walks these IEs with cfg80211_find_ie(), whose for_each_element() loop dereferences each element header. A firmware-reported event->len larger than the bytes actually received makes assoc_req_ies_len describe IEs that extend past event_body, so the walk reads out of the adapter slab object, a slab-out-of-bounds read (KASAN: slab-out-of-bounds in cfg80211_find_ie). An event->len smaller than the header instead makes the int subtraction negative, which wraps to a huge size_t when stored in assoc_req_ies_len. The same length is handed to cfg80211_new_sta(), so a more modest over-claim can also copy stale event_body bytes into the NL80211_CMD_NEW_STATION notification. A malicious or malfunctioning mwifiex device (USB/SDIO/PCIe) can deliver such an event while the interface is in AP/uAP mode. Validate event->len before use: reject a length that underflows the header or that would place the IEs outside the event_body[] buffer the event was copied into. event->len here is struct mwifiex_assoc_event.len, a payload field internal to this event, not the transport frame length, so it is validated in this handler rather than at the generic MWIFIEX_TYPE_EVENT receive path, which only sees the event cause and the transport frame length. The bound is against event_body[MAX_EVENT_SIZE] rather than the actually-received length because the transports store the event differently (USB and SDIO leave the 4-byte event header in event_skb, PCIe strips it via skb_pull), whereas event_body is the single fixed buffer all of them copy the event into. This is the event-path analogue of the receive-path bounds checks added in commit 119585281617 ("wifi: mwifiex: Fix OOB and integer underflow when rx packets").
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From e568634ae7ac379661c90731d480e067929420a1 · fixed in a616616b938f7922a93e79bef16b4643c57c0922; From e568634ae7ac379661c90731d480e067929420a1 · fixed in 1ae00b6d9a6c82eb3de151d9b04ed59e06cc100f; From e568634ae7ac379661c90731d480e067929420a1 · fixed in e7e93d3e8c240bdb70c41e79d169d74dfb442843; From e568634ae7ac379661c90731d480e067929420a1 · fixed in a3f47d7c75ddad1a14621a309286f9fae3cba191; From e568634ae7ac379661c90731d480e067929420a1 · fixed in ad26c75ae25749313248f06510ebe43b5bf4adcc; From e568634ae7ac379661c90731d480e067929420a1 · fixed in d21464d93f8ba464dc3d7b4b31c6e0adcd9f659c; From e568634ae7ac379661c90731d480e067929420a1 · fixed in b6766d7ea43edf5de9d5a572bc58b631d09efe4b; From e568634ae7ac379661c90731d480e067929420a1 · fixed in f0858bfc7d3cab411a447b88e3ef970e575032c9
- Linux Linux
3.5
- KernelLinux
From 3.5.0 · fixed in 5.10.265; From 5.11.0 · fixed in 5.15.216; From 5.16.0 · fixed in 6.1.183; From 6.2.0 · fixed in 6.6.148; From 6.7.0 · fixed in 6.12.101; From 6.13.0 · fixed in 6.18.42; From 6.19.0 · fixed in 7.1.6
References 8
git.kernel.org
- stable/c/a616616b938f7922a93e79bef16b4643c57c0922
- stable/c/1ae00b6d9a6c82eb3de151d9b04ed59e06cc100f
- stable/c/e7e93d3e8c240bdb70c41e79d169d74dfb442843
- stable/c/a3f47d7c75ddad1a14621a309286f9fae3cba191
- stable/c/ad26c75ae25749313248f06510ebe43b5bf4adcc
- stable/c/d21464d93f8ba464dc3d7b4b31c6e0adcd9f659c
- stable/c/b6766d7ea43edf5de9d5a572bc58b631d09efe4b
- stable/c/f0858bfc7d3cab411a447b88e3ef970e575032c9