# CVE-2026-12234: TOCTOU double-fetch in \`zsock\_sendmsg\`/\`recvmsg\` userspace verifiers allows kernel-heap out-of-bounds write

> 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, CNA) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Changed (impact reaches other components); 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.11% (percentile 0, 2026-11-28)
- **CWE:** CWE-367
- **Published:** 2026-08-12T04:39:23.977Z
- **Modified:** 2026-10-23T20:10:00.160Z

## Who should check

- Anyone running zephyrproject zephyr \>= 2.3.0, \< 4.4.2

## Description

The userspace syscall verifiers z\_vrfy\_zsock\_sendmsg() and z\_vrfy\_zsock\_recvmsg() in subsys/net/lib/sockets/sockets.c snapshot the caller-supplied struct net\_msghdr into a kernel-side copy with k\_usermode\_from\_copy(), but then re-read the still-live user struct for subsequent decisions. The kernel iovec shadow buffer is sized from one read of msg-\>msg\_iovlen, while the population loop is bounded by a second, live read of the same field.

Because msg points into ordinary user memory, a cooperating second thread in the same memory domain can inflate msg-\>msg\_iovlen in the window between the sizing read and the loop test (a classic double-fetch / TOCTOU). The population loop then iterates past the number of net\_iovec slots actually allocated, writing attacker-influenced iov\_base/iov\_len values beyond the end of the kernel-heap shadow buffer. The recvmsg verifier has the same defect on both its inbound and result write-back loops.

The code is reachable from an unprivileged user thread whenever CONFIG\_USERSPACE is enabled and the zsock\_sendmsg/zsock\_recvmsg syscalls are available. A successful race corrupts kernel-managed heap memory across the user-to-kernel privilege boundary, yielding a local privilege-escalation primitive or, at minimum, a kernel-fault denial of service. The fix copies the header once and derives every size, bound, and gate from the snapshot, copying each iovec entry atomically so its base and length can no longer be raced apart.

## Affected and fixed versions

- zephyrproject zephyr: \>= 2.3.0, \< 4.4.2 (cvelist)

## Mitigation

- Upgrade zephyr to 4.4.2 or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2026-12234.md
Affected: zephyrproject zephyr >= 2.3.0, < 4.4.2
Fixed in: zephyrproject zephyr 4.4.2

Steps:
1. Search this machine and project for zephyrproject zephyr: 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-2026-12234 being exploited?

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

### How serious is CVE-2026-12234?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

### Which versions are affected by CVE-2026-12234?

zephyrproject zephyr \>= 2.3.0, \< 4.4.2.

### Is there a fix for CVE-2026-12234?

Yes. Fixed in zephyrproject zephyr 4.4.2. Upgrade zephyr to 4.4.2 or later.

### How do I check if I'm affected by CVE-2026-12234?

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

- vendor: <https://github.com/zephyrproject-rtos/zephyr/security/advisories/GHSA-fcp3-vrr2-xfjv>
- patch: <https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c>

## 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-2026-12234>

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