# CVE-2025-38013: wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request

- Severity: High 7.8 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.30%, higher than 15% of CVEs (2026-11-30)
- Published: 2025-06-18T09:28:22.672Z
- Modified: 2026-06-17T09:15:52.960Z
- Weaknesses: CWE-129
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

wifi: mac80211: Set n_channels after allocating struct cfg80211_scan_request

Make sure that n_channels is set after allocating the
struct cfg80211_registered_device::int_scan_req member. Seen with
syzkaller:

UBSAN: array-index-out-of-bounds in net/mac80211/scan.c:1208:5
index 0 is out of range for type 'struct ieee80211_channel *[] __counted_by(n_channels)' (aka 'struct ieee80211_channel *[]')

This was missed in the initial conversions because I failed to locate
the allocation likely due to the "sizeof(void *)" not matching the
"channels" array type.

(As written by CVE List.)

## Affected

- Linux Linux: from e3eac9f32ec04112b39e01b574ac739382469bf9 before fde33ab3c052a302ee8a0b739094b88ceae4dd67; from e3eac9f32ec04112b39e01b574ac739382469bf9 before 07c737d9ab02c07b562aefcca16aa95077368e24; from e3eac9f32ec04112b39e01b574ac739382469bf9 before e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81; from e3eac9f32ec04112b39e01b574ac739382469bf9 before 82bbe02b2500ef0a62053fe2eb84773fe31c5a0a; 6.6 (not affected: before 6.6; from 6.6.92 up to 6.6.*; from 6.12.30 up to 6.12.*; from 6.14.8 up to 6.14.*; from 6.15 up to *)
- linux linux_kernel: from 6.6 before 6.6.92; from 6.7 before 6.12.30; from 6.13 before 6.14.8; 6.15

## References

- <https://git.kernel.org/stable/c/fde33ab3c052a302ee8a0b739094b88ceae4dd67> (patch)
- <https://git.kernel.org/stable/c/07c737d9ab02c07b562aefcca16aa95077368e24> (patch)
- <https://git.kernel.org/stable/c/e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81> (patch)
- <https://git.kernel.org/stable/c/82bbe02b2500ef0a62053fe2eb84773fe31c5a0a> (patch)

## Sources

- CVE List: [CVE-2025-38013](https://www.cve.org/CVERecord?id=CVE-2025-38013), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-38013](https://nvd.nist.gov/vuln/detail/CVE-2025-38013), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-38013 · Whole record: https://cve.day/CVE-2025-38013.json · Rebuilt by cve.day 2026-11-25T22:58:59.337Z
