Severity by source
AV:L/AC:H/PR:L/UI:N/S:C/C:H/I:H/A:H
Requires local thread execution and a timing race (AV:L, AC:H, PR:L); successful kernel heap corruption crosses the privilege boundary (S:C) yielding full confidentiality, integrity, and availability impact.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
Lifecycle Timeline
3DescriptionCVE.org
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.
AnalysisAI
Kernel heap corruption via a double-fetch race condition in Zephyr RTOS's unprivileged socket syscall verifiers allows a local low-privilege attacker to achieve kernel privilege escalation or trigger a kernel denial of service. The flaw exists in z_vrfy_zsock_sendmsg() and z_vrfy_zsock_recvmsg() within subsys/net/lib/sockets/sockets.c, where msg_iovlen is read twice from live user memory - once to size the kernel heap shadow buffer and once as the iovec copy-loop bound - enabling a cooperating attacker thread to inflate the field between those reads and drive an out-of-bounds write into adjacent kernel heap objects. No public exploit has been identified at time of analysis; an upstream patch commit is confirmed available via the Zephyr project security advisory.
Technical ContextAI
Zephyr RTOS (CPE: cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*) is an open-source real-time operating system targeting constrained embedded and IoT devices that exposes a POSIX-like socket API through zsock_sendmsg and zsock_recvmsg syscalls. When CONFIG_USERSPACE is enabled, Zephyr enforces a hardware-backed user/kernel privilege boundary; syscall verifier functions (z_vrfy_*) are responsible for safely copying caller-supplied structures into kernel-controlled memory before the privileged implementation executes. The root cause is CWE-367 (Time-of-Check Time-of-Use): the verifier reads the user-space struct net_msghdr field msg_iovlen once via size_mul_overflow() to size a kernel-heap iovec shadow buffer, then reads the same live user-space field a second time as the loop bound during iovec population. Because the msg pointer still references ordinary user memory rather than the kernel snapshot, a cooperating thread in the same address domain can modify msg_iovlen between these two reads - a classic double-fetch - causing the population loop to iterate past the allocated shadow buffer and write attacker-influenced iov_base/iov_len values into adjacent kernel heap objects. The recvmsg verifier carries the identical defect across both its inbound allocation loop and its result write-back loop. The upstream fix (commit 2e0f9cf) eliminates all live re-reads by snapshotting the full net_msghdr header once with k_usermode_from_copy() before any size arithmetic, and copying each iovec entry atomically via a local stack struct so no field can be raced between check and use.
RemediationAI
Apply upstream commit 2e0f9cf05be61056ed1a94dab51b832fbad27e2c (https://github.com/zephyrproject-rtos/zephyr/commit/2e0f9cf05be61056ed1a94dab51b832fbad27e2c), which eliminates all double-fetch opportunities in both the sendmsg and recvmsg verifiers by snapshotting the net_msghdr header exactly once before any size calculation and copying each iovec atomically. Track the Zephyr security advisory GHSA-fcp3-vrr2-xfjv for the tagged release incorporating this fix, as the exact patched version number was not confirmed in the available data. If immediate patching is not feasible, the most direct compensating control is to disable CONFIG_USERSPACE in the build configuration, which removes the user/kernel privilege boundary and the z_vrfy_* verifier layer entirely - note that this also eliminates userspace isolation protections project-wide, which may be architecturally unacceptable for multi-tenant or safety-critical deployments. A narrower alternative is to restrict thread permissions for zsock_sendmsg and zsock_recvmsg to only trusted threads via Zephyr's thread permission APIs, reducing the attack surface without disabling the full userspace subsystem, though this does not eliminate risk if any permitted thread is compromised.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit
Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS
Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner
Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability
Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable
DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul
zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(
Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul
Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.
The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte
Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c
Same technique Denial Of Service
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-57069