# CVE-2022-50258: wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf\_c\_preinit\_dcmds()

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-787
- **Published:** 2025-09-15T14:02:43.992Z
- **Modified:** 2026-11-05T20:17:30.457Z

## Who should check

- Anyone running Linux \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 89243a7b0ea19606ba1c2873c9d569026ccb344f; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d481fd6064bf215d7c5068e15aa390c3b16c9cd0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 17dbe90e13f52848c460d253f15b765038ec6dc0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d6ef66194bb4a6c18f5b9649bf62597909b040e4; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 3a3a5e3f94068cd562d62a57da6983c8cd07d53c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 881f50d76c3892262730ddf5c894eb00310e736c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< ba166e0ebdde3dfa833f0a3edaf2b2934d4a87f7; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69
- Anyone running Linux 3.8

## Description

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

wifi: brcmfmac: Fix potential stack-out-of-bounds in brcmf\_c\_preinit\_dcmds()

This patch fixes a stack-out-of-bounds read in brcmfmac that occurs
when 'buf' that is not null-terminated is passed as an argument of
strsep() in brcmf\_c\_preinit\_dcmds(). This buffer is filled with a firmware
version string by memcpy() in brcmf\_fil\_iovar\_data\_get().
The patch ensures buf is null-terminated.

Found by a modified version of syzkaller.

\[   47.569679\]\[ T1897\] brcmfmac: brcmf\_fw\_alloc\_request: using brcm/brcmfmac43236b for chip BCM43236/3
\[   47.582839\]\[ T1897\] brcmfmac: brcmf\_c\_process\_clm\_blob: no clm\_blob available (err=-2), device may have limited channels available
\[   47.601565\]\[ T1897\] ==================================================================
\[   47.602574\]\[ T1897\] BUG: KASAN: stack-out-of-bounds in strsep+0x1b2/0x1f0
\[   47.603447\]\[ T1897\] Read of size 1 at addr ffffc90001f6f000 by task kworker/0:2/1897
\[   47.604336\]\[ T1897\]
\[   47.604621\]\[ T1897\] CPU: 0 PID: 1897 Comm: kworker/0:2 Tainted: G           O      5.14.0+ \#131
\[   47.605617\]\[ T1897\] Hardware name: QEMU Standard PC (i440FX + PIIX, 1996), BIOS rel-1.12.1-0-ga5cab58e9a3f-prebuilt.qemu.org 04/01/2014
\[   47.606907\]\[ T1897\] Workqueue: usb\_hub\_wq hub\_event
\[   47.607453\]\[ T1897\] Call Trace:
\[   47.607801\]\[ T1897\]  dump\_stack\_lvl+0x8e/0xd1
\[   47.608295\]\[ T1897\]  print\_address\_description.constprop.0.cold+0xf/0x334
\[   47.609009\]\[ T1897\]  ? strsep+0x1b2/0x1f0
\[   47.609434\]\[ T1897\]  ? strsep+0x1b2/0x1f0
\[   47.609863\]\[ T1897\]  kasan\_report.cold+0x83/0xdf
\[   47.610366\]\[ T1897\]  ? strsep+0x1b2/0x1f0
\[   47.610882\]\[ T1897\]  strsep+0x1b2/0x1f0
\[   47.611300\]\[ T1897\]  ? brcmf\_fil\_iovar\_data\_get+0x3a/0xf0
\[   47.611883\]\[ T1897\]  brcmf\_c\_preinit\_dcmds+0x995/0xc40
\[   47.612434\]\[ T1897\]  ? brcmf\_c\_set\_joinpref\_default+0x100/0x100
\[   47.613078\]\[ T1897\]  ? rcu\_read\_lock\_sched\_held+0xa1/0xd0
\[   47.613662\]\[ T1897\]  ? rcu\_read\_lock\_bh\_held+0xb0/0xb0
\[   47.614208\]\[ T1897\]  ? lock\_acquire+0x19d/0x4e0
\[   47.614704\]\[ T1897\]  ? find\_held\_lock+0x2d/0x110
\[   47.615236\]\[ T1897\]  ? brcmf\_usb\_deq+0x1a7/0x260
\[   47.615741\]\[ T1897\]  ? brcmf\_usb\_rx\_fill\_all+0x5a/0xf0
\[   47.616288\]\[ T1897\]  brcmf\_attach+0x246/0xd40
\[   47.616758\]\[ T1897\]  ? wiphy\_new\_nm+0x1703/0x1dd0
\[   47.617280\]\[ T1897\]  ? kmemdup+0x43/0x50
\[   47.617720\]\[ T1897\]  brcmf\_usb\_probe+0x12de/0x1690
\[   47.618244\]\[ T1897\]  ? brcmf\_usbdev\_qinit.constprop.0+0x470/0x470
\[   47.618901\]\[ T1897\]  usb\_probe\_interface+0x2aa/0x760
\[   47.619429\]\[ T1897\]  ? usb\_probe\_device+0x250/0x250
\[   47.619950\]\[ T1897\]  really\_probe+0x205/0xb70
\[   47.620435\]\[ T1897\]  ? driver\_allows\_async\_probing+0x130/0x130
\[   47.621048\]\[ T1897\]  \_\_driver\_probe\_device+0x311/0x4b0
\[   47.621595\]\[ T1897\]  ? driver\_allows\_async\_probing+0x130/0x130
\[   47.622209\]\[ T1897\]  driver\_probe\_device+0x4e/0x150
\[   47.622739\]\[ T1897\]  \_\_device\_attach\_driver+0x1cc/0x2a0
\[   47.623287\]\[ T1897\]  bus\_for\_each\_drv+0x156/0x1d0
\[   47.623796\]\[ T1897\]  ? bus\_rescan\_devices+0x30/0x30
\[   47.624309\]\[ T1897\]  ? lockdep\_hardirqs\_on\_prepare+0x273/0x3e0
\[   47.624907\]\[ T1897\]  ? trace\_hardirqs\_on+0x46/0x160
\[   47.625437\]\[ T1897\]  \_\_device\_attach+0x23f/0x3a0
\[   47.625924\]\[ T1897\]  ? device\_bind\_driver+0xd0/0xd0
\[   47.626433\]\[ T1897\]  ? kobject\_uevent\_env+0x287/0x14b0
\[   47.627057\]\[ T1897\]  bus\_probe\_device+0x1da/0x290
\[   47.627557\]\[ T1897\]  device\_add+0xb7b/0x1eb0
\[   47.628027\]\[ T1897\]  ? wait\_for\_completion+0x290/0x290
\[   47.628593\]\[ T1897\]  ? \_\_fw\_devlink\_link\_to\_suppliers+0x5a0/0x5a0
\[   47.629249\]\[ T1897\]  usb\_set\_configuration+0xf59/0x16f0
\[   47.629829\]\[ T1897\]  usb\_generic\_driver\_probe+0x82/0xa0
\[   47.630385\]\[ T1897\]  usb\_probe\_device+0xbb/0x250
\[   47.630927\]\[ T1897\]  ? usb\_suspend+0x590/0x590
\[   47.631397\]\[ T1897\]  really\_probe+0x205/0xb70
\[   47.631855\]\[ T1897\]  ? driver\_allows\_async\_probing+0x130/0x130
\[   47.632469\]\[ T1897\]  \_\_driver\_probe\_device+0x311/0x4b0
\[   47.633002\]\[ 
---truncated---

## Affected and fixed versions

- Linux: \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 89243a7b0ea19606ba1c2873c9d569026ccb344f; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d481fd6064bf215d7c5068e15aa390c3b16c9cd0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 17dbe90e13f52848c460d253f15b765038ec6dc0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d6ef66194bb4a6c18f5b9649bf62597909b040e4; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 3a3a5e3f94068cd562d62a57da6983c8cd07d53c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 881f50d76c3892262730ddf5c894eb00310e736c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< ba166e0ebdde3dfa833f0a3edaf2b2934d4a87f7; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69 (cvelist)
- Linux: 3.8 (cvelist)

## Mitigation

- Upgrade Linux to 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69 or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2022-50258. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2022-50258.md
Affected: Linux >= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, < 89243a7b0ea19606ba1c2873c9d569026ccb344f; >= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, < d481fd6064bf215d7c5068e15aa390c3b16c9cd0; >= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, < 17dbe90e13f52848c460d253f15b765038ec6dc0; >= 0af29bf7c1ddf5f3c355774…
Fixed in: Linux 89243a7b0ea19606ba1c2873c9d569026ccb344f, Linux 17dbe90e13f52848c460d253f15b765038ec6dc0, Linux 3a3a5e3f94068cd562d62a57da6983c8cd07d53c, Linux 881f50d76c3892262730ddf5c894eb00310e736c, Linux 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2022-50258 being exploited?

There is no confirmed exploitation: CVE-2022-50258 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2022-50258?

High: CVSS 7.8 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2022-50258?

Linux \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 89243a7b0ea19606ba1c2873c9d569026ccb344f; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d481fd6064bf215d7c5068e15aa390c3b16c9cd0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 17dbe90e13f52848c460d253f15b765038ec6dc0; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< d6ef66194bb4a6c18f5b9649bf62597909b040e4; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 3a3a5e3f94068cd562d62a57da6983c8cd07d53c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 881f50d76c3892262730ddf5c894eb00310e736c; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< ba166e0ebdde3dfa833f0a3edaf2b2934d4a87f7; \>= 0af29bf7c1ddf5f3c35577409de46ede5e8d7845, \< 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69; Linux 3.8.

### Is there a fix for CVE-2022-50258?

Yes. Fixed in Linux 89243a7b0ea19606ba1c2873c9d569026ccb344f, Linux 17dbe90e13f52848c460d253f15b765038ec6dc0, Linux 3a3a5e3f94068cd562d62a57da6983c8cd07d53c, Linux 881f50d76c3892262730ddf5c894eb00310e736c, Linux 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69. Upgrade Linux to 0a06cadcc2a0044e4a117cc0e61436fc3a0dad69 or later.

### How do I check if I'm affected by CVE-2022-50258?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/89243a7b0ea19606ba1c2873c9d569026ccb344f>
- patch: <https://git.kernel.org/stable/c/d481fd6064bf215d7c5068e15aa390c3b16c9cd0>
- patch: <https://git.kernel.org/stable/c/17dbe90e13f52848c460d253f15b765038ec6dc0>
- patch: <https://git.kernel.org/stable/c/d6ef66194bb4a6c18f5b9649bf62597909b040e4>
- patch: <https://git.kernel.org/stable/c/3a3a5e3f94068cd562d62a57da6983c8cd07d53c>
- patch: <https://git.kernel.org/stable/c/881f50d76c3892262730ddf5c894eb00310e736c>
- patch: <https://git.kernel.org/stable/c/ba166e0ebdde3dfa833f0a3edaf2b2934d4a87f7>
- patch: <https://git.kernel.org/stable/c/0a06cadcc2a0044e4a117cc0e61436fc3a0dad69>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2022-50258>

HTML: <https://flawdb.com/CVE-2022-50258> · JSON: <https://flawdb.com/api/v1/entries/CVE-2022-50258>
