CVE-2022-2928
dhcp: option refcount overflow when leasequery is enabled leading to dhcpd abort
Severity
ModerateRed Hat Product Security
CVSS 3.1
Review impact separately from score.
Published · October 5, 2022
Updated · July 3, 2026
Description
An integer overflow vulnerability was found in the DHCP server. When the "option_code_hash_lookup()" function is called from "add_option()", it increases the option's "refcount" field. However, there is not a corresponding call to "option_dereference()" to decrement the "refcount" field. The "add_option()" function is only used in server responses to lease query packets. Each lease query response calls this function for several options. Hence, a DHCP server configured with "allow lease query," a remote machine with access to the server, can send lease queries for the same lease multiple times, leading to the "add_option()" function being called repeatedly. This issue could cause the reference counters to overflow and the server to abort or crash.
Statement
Vulnerable servers are network accessible to an attacker and configured to allow and process lease queries.
Internally, reference counters are integers and thus overflow at 2^31 references, so even at 1000 lease query responses per second, it would take more than three weeks to crash the server.
CVSS score applicability
The CVSS score(s) listed for this vulnerability do not reflect the associated product's status, and are included for informational purposes to better understand the severity of this vulnerability.
Mitigation
Possible workaround - Disable lease query on the server for DHCPv4 or restart the server periodically.
CVSS / CWE
CVSS 3.1 · 6.5CVSS:3.1/AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H
CWE-190 · Integer Overflow or Wraparound