Severity by source
AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L
AV:A for link-local DHCP; AC:H because exploitation requires the non-default CONFIG_NET_DHCPV4_LOG_LEVEL_DBG build condition; PR:N as no attacker authentication is needed.
Primary rating from Vendor (zephyr).
CVSS VectorVendor: zephyr
Lifecycle Timeline
2DescriptionCVE.org
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.
AnalysisAI
Out-of-bounds read in Zephyr RTOS DHCPv4 client (versions 1.7.0 through 4.4.x) allows an adjacent-network attacker to crash the DHCP client or leak adjacent pointer contents by sending a crafted DHCP reply with a message-type value greater than 8. The defect is a classic sizeof-vs-ARRAY_SIZE confusion: the bounds guard compares a raw msg_type byte against the byte-size of a pointer array (32 or 64, depending on architecture) rather than its element count of 8, so values 9-31/63 bypass the check and cause a wild-pointer dereference inside a debug log call. Exploitation is gated on a non-default build configuration (CONFIG_NET_DHCPV4_LOG_LEVEL_DBG), substantially reducing the real-world attack surface. No public exploit code has been identified at time of analysis, and this CVE is not listed in the CISA KEV catalog.
Technical ContextAI
Zephyr RTOS (CPE: cpe:2.3:a:zephyrproject:zephyr:*:*:*:*:*:*:*:*) is a Linux Foundation RTOS targeting constrained IoT and embedded devices. The DHCPv4 client is implemented in subsys/net/lib/dhcpv4/dhcpv4.c. The function net_dhcpv4_msg_type_name() maps a numeric DHCP message type (RFC 2132 option 53) to a human-readable string via a static 8-element const char* array. The faulty guard (msg_type <= sizeof(name)) compares the byte against the byte-size of the pointer array - 32 bytes on a 32-bit target, 64 bytes on a 64-bit target - rather than the logical element count of 8 obtained by ARRAY_SIZE(). CWE-125 (Out-of-bounds Read) applies: a raw byte from the received packet (read via net_pkt_read_u8 with no range validation) can index past the end of the array. The out-of-range slot contains a garbage const char* value that is subsequently passed to a %s format specifier in NET_DBG/LOG_DBG, causing a wild-pointer dereference. The same sizeof bug also appeared in net_dhcpv4_state_name() and in the DHCPv6 counterpart (subsys/net/lib/dhcpv6/dhcpv6.c), both fixed in the same commit. The vulnerability is only reachable when the DHCPv4 log module is compiled at DEBUG verbosity, a non-default Kconfig option.
RemediationAI
The primary fix is to upgrade to Zephyr 4.5.0 or later, which incorporates the corrective commit 73c8a7df4f00088fc04ee5ab71bcabf47fcd3db7 (https://github.com/zephyrproject-rtos/zephyr/commit/73c8a7df4f00088fc04ee5ab71bcabf47fcd3db7) replacing sizeof(name) with ARRAY_SIZE(name) in both net_dhcpv4_msg_type_name() and net_dhcpv4_state_name(), as well as the DHCPv6 equivalent. The upstream fix is available as a patch commit; a tagged 4.5.0 release version has not been independently verified at time of analysis. For projects that cannot immediately upgrade, the direct compensating control is to ensure CONFIG_NET_DHCPV4_LOG_LEVEL_DBG is not set in the build configuration - this removes the only code path that reaches the vulnerable lookup and eliminates the attack surface entirely at zero functional cost to production firmware. Disabling DHCPv4 altogether (if static IP assignment is viable) is an alternative but carries significant operational impact. Network-level mitigations such as 802.1X port authentication or DHCP snooping on managed switches can limit an attacker's ability to inject spoofed DHCP replies, but do not address the root cause.
Potential off-by-one buffer overflow vulnerability in the Zephyr fuse file system. Rated critical severity (CVSS 10.0),
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
Buffer overflow in Zephyr RTOS dns_unpack_name() function causing OOB writes. PoC available.
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
Same weakness CWE-125 – Out-of-bounds Read
View allSame technique Buffer Overflow
View allShare
External POC / Exploit Code
Leaving vuln.today
EUVD-2026-51868