CVE-2026-10666: memory-safety in zephyrproject zephyr
parse_ipv4() in subsys/net/ip/utils.c (reached via net_ipaddr_parse() for strings of the form "a.b.c.d:port") copies the port substring into a fixed 17-byte stack buffer (char ipaddr[NET_IPV4_ADDR_LEN + 1]) using a length of str_len - end - 1, where str_len 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 (zsock_getaddrinfo / 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 parse_ipv6() retains the same unbounded copy at this commit and remains a separate, still-reachable instance of the defect.
AI Analysis
Technical Summary
The vulnerability in Zephyr's parse_ipv4() function occurs because it copies the port portion of an IPv4 address string into a fixed-size stack buffer without validating the length of the input. The function uses memcpy with a length derived from the total input length minus the position of the colon delimiter, which can be much larger than the buffer size. This allows an attacker to supply a crafted address string with a long suffix after the colon, causing an out-of-bounds stack write with attacker-controlled data. This memory corruption can lead to denial of service or potentially control-flow hijacking. The vulnerable code is reachable via standard socket API calls, DNS server-string configuration, and Wi-Fi co-processor DNS-response paths. The flaw was introduced in Zephyr v1.9.0 and affects all releases up to and including v4.4.0. The fix removes the unbounded copy and adds port length validation. Note that the IPv6 parser still contains a similar unbounded copy issue.
Potential Impact
Successful exploitation allows an attacker to cause out-of-bounds stack writes with attacker-controlled data, leading to memory corruption. This can result in denial of service or potentially allow control-flow hijacking, compromising the affected system. The vulnerability affects network-facing components, increasing exposure risk in applications that resolve network-influenced address strings.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The fix described removes the unbounded copy and validates port length before copying. Until an official patch is available, avoid processing untrusted or malformed IPv4 address strings with port suffixes. Monitor vendor channels for updates and apply official fixes once released.
CVE-2026-10666: memory-safety in zephyrproject zephyr
Description
parse_ipv4() in subsys/net/ip/utils.c (reached via net_ipaddr_parse() for strings of the form "a.b.c.d:port") copies the port substring into a fixed 17-byte stack buffer (char ipaddr[NET_IPV4_ADDR_LEN + 1]) using a length of str_len - end - 1, where str_len 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 (zsock_getaddrinfo / 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 parse_ipv6() retains the same unbounded copy at this commit and remains a separate, still-reachable instance of the defect.
CVSS v3.1
Score 8.1high
Affected software
Run on your own infrastructure? Check whether these packages are installed with threat-finder — our free open-source scanner.
AI-Powered Analysis
Machine-generated threat intelligence
Technical Analysis
The vulnerability in Zephyr's parse_ipv4() function occurs because it copies the port portion of an IPv4 address string into a fixed-size stack buffer without validating the length of the input. The function uses memcpy with a length derived from the total input length minus the position of the colon delimiter, which can be much larger than the buffer size. This allows an attacker to supply a crafted address string with a long suffix after the colon, causing an out-of-bounds stack write with attacker-controlled data. This memory corruption can lead to denial of service or potentially control-flow hijacking. The vulnerable code is reachable via standard socket API calls, DNS server-string configuration, and Wi-Fi co-processor DNS-response paths. The flaw was introduced in Zephyr v1.9.0 and affects all releases up to and including v4.4.0. The fix removes the unbounded copy and adds port length validation. Note that the IPv6 parser still contains a similar unbounded copy issue.
Potential Impact
Successful exploitation allows an attacker to cause out-of-bounds stack writes with attacker-controlled data, leading to memory corruption. This can result in denial of service or potentially allow control-flow hijacking, compromising the affected system. The vulnerability affects network-facing components, increasing exposure risk in applications that resolve network-influenced address strings.
Mitigation Recommendations
Patch status is not yet confirmed — check the vendor advisory for current remediation guidance. The fix described removes the unbounded copy and validates port length before copying. Until an official patch is available, avoid processing untrusted or malformed IPv4 address strings with port suffixes. Monitor vendor channels for updates and apply official fixes once released.
Technical Details
- Data Version
- 5.2
- Assigner Short Name
- zephyr
- Date Reserved
- 2026-06-02T15:25:27.847Z
- Cvss Version
- 3.1
- State
- PUBLISHED
- Remediation Level
- null
Threat ID: 6a54991068715ace436e94e0
Added to database: 07/13/2026, 07:51:44 UTC
Last enriched: 07/13/2026, 07:53:14 UTC
Last updated: 07/13/2026, 19:47:35 UTC
Views: 12
Community Reviews
0 reviewsCrowdsource mitigation strategies, share intel context, and vote on the most helpful responses. Sign in to add your voice and help keep defenders ahead.
Want to contribute mitigation steps or threat intel context? Sign in or create an account to join the community discussion.
Actions
Updates to AI analysis require Pro Console access. Upgrade inside Console → Billing.
Need more coverage?
Upgrade to Pro Console for AI refresh and higher limits.
For incident response and remediation, OffSeq services can help resolve threats faster.
Latest Threats
Check if your credentials are on the dark web
Instant breach scanning across billions of leaked records. Free tier available.