In the Linux kernel, the following vulnerability has been resolved:
wifi: mac80211: Set nchannels after allocating struct cfg80211scan_request
Make sure that nchannels is set after allocating the struct cfg80211registereddevice::intscan_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 ieee80211channel *[] _countedby(nchannels)' (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.
[
{
"digest": {
"function_hash": "302249480318952614767173203890634883875",
"length": 11874.0
},
"signature_type": "Function",
"target": {
"function": "ieee80211_register_hw",
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81",
"id": "CVE-2025-38013-16558220"
},
{
"digest": {
"function_hash": "302249480318952614767173203890634883875",
"length": 11874.0
},
"signature_type": "Function",
"target": {
"function": "ieee80211_register_hw",
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82bbe02b2500ef0a62053fe2eb84773fe31c5a0a",
"id": "CVE-2025-38013-2f57434b"
},
{
"digest": {
"function_hash": "18770708387042337997089481403438525716",
"length": 11617.0
},
"signature_type": "Function",
"target": {
"function": "ieee80211_register_hw",
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fde33ab3c052a302ee8a0b739094b88ceae4dd67",
"id": "CVE-2025-38013-2feb2f29"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"98581043164946416468834004572585663426",
"213564448514578270104805189190308513516",
"359486072258303370947654172329113771",
"65492617785902715786145962042617157722",
"203079974101504130668104355628726765348",
"139047779167719132321846424407625772287",
"127374962619848297577060140174742158655"
]
},
"signature_type": "Line",
"target": {
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fde33ab3c052a302ee8a0b739094b88ceae4dd67",
"id": "CVE-2025-38013-4798d079"
},
{
"digest": {
"function_hash": "286011570568310875211404730405241766867",
"length": 11757.0
},
"signature_type": "Function",
"target": {
"function": "ieee80211_register_hw",
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@07c737d9ab02c07b562aefcca16aa95077368e24",
"id": "CVE-2025-38013-5bb44750"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"298349985860056163997412119640960881064",
"23021237306192060186048337767677706474",
"234985309583809261802509535818893678414",
"65492617785902715786145962042617157722",
"203079974101504130668104355628726765348",
"139047779167719132321846424407625772287",
"127374962619848297577060140174742158655"
]
},
"signature_type": "Line",
"target": {
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@07c737d9ab02c07b562aefcca16aa95077368e24",
"id": "CVE-2025-38013-94458f94"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"298349985860056163997412119640960881064",
"23021237306192060186048337767677706474",
"234985309583809261802509535818893678414",
"65492617785902715786145962042617157722",
"203079974101504130668104355628726765348",
"139047779167719132321846424407625772287",
"127374962619848297577060140174742158655"
]
},
"signature_type": "Line",
"target": {
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@e3192e999a0d05ea0ba2c59c09afaf0b8ee70b81",
"id": "CVE-2025-38013-a2ce55f4"
},
{
"digest": {
"threshold": 0.9,
"line_hashes": [
"298349985860056163997412119640960881064",
"23021237306192060186048337767677706474",
"234985309583809261802509535818893678414",
"65492617785902715786145962042617157722",
"203079974101504130668104355628726765348",
"139047779167719132321846424407625772287",
"127374962619848297577060140174742158655"
]
},
"signature_type": "Line",
"target": {
"file": "net/mac80211/main.c"
},
"deprecated": false,
"signature_version": "v1",
"source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@82bbe02b2500ef0a62053fe2eb84773fe31c5a0a",
"id": "CVE-2025-38013-e255c213"
}
]