Zephyr RTOS
CVE-2026-10643
HIGH
Severity by source
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Local trigger from an unprivileged userspace thread (AV:L, PR:L) with a reliable fixed-size heap overflow (AC:L) that corrupts kernel memory, yielding high C/I/A potential without scope change.
Primary rating from Vendor (zephyr).
CVSS VectorNVD
Lifecycle Timeline
10DescriptionNVD
Zephyr's IP socket recvmsg() implementation (subsys/net/lib/sockets/sockets_inet.c, insert_pktinfo()) validated the user-supplied ancillary (msg_control) buffer using only the payload length (msg-msg_controllen < pktinfo_len) before writing a full control message consisting of an aligned cmsg header plus the payload. Because the check omitted the cmsg header size, a control buffer whose length falls in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target, where a single element actually occupies 28 bytes) passes the guard yet causes a fixed-size out-of-bounds write of up to one cmsg header (~12 bytes) past the end of the buffer. Under CONFIG_USERSPACE the recvmsg verifier allocates a kernel-heap copy of the control buffer sized to msg_controllen and runs the implementation against it, so the overflow corrupts kernel heap memory and is triggerable from an unprivileged userspace thread; in supervisor mode it corrupts the caller's buffer. The path is reachable on a UDP/IP socket with IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled when the application calls recvmsg() with an undersized control buffer and a datagram is received; part of the overwritten bytes (the destination IP in ipi_addr) is influenced by the received packet. The fix makes the capacity check use NET_CMSG_SPACE(pktinfo_len) (aligned header + aligned data) and returns -ENOMEM when the buffer is too small. Affected: v3.6.0 through v4.4.0.
AnalysisAI
Out-of-bounds heap write in the Zephyr RTOS IP socket stack (recvmsg/insert_pktinfo) lets an unprivileged local userspace thread corrupt kernel-heap memory on builds using CONFIG_USERSPACE. Affecting Zephyr v3.6.0 through v4.4.0, the flaw is triggered when an application calls recvmsg() with an undersized ancillary (msg_control) buffer on a UDP/IP socket that has IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled and a datagram arrives. There is no public exploit identified at time of analysis and EPSS is low (0.12%), but the memory-corruption primitive gives full C/I/A impact locally.
Technical ContextAI
Zephyr is a widely-used real-time operating system for resource-constrained IoT and embedded devices (cpe:2.3:a:zephyrproject:zephyr). The bug lives in subsys/net/lib/sockets/sockets_inet.c, in insert_pktinfo(), which builds a POSIX-style control message (cmsghdr + payload) for socket ancillary data such as IP_PKTINFO. The root cause is CWE-787 (out-of-bounds write): the capacity check compared the user buffer only against the raw payload length (msg_controllen < pktinfo_len) and ignored the aligned cmsg header. Because a full IPv4 IP_PKTINFO element occupies 28 bytes on a 64-bit target (aligned header plus aligned data) while the check only required room for the payload, a buffer sized in the 16-27 byte window passes the guard but the write runs off the end. Under CONFIG_USERSPACE the recvmsg verifier allocates a kernel-heap copy of the control buffer sized to msg_controllen, so the overflow lands in kernel heap rather than user memory. The fix switches the check to NET_CMSG_SPACE(pktinfo_len), which accounts for aligned header plus aligned data, and returns -ENOMEM when the buffer is too small; a companion fix corrects update_msg_controllen() to accumulate NET_ALIGN_H(cmsg_len).
RemediationAI
Upstream fix available (PR/commit); a released patched version is not independently confirmed from the provided data - apply commit 01fe77b2ec3885583f709a17c5203ce02bd77012 (https://github.com/zephyrproject-rtos/zephyr/commit/01fe77b2ec3885583f709a17c5203ce02bd77012) or the corresponding maintenance release for your branch, which corrects the capacity check to use NET_CMSG_SPACE(pktinfo_len) and returns -ENOMEM on undersized buffers. Because Zephyr is compiled into device firmware, remediation means rebuilding and reflashing affected images rather than package updates. Where an immediate rebuild is not possible, compensating controls include disabling the ancillary-data socket options that reach the vulnerable path - do not enable IP_PKTINFO/IPV6_RECVPKTINFO, IP hoplimit reporting, or SO_TIMESTAMPING on IP sockets (trade-off: applications that rely on knowing the datagram's destination interface/address lose that metadata) - and, on CONFIG_USERSPACE builds, restricting which threads run in user mode and can invoke recvmsg() so untrusted code cannot reach the primitive; auditing application code to ensure recvmsg() is always called with a control buffer of at least NET_CMSG_SPACE() bytes also avoids triggering the flaw. Cross-reference the analysis at https://vuldb.com/vuln/374512.
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 weakness CWE-787 – Out-of-bounds Write
View allSame technique Memory Corruption
View allShare
External POC / Exploit Code
Leaving vuln.today