Description
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.
Published: 2026-08-01
Score: 5.4 Medium
EPSS: < 1% Very Low
KEV: No
Impact: n/a
Action: n/a
AI Analysis

Impact

The helper function net_dhcpv4_msg_type_name mistakenly uses sizeof(name) instead of ARRAY_SIZE(name), allowing indices up to the pointer array’s byte size (32 on 32‑bit, 64 on 64‑bit) to be accepted. A spoofed or malicious DHCP server can inject a MESSAGE TYPE option containing a value beyond 8, causing the function to read a pointer past the end of the eight‑element table. The out‑of‑bounds pointer is subsequently dereferenced in a %s log conversion, which triggers a crash of the DHCP client and can log the garbage address, potentially revealing adjacent memory contents. The fault is only exercised when the DHCPv4 logging module is compiled at DEBUG level (CONFIG_NET_DHCPV4_LOG_LEVEL_DBG), a setting that is not enabled by default but can be turned on for troubleshooting.

Affected Systems

Any device running the Zephyr operating system with the DHCPv4 client helper and debug logging enabled is vulnerable. No specific Zephyr release is identified, so all builds that include this code path and compile with CONFIG_NET_DHCPV4_LOG_LEVEL_DBG set to DEBUG are potentially affected.

Risk and Exploitability

The CVSS score of 5.4 indicates moderate severity. EPSS score is < 1%, and the vulnerability is not listed in CISA’s KEV catalog. An attacker who can send or spoof DHCP packets on the network segment where the Zephyr device obtains its address can trigger the out‑of‑bounds fault. The trigger requires the DHCP client to be active and debug logging turned on; however, the consequence is a client crash (DoS) and a possible accidental disclosure through log output. The exploitability is therefore limited to environments with debug logging enabled, but the impact remains significant for embedded and IoT deployments that rely on Zephyr’s DHCP client.

Generated by OpenCVE AI on August 4, 2026 at 22:14 UTC.

Remediation

No vendor fix or workaround currently provided.

OpenCVE Recommended Actions

  • Apply the Zephyr source code fix that replaces the sizeof check with ARRAY_SIZE (commit 73c8a7df4f00088fc04ee5ab71bcabf47fcd3db7).
  • Rebuild the image with CONFIG_NET_DHCPV4_LOG_LEVEL_DBG set to a lower level than DEBUG or disable DHCPv4 logging entirely, removing the code path that can read out‑of‑bounds.
  • Limit DHCP traffic to the device by restricting the network to trusted DHCP servers or using firewall rules to block unsolicited DHCP replies to the client interface.

Generated by OpenCVE AI on August 4, 2026 at 22:14 UTC.

Tracking

Sign in to view the affected projects.

Advisories

No advisories yet.

History

Mon, 03 Aug 2026 18:30:00 +0000

Type Values Removed Values Added
Metrics ssvc

{'options': {'Automatable': 'no', 'Exploitation': 'poc', 'Technical Impact': 'partial'}, 'version': '2.0.3'}


Sat, 01 Aug 2026 13:45:00 +0000

Type Values Removed Values Added
First Time appeared Zephyrproject
Zephyrproject zephyr
Vendors & Products Zephyrproject
Zephyrproject zephyr

Sat, 01 Aug 2026 12:45:00 +0000

Type Values Removed Values Added
Description 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.
Title Out-of-bounds read in DHCPv4 client message-type name lookup (net_dhcpv4_msg_type_name)
Weaknesses CWE-125
CWE-682
References
Metrics cvssV3_1

{'score': 5.4, 'vector': 'CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:L/I:N/A:L'}


Subscriptions

Zephyrproject Zephyr
cve-icon MITRE

Status: PUBLISHED

Assigner: zephyr

Published:

Updated: 2026-08-03T17:50:55.197Z

Reserved: 2026-06-03T15:44:06.548Z

Link: CVE-2026-10773

cve-icon Vulnrichment

Updated: 2026-08-03T17:50:49.507Z

cve-icon NVD

Status : Analyzed

Published: 2026-08-01T13:16:56.987

Modified: 2026-08-07T18:45:14.840

Link: CVE-2026-10773

cve-icon Redhat

No data.

cve-icon OpenCVE Enrichment

Updated: 2026-08-04T22:15:03Z

Weaknesses