CVE-2026-10666: Stack buffer overflow in `net_ipaddr_parse()` IPv4 address-with-port parsing in `subsys/net/ip/utils.c`
parseipv4() in subsys/net/ip/utils.c (reached via netipaddrparse() for strings of the form "a.b.c.d:port") copies the port substring into a fixed 17-byte stack buffer (char ipaddr[NETIPV4ADDRLEN + 1]) using a length of strlen - end - 1, where strlen is the full, unbounded input length and end is only the (<=15-byte) offset of the ':' delimiter. Because the destination size is never consulted, a crafted address string with a long suffix after the colon (e.g. "1.2.3.4:" followed by hundreds of bytes) causes an out-of-bounds stack write whose length and contents are fully attacker-controlled (memcpy of the suffix plus a trailing NUL), enabling memory corruption and at minimum a denial of service, and potentially control-flow hijack. The parser is reached from the standard socket API (zsockgetaddrinfo / literal-address resolution), DNS server-string configuration, and the eswifi Wi-Fi co-processor DNS-response path, so an application that resolves a network-influenced address string is exposed. The bug was introduced when the parser was added (Zephyr v1.9.0) and shipped in all releases through v4.4.0. The fix removes the unbounded copy and validates the port length before copying into a small dedicated buffer. Note: the equivalent IPv6 "[addr]:port" path in parseipv6() retains the same unbounded copy at this commit and remains a separate, still-reachable instance of the defect.
Affected Software
Remediation
Recommended actions to resolve this vulnerability, in priority order.
- Upgrade
Upgrade
Zephyr subsys/net/ip/utils.c net_ipaddr_parse() / parse_ipv4() IPv4 address-with-port parsingto a version that resolves this vulnerability.Fixed in 4.4.0 - Upgrade
Upgrade
Zephyrto a version that resolves this vulnerability.Fixed in 1.9.0 - Compensating control
To reduce exposure via network-influenced address strings, avoid passing attacker-influenced literals into zsock_getaddrinfo / literal-address resolution, DNS server-string configuration, and the eswifi Wi-Fi co-processor DNS-response path.
Event History
Frequently Asked Questions
What is the severity of CVE-2026-10666?
The severity of CVE-2026-10666 is high with a CVSS score of 8.1.
How do I fix CVE-2026-10666?
To fix CVE-2026-10666, update the Zephyr Project to the latest version that includes an appropriate patch.
What type of vulnerability is CVE-2026-10666?
CVE-2026-10666 is a stack buffer overflow vulnerability affecting IPv4 address-with-port parsing.
Which software is affected by CVE-2026-10666?
CVE-2026-10666 affects the Zephyr Project and specifically its implementation in subsys/net/ip/utils.c.
What is the impact of CVE-2026-10666?
The impact of CVE-2026-10666 includes potential remote code execution due to stack overflow from unbounded input.