GHSA-8hj5-p46x-5h28: DHCP client option walk drifts one byte per skipped option, reading past the received message and past the saved options buffer
GHSA ID |
|
|---|---|
CVE ID |
CVE‑2026‑102720 |
Severity |
Medium |
CWE |
|
Published |
2026‑11‑01 |
Last updated |
2026‑11‑01 |
Affected packages
| Package | Vulnerable versions | Patched versions |
|---|---|---|
NetX Duo |
>= 6.0, ⇐ 6.5.2.202603a |
6.5.2.202603b |
Description
Summary
The NetX Duo DHCP client walks DHCP options with a read pointer and a separate offset, but advances the offset one byte less than the pointer for every option it skips. A DHCP server, or any host on the link that answers a DISCOVER first, can send an OFFER or ACK that makes the client read up to about a kilobyte past the received message. The same walk runs over the saved options buffer when the application retrieves a user option, and there the out-of-bounds bytes are copied into the application’s buffer.
Details
_nx_dhcp_search_buffer() bounds its walk by the offset alone. In the skip branch the pointer advances size + 2 bytes per option (type, length and data) while the offset advances size + 1, so the offset falls one byte behind the read position for each skipped option. The smallest skippable option is two bytes, so in the worst case the pointer moves at twice the rate of the offset: over an option area of L bytes it can reach roughly 2L while the loop condition still holds. The read ends at the first 0xFF byte found past the end.
The match branch has a separate off-by-one. It rejects an option when i + size + 1 > length, but the option’s last byte is at index i + size + 1, so it accepts an option whose final byte lies one past the end, with no drift involved.
Two callers reach the walk:
-
_nx_dhcp_get_option_value(), while the client processes an OFFER or ACK. Up to four out-of-bounds bytes are taken as the subnet mask, gateway, server identifier or lease time and used to configure the interface. The gateway and server identifier become externally observable when the client sends ARP and DHCP traffic to them. -
The user-option retrieval API,
nx_dhcp_user_option_retrieve()andnx_dhcp_interface_user_option_retrieve(), which walksnx_dhcp_options_buffer, a 312-byte member of the interface record holding a verbatim copy of the server’s option area. On a match past its end, the out-of-bounds bytes are copied into the application’s destination buffer, bounded only by the application’s size argument. Past that buffer lienx_dhcp_options_size, the per-interface statistics counters and the next interface record, including its addresses and server identifier.
Impact
An attacker on the local link causes the client to read memory adjacent to the received packet or to the interface record. On the packet path the bytes populate fields the attacker could set directly, so no integrity capability is gained, and only a few bytes at a time become observable through the gateway and server identifier. The user-option path is the stronger disclosure: it hands adjacent control-block memory to the application, which may log or transmit it. On a target with memory protection, a read that crosses into unmapped memory faults the DHCP client thread. The packet path runs before the interface is configured, so it is reachable on every boot within reach of a hostile responder.
Affected configurations
Applications that use the NetX Duo DHCP client. The user-option path additionally requires the application to call the user-option retrieval API after the client binds.
Affected versions: [6.0, 6.5.2.202603a]. The walk has been unchanged since the first release.
Severity
CVSS:4.0/AV:A/AC:L/AT:N/PR:N/UI:N/VC:L/VI:N/VA:L/SC:N/SI:N/SA:N, CVSS-B 5.3 (Medium). CWE-125: Out-of-bounds Read; CWE-193: Off-by-one Error.
VI:N because, although the client configures its interface from out-of-bounds bytes, the attacker already controls those fields in the packet. VC:L rather than VC:H because the memory read is adjacent rather than chosen by the attacker. VA:L for the fault risk on targets with memory protection.
Patches
Fixed in NetX Duo 6.5.2.202603b. _nx_dhcp_search_buffer() now tracks the bytes remaining from its read pointer and examines an option only when its code and length bytes and all of its data lie within them; the END option, or an option that does not fit, ends the search. This closes the drift and the match-branch off-by-one for both callers, and well-formed option areas are parsed as before. A new regression test fails when either part is reverted.