CVE-2026-10773
PoC nicheOut-of-bounds read in Zephyr RTOS DHCPv4 client via malformed DHCP message type
Zephyr RTOS's DHCPv4 client contains a bounds-check bug in its message-type lookup helper net_dhcpv4_msg_type_name(), where the guard compares the message type against the byte size of the name-pointer array (sizeof, 32 or 64 bytes) instead of its element count (8), letting message types 9 through 32/64 pass the check and index past the end of the table. Because the message type is taken unvalidated from the DHCP MESSAGE TYPE option of a received packet, any DHCP server — or any host able to inject spoofed DHCP replies onto the client's link — can trigger the out-of-bounds read, but only when the DHCPv4 module is compiled with debug-level logging (CONFIG_NET_DHCPV4_LOG_LEVEL_DBG), which is not the default configuration. An attacker most likely crashes the DHCP client through a wild-pointer dereference in a debug log statement (denial of service), and may potentially disclose the contents of an adjacent pointer via the log output. Affected users are Zephyr-based devices that enable both the DHCPv4 client and DHCPv4 debug logging — largely development and prototype builds rather than typical production firmware. No in-the-wild exploitation is reported (EPSS 0.3%, not in CISA KEV); a public Zephyr security advisory (GHSA-r5hq-xq42-wcfq) is available and the fix restores the correct 1..8 acceptance window by replacing sizeof with ARRAY_SIZE.
What to do: Audit firmware builds for CONFIG_NET_DHCPV4_LOG_LEVEL_DBG with the DHCPv4 client enabled; if present, upgrade Zephyr to a release incorporating the ARRAY_SIZE fix per GHSA-r5hq-xq42-wcfq. As an interim mitigation, rebuild without DHCPv4 debug logging or ensure only trusted hosts can send DHCP replies on the client's link. Deployments that do not use the DHCPv4 client or do not compile DHCPv4 logging at DEBUG level are not exposed.
| Zephyr Project (zephyrproject) Zephyr RTOS | — |
Order-of-magnitude estimate by the model from install counts, market share and public scan data it knows; verify before quoting.
The DHCPv4 client helper net_dhcpv4_msg_type_name() in subsys/net/lib/dhcpv4/dhcpv4.c indexes a static 8-element const char * name table after a faulty bounds check. The guard used msg_type <= sizeof(name) instead of msg_type <= ARRAY_SIZE(name); sizeof returns the byte size of the pointer array (32 on 32-bit, 64 on 64-bit targets) rather than the element count of 8, so message-type values from 9 up to that byte size pass the check and cause name[msg_type - 1] to read past the end of the array. The msg_type value originates from the DHCP MESSAGE TYPE option, which is read as an unchecked raw byte from a received packet (net_pkt_read_u8) and passed unmodified into the lookup. A DHCP server, or any host able to inject a spoofed DHCP reply onto the client's link, can therefore drive the index out of bounds. The out-of-range slot yields a garbage const char * that is then dereferenced by a %s log conversion. The lookup is reached only from a debug log statement (NET_DBG / LOG_DBG), so the out-of-bounds read is triggerable only when the DHCPv4 log module is built at DEBUG level (CONFIG_NET_DHCPV4_LOG_LEVEL_DBG), which is not the default configuration. When that condition holds, the result is an out-of-bounds read and a wild-pointer dereference: most likely a crash of the DHCP client (denial of service) and potentially disclosure of an adjacent pointer's contents through the log output. The fix replaces sizeof with ARRAY_SIZE, restoring the correct 1..8 acceptance window.
- Vendors
- zephyrproject
- Products
- zephyr
- Weakness
- CWE-125, CWE-682
- Vector
- CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
In the news0 stories
No ingested article mentions this CVE yet.