Skip to main content

Zephyr RTOS CVE-2026-10643

HIGH
Out-of-bounds Write (CWE-787)
2026-06-27 zephyr
7.8
CVSS 3.1 · NVD
Share

Severity by source

Vendor (zephyr) PRIMARY
HIGH
qualitative
NVD
7.8 HIGH
AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
vuln.today AI
7.7 HIGH

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.

3.1 AV:L/AC:H/PR:L/UI:N/S:C/C:L/I:H/A:H
4.0 AV:L/AC:H/AT:N/PR:L/UI:N/VC:L/VI:H/VA:H/SC:L/SI:H/SA:H

Primary rating from Vendor (zephyr).

CVSS VectorNVD

Attack Vector
Local
Attack Complexity
Low
Privileges Required
Low
User Interaction
None
Scope
Unchanged
Confidentiality
High
Integrity
High
Availability
High

Lifecycle Timeline

10
Analysis Updated
Jul 06, 2026 - 21:47 vuln.today
v7 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v6 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v5 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:46 vuln.today
v4 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:45 vuln.today
v3 (cvss_changed)
Analysis Updated
Jul 06, 2026 - 21:44 vuln.today
v2 (cvss_changed)
Re-analysis Queued
Jul 06, 2026 - 19:52 vuln.today
cvss_changed
CVSS changed
Jul 06, 2026 - 19:52 NVD
8.7 (HIGH) 7.8 (HIGH)
Source Code Evidence Fetched
Jun 27, 2026 - 23:50 vuln.today
Analysis Generated
Jun 27, 2026 - 23:50 vuln.today

DescriptionNVD

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.

More in Zephyr

View all
CVE-2023-4260 CRITICAL POC
10.0 Sep 27

Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),

CVE-2023-5055 CRITICAL POC
9.8 Nov 21

Possible variant of CVE-2021-3434 in function le_ecred_reconf_req. Rated critical severity (CVSS 9.8), this vulnerabilit

CVE-2023-4257 CRITICAL POC
9.8 Oct 13

Unchecked user input length in /subsys/net/l2/wifi/wifi_shell.c can cause buffer overflows. Rated critical severity (CVS

CVE-2023-3725 CRITICAL POC
9.8 Oct 06

Potential buffer overflow vulnerability in the Zephyr CAN bus subsystem. Rated critical severity (CVSS 9.8), this vulner

CVE-2021-3323 CRITICAL POC
9.8 Oct 12

Integer Underflow in 6LoWPAN IPHC Header Uncompression in Zephyr. Rated critical severity (CVSS 9.8), this vulnerability

CVE-2021-3625 CRITICAL POC
9.8 Oct 05

Buffer overflow in Zephyr USB DFU DNLOAD. Rated critical severity (CVSS 9.8), this vulnerability is remotely exploitable

CVE-2021-3319 CRITICAL POC
9.8 Oct 05

DOS: Incorrect 802154 Frame Validation for Omitted Source / Dest Addresses. Rated critical severity (CVSS 9.8), this vul

CVE-2018-1000800 CRITICAL POC
9.8 Sep 06

zephyr-rtos version 1.12.0 contains a NULL base pointer reference vulnerability in sys_ring_buf_put(), sys_ring_buf_get(

CVE-2023-4264 CRITICAL POC
9.6 Sep 27

Potential buffer overflow vulnerabilities n the Zephyr Bluetooth subsystem. Rated critical severity (CVSS 9.6), this vul

CVE-2026-1678 CRITICAL POC
9.4 Mar 05

Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.

CVE-2024-1638 CRITICAL POC
9.1 Feb 19

The documentation specifies that the BT_GATT_PERM_READ_LESC and BT_GATT_PERM_WRITE_LESC defines for a Bluetooth characte

CVE-2023-5753 HIGH POC
8.8 Oct 25

Potential buffer overflows in the Bluetooth subsystem due to asserts being disabled in /subsys/bluetooth/host/hci_core.c

Share

CVE-2026-10643 vulnerability details – vuln.today

This site uses cookies essential for authentication and security. No tracking or analytics cookies are used. Privacy Policy