Zephyr RTOS
CVE-2026-10643
HIGH
Attack ChainAIDerived
Hypothetical attack flow derived from CVE metadata – not a confirmed exploit chain
-
AccessRun unprivileged userspace thread (CONFIG_USERSPACE)
-
DeliveryOpen UDP socket with IP_PKTINFO
-
ExploitCall recvmsg() with undersized control buffer
-
ExecutionInbound datagram triggers insert_pktinfo()
-
PersistFixed-size cmsg header written past kernel-heap buffer
-
ImpactGroom heap to escalate corruption
Vulnerability Assessment
| Weakness |
CWE
ASVS 5.0
V15 - Secure Coding and Architecture Bounds checking, write limits
MITRE ATT&CK
2 techniques across 2 tactics: Execution, Privilege Escalation The technique list with ATT&CK links and the kill-chain view is part of the Basic plan and up. |
| Exploitation Conditions | Requires a Zephyr build in the affected range (v3.6.0-v4.4.0) with the networking socket layer enabled AND an application that opens an IP/UDP socket with one of the ancillary options that reach insert_pktinfo() - IP_PKTINFO or IPV6_RECVPKTINFO (or hoplimit / SO_TIMESTAMPING) - and then calls recvmsg() with a control buffer sized in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target). A datagram must actually be received to trigger the write. Kernel-heap corruption (the serious case) additionally requires CONFIG_USERSPACE, under which an unprivileged userspace thread is sufficient (PR:L); in supervisor-only mode the overflow only corrupts the caller's own buffer, materially limiting impact. Limiting factors: exploitation is local (AV:L) not remote, depends on the application deliberately using ancillary data with an undersized buffer, the overflow is a fixed ~12-byte header write (not attacker-length-controlled) with only the ipi_addr destination-IP bytes influenced by packet contents, and it does not affect builds that never enable these socket options. |
| Impact | The signals are internally consistent and point to a real but bounded, locally-scoped issue rather than a mass-exploitation emergency. The CVSS 3.1 vector CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H (base 7.8 High) correctly reflects local attack vector with low privileges required, matching the description that exploitation comes from an unprivileged userspace thread on a CONFIG_USERSPACE build. EPSS is very low (0.12%, 2nd percentile) and CISA SSVC records Exploitation: none, Automatable: no, Technical Impact: partial - all aligned: this is not remotely reachable, not internet-facing, and not something a worm can spray. The write is fixed-size (about one 12-byte cmsg header past the buffer) and only partially attacker-influenced (the destination IP in ipi_addr comes from the received packet), which constrains how much a kernel-heap corruption can be shaped, consistent with SSVC's 'partial' technical impact even though CVSS marks C/I/A High. No KEV listing and no POC are indicated, so this should be prioritized as a standard patch-in-next-cycle item for affected embedded fleets, with urgency rising only where untrusted code runs as unprivileged userspace threads on a networked device. |
| Exploit ScenarioDerived | On a networked Zephyr device built with CONFIG_USERSPACE, an attacker who can run (or coerce) an unprivileged userspace thread opens a UDP socket with IP_PKTINFO enabled and calls recvmsg() with a deliberately undersized (e.g. 16-27 byte) control buffer; when any datagram arrives, insert_pktinfo() writes about 12 bytes past the kernel-heap copy, corrupting adjacent heap metadata. With repeated triggering and heap grooming - partly steering the overwritten destination-IP bytes via crafted inbound packets - this local, low-privilege memory corruption can be escalated toward kernel-context compromise; no public POC is identified at time of analysis, and the local attack vector with low complexity (AC:L) keeps the trigger reliable but not remotely reachable. |
Get an e-mail when this CVE is exploited, patched or re-scored. Free account.
Alert meAnalysisAIv7 – Jul 06, 2026
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.
Earlier versions of this analysis (6)
Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) occurs in the IP socket recvmsg() ancillary-data path when insert_pktinfo() validates the user's msg_control buffer against only the payload length and omits the aligned cmsg header, letting an undersized buffer pass the guard and take a fixed ~12-byte overwrite past its end. On builds with CONFIG_USERSPACE the recvmsg verifier stages the control buffer in a kernel-heap copy sized to msg_controllen, so an unprivileged userspace thread can corrupt kernel heap memory; in supervisor mode the caller's own buffer is corrupted. No public exploit identified at time of analysis, EPSS is low (0.12%, 2nd percentile), and CISA SSVC records no observed exploitation.
Out-of-bounds kernel-heap write in Zephyr RTOS (v3.6.0-v4.4.0) occurs when its IP socket recvmsg() implementation copies ancillary control data into an undersized msg_control buffer, letting a local unprivileged userspace thread (under CONFIG_USERSPACE) corrupt kernel heap memory. The flaw stems from insert_pktinfo() validating only the payload length and omitting the cmsg header size, so a control buffer in the 16-27 byte window for IPv4 IP_PKTINFO on a 64-bit target passes the guard yet triggers a fixed ~12-byte overflow. There is no public exploit identified at time of analysis, EPSS is low (0.12%), and CISA SSVC rates exploitation as none; real-world risk is bounded by the need for local code execution plus a specific application usage pattern.
Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) lets an unprivileged local thread corrupt kernel memory through the IP socket recvmsg() path. The insert_pktinfo() routine sized its control-buffer capacity check against only the ancillary payload length while later writing an aligned cmsg header plus payload, so an undersized msg_control buffer passes validation and triggers a fixed ~12-byte overflow past the buffer end. Under CONFIG_USERSPACE the overflow lands in a kernel-heap copy, making it reachable across the user/kernel boundary; there is no public exploit identified at time of analysis and EPSS is low (0.12%).
Out-of-bounds heap write in the Zephyr RTOS IP socket stack (v3.6.0 through v4.4.0) lets a local unprivileged userspace thread corrupt kernel memory when receiving datagrams via recvmsg(). The insert_pktinfo() routine sized its control-buffer capacity check on the payload length alone, omitting the aligned cmsg header, so an undersized ancillary buffer passes validation and triggers a fixed ~12-byte overflow. No public exploit is identified at time of analysis and EPSS is low (0.12%), but the flaw is a genuine memory-corruption primitive reachable from unprivileged code under CONFIG_USERSPACE.
Out-of-bounds heap write in Zephyr RTOS (v3.6.0 through v4.4.0) lets an unprivileged userspace thread corrupt kernel memory by calling recvmsg() with an undersized ancillary (msg_control) buffer on a UDP/IP socket that has IP_PKTINFO, IPV6_RECVPKTINFO, hoplimit, or timestamping enabled. The insert_pktinfo() capacity check compared the buffer length against only the payload length and omitted the aligned cmsg header, so a control buffer in the under-checked window (e.g. 16-27 bytes for IPv4 IP_PKTINFO on a 64-bit target) passes validation yet triggers a fixed-size write of up to ~12 header bytes past the buffer end. There is no public exploit identified at time of analysis; EPSS is low (0.12%, 2nd percentile) and the flaw is not in CISA KEV.
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 with CONFIG_USERSPACE enabled. Affecting versions v3.6.0 through v4.4.0, the flaw is triggered when an application calls recvmsg() with an undersized ancillary (control) buffer on a UDP/IP socket that has IP_PKTINFO/IPV6_RECVPKTINFO (or hoplimit/timestamping) enabled and a datagram arrives, overwriting up to one cmsg header (~12 bytes) past the buffer. No public exploit identified at time of analysis, and it is not listed in CISA KEV; a vendor commit fixes the capacity check.
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.
Affects your stack
Find out whether the stacks and servers you run are on an affected version.
Checking this CVE against your own stacks and servers is part of the Basic plan and up.
Technical ContextAI · show details
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).
Know when Zephyr gets its next vulnerability
- Watch products and get an email when something new is published
- Check this CVE against your own stack and servers
- Exploit and PoC references, threat intelligence from 22 sources
No credit card · 7-day full trial
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
7DescriptionNVD
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.
Executive ViewAI
A memory corruption vulnerability in Zephyr RTOS versions 3.6.0 through 4.4.0 enables local attackers to corrupt kernel memory through the UDP/IP socket stack, potentially compromising embedded systems and IoT devices. No public exploit identified at time of analysis; however, the vulnerability grants full local compromise if successfully exploited, and organizations deploying affected versions should prioritize patching. The attack requires local execution capabilities and specific socket configurations, limiting immediate widespread risk but warranting prompt security updates.
Apply vendor patch.
Threat Intelligence Overview
How this decision was reached
The engine reads each signal below and applies a fixed list of rules from top to bottom. The first rule that matches sets the recommended action – like a statement, every line is shown.
What every action level means
SSVC AssessmentENISA
Priority Score
Attack Technique
A buffer overflow occurs when a program writes more data to a memory buffer than it was allocated to hold, causing the excess data to spill into adjacent memory regions.
Memory corruption occurs when a program writes data beyond the boundaries of allocated memory regions or accesses memory in unintended ways, violating the integrity of the process's address space.
Affected Products (CPE)NVD
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
An out-of-bounds write in the Zephyr RTOS DNS resolver (dns_unpack_name()) lets a crafted DNS response corrupt memory on
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
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
NVD
CVE.org
EPSS
Vulnrichment
GitHub
VulDB
Exploit-DB