wifi: rsi: Fix memory corruption due to not set vif driver data size
- 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.249, 5.15.199, 6.1.162, 6.6.122, 6.12.68, and 1 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: rsi: Fix memory corruption due to not set vif driver data size The struct ieee80211_vif contains trailing space for vif driver data, when struct ieee80211_vif is allocated, the total memory size that is allocated is sizeof(struct ieee80211_vif) + size of vif driver data. The size of vif driver data is set by each WiFi driver as needed. The RSI911x driver does not set vif driver data size, no trailing space for vif driver data is therefore allocated past struct ieee80211_vif . The RSI911x driver does however use the vif driver data to store its vif driver data structure "struct vif_priv". An access to vif->drv_priv leads to access out of struct ieee80211_vif bounds and corruption of some memory. In case of the failure observed locally, rsi_mac80211_add_interface() would write struct vif_priv *vif_info = (struct vif_priv *)vif->drv_priv; vif_info->vap_id = vap_idx. This write corrupts struct fq_tin member struct list_head new_flows . The flow = list_first_entry(head, struct fq_flow, flowchain); in fq_tin_reset() then reports non-NULL bogus address, which when accessed causes a crash. The trigger is very simple, boot the machine with init=/bin/sh , mount devtmpfs, sysfs, procfs, and then do "ip link set wlan0 up", "sleep 1", "ip link set wlan0 down" and the crash occurs. Fix this by setting the correct size of vif driver data, which is the size of "struct vif_priv", so that memory is allocated and the driver can store its driver data in it, instead of corrupting memory around it.
Timeline
- CVE published
- CISA SSVC assessment
Exploitation: none · Automatable: no · Technical impact: total
- Record last updated
Affected versions
- Linux Linux
From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 49ef094fdbc3526e5db2aebb404b84f79c5603dc; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 0d7c9e793e351cbbe9e06a9ca47d77b6ad288fb0; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 7c54d0c3e2cad4300be721ec2aecfcf8a63bc9f4; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 7761d7801f40e61069b4df3db88b36d80d089f8a; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 99129d80a5d4989ef8566f434f3589f60f28042b; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 31efbcff90884ea5f65bf3d1de01267db51ee3d1; From dad0d04fa7ba41ce603a01e8e64967650303e9a2 · fixed in 4f431d88ea8093afc7ba55edf4652978c5a68f33
- Linux Linux
3.15
- KernelLinux
From 3.15.0 · fixed in 5.10.249; From 5.11.0 · fixed in 5.15.199; From 5.16.0 · fixed in 6.1.162; From 6.2.0 · fixed in 6.6.122; From 6.7.0 · fixed in 6.12.68; From 6.13.0 · fixed in 6.18.8
References 7
git.kernel.org
- stable/c/49ef094fdbc3526e5db2aebb404b84f79c5603dc
- stable/c/0d7c9e793e351cbbe9e06a9ca47d77b6ad288fb0
- stable/c/7c54d0c3e2cad4300be721ec2aecfcf8a63bc9f4
- stable/c/7761d7801f40e61069b4df3db88b36d80d089f8a
- stable/c/99129d80a5d4989ef8566f434f3589f60f28042b
- stable/c/31efbcff90884ea5f65bf3d1de01267db51ee3d1
- stable/c/4f431d88ea8093afc7ba55edf4652978c5a68f33