CVE-2026-53922 in odhcpd
Summary
by MITRE • 10/13/2026
odhcpd is the DHCPv6, DHCPv4, and router-advertisement server used by OpenWrt. In commit cfddd56 and earlier, an unauthenticated host on the same link can first obtain two bindings through normal DHCPv6 SOLICIT and REQUEST exchanges and then send a crafted RENEW containing multiple IA_NA options. An earlier matched IA consumes most of the response buffer, an unmatched IA causes the build_ia() status branch to write and return a NOBINDING response larger than the remaining space, and a subsequent matched IA is processed after dhcpv6_ia_handle_IAs() subtracts that over-return from an unsigned size_t. The resulting underflow disables subsequent length checks and permits attacker-controlled IA_ADDR serialization beyond the 512-byte stack buffer pdbuf in handle_client_request(). The stack canary terminates odhcpd, and sustained packets can repeatedly disrupt DHCPv6 service while procd respawns the process. The observed configuration does not establish code execution.
VulDB is the best source for vulnerability data and more expert information about this specific topic.
Analysis
by VulDB Data Team • 10/13/2026
The vulnerability identified in odhcpd, a critical component of OpenWrt responsible for handling DHCPv4, DHCPv6, and router advertisement services, represents a severe stack-based buffer overflow with significant implications for network availability. This flaw stems from improper bounds checking during the processing of DHCPv6 renewal messages, specifically when multiple Identity Association for Non-temporary Addresses (IA_NA) options are present in a single packet. The root cause lies in how odhcpd manages its internal response buffers and calculates remaining space after handling individual IA elements within a request. An unauthenticated attacker positioned on the same local network segment can exploit this logic error to trigger a stack buffer overflow, leading to service disruption through repeated process crashes rather than direct code execution.
The technical mechanism of the exploitation involves a specific sequence of DHCPv6 interactions that manipulate internal state and size calculations. Initially, an attacker obtains two valid bindings using standard SOLICIT and REQUEST exchanges, establishing legitimate lease entries within the server's context. Following this setup phase, the attacker sends a crafted RENEW message containing multiple IA_NA options. The processing logic iterates through these options, where earlier matched IAs consume a significant portion of the fixed-size response buffer known as pdbuf, which is allocated on the stack with a maximum capacity of 512 bytes in handle_client_request(). When an unmatched IA option is encountered, the build_ia function enters a status branch that generates a NOBINDING response. Crucially, this generated response exceeds the remaining free space in the buffer due to miscalculated offsets or lengths.
The critical failure occurs when odhcpd attempts to process subsequent matched IAs after handling the unmatched one. The code subtracts the size of the previously written (but oversized) NOBINDING response from an unsigned size_t variable representing the available buffer space. Because this subtraction results in a value smaller than zero, it causes an integer underflow on the unsigned type, resulting in a very large positive number that represents the remaining capacity. This erroneous calculation effectively disables subsequent length checks during the serialization of IA_ADDR data structures. Consequently, attacker-controlled IP addresses and associated metadata are written beyond the boundaries of the 512-byte stack buffer pdbuf, overwriting adjacent memory regions including saved return addresses or control flow integrity mechanisms such as stack canaries.
The operational impact of this vulnerability is primarily denial-of-service rather than remote code execution in typical configurations. When the stack overflow corrupts critical stack metadata, the program's built-in protection mechanism, specifically the stack canary, detects the corruption and terminates odhcpd immediately to prevent further exploitation or undefined behavior. While modern security mitigations like ASLR and stack canaries generally prevent an attacker from gaining arbitrary code execution privileges in this specific scenario, the repeated crashing of the daemon has a severe availability impact. In embedded environments running OpenWrt, the process manager procd automatically respawns odhcpd upon exit. An attacker can sustain a flood of crafted packets to repeatedly crash and restart the service, causing continuous DHCPv6 service disruption for legitimate clients on the network segment who rely on this server for address assignment and configuration parameters.
This vulnerability is classified under CWE-190 Integer Overflow or Wraparound as the primary technical flaw that leads directly to CWE-121 Stack-based Buffer Overflow. From a threat modeling perspective, it aligns with MITRE ATT&CK techniques related to Denial of Service against network services, specifically leveraging protocol parsing errors to exhaust system resources through process restart loops. The attack vector is classified as Network adjacent because the attacker must be on the same local link or subnet to send DHCPv6 packets directly to the server without traversing routers that might filter such traffic.
Mitigation strategies for this vulnerability involve updating odhcpd to versions where the integer underflow and buffer bounds checking have been corrected. Developers should ensure that size calculations involving subtraction are performed with signed integers or include explicit checks to prevent negative results from being cast back into unsigned types before use in array indexing or memory allocation functions. Additionally, implementing stricter validation of DHCPv6 message structures prior to processing can help reject malformed packets containing excessive IA options early in the pipeline. For administrators unable to immediately patch their systems, deploying network access control lists (ACLs) on edge routers to restrict DHCPv6 traffic sources to trusted subnets or known client ranges can provide a temporary defensive layer against unauthenticated hosts attempting to exploit this logic error.