CVE-2022-2928 An option refcount overflow exists in dhcpd
  • 05 Oct 2022
  • 2 Minutes to read
  • Contributors
  • Dark
    Light
  • PDF

CVE-2022-2928 An option refcount overflow exists in dhcpd

  • Dark
    Light
  • PDF

Article Summary

CVE: CVE-2022-2928

Document version: 2.0

Posting date: 5 October 2022

Program impacted: ISC DHCP

Versions affected:

ISC DHCP :

  • 4.1-ESV-R1 -> 4.1-ESV-R16-P1
  • 4.4.0 -> 4.4.3.

Other branches of ISC DHCP (i.e., releases in the 4.0.x series or lower and releases in the 4.3.x series) are beyond their End-of-Life (EOL) and are no longer supported by ISC. From code inspection, it is probable, all versions after the introduction of lease query in ISC DHCP 3.0 are affected.

Severity: Medium

Exploitable:

Vulnerable servers are those that are both network accessible to an attacker and configured to allow and process lease queries.

Description:

When the function "option_code_hash_lookup()" 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 function "add_option()" is only used in server responses to lease query packets. Each lease query response calls this function for several options, so eventually, the reference counters could overflow and cause the server to abort.

Impact:

With a DHCP server configured with "allow leasequery;", 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 repeatedly called. This could cause an option's "refcount" field to overflow and the server to abort. 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: 6.5

CVSS Vector: AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H

For more information on the Common Vulnerability Scoring System and to obtain your specific environmental score please visit: https://nvd.nist.gov/vuln-metrics/cvss/v3-calculator?vector=AV:A/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H&version=3.1

Workarounds:

Disable lease query on the server for DHCPv4 or restart the server periodically.

Active exploits:

We are not aware of any active exploits.

Solution:

Upgrade to the patched release most closely related to your current version of ISC DHCP. These can all be downloaded from https://www.isc.org/downloads.

  • 4.4.3-P1
  • 4.1-ESV-R16-P2

Acknowledgments:

ISC would like to thank VictorV of Cyber Kunlun Lab for discovering and reporting this issue.

Document revision history:

1.0 Early Notification, 28 September 2022
2.0 Public Disclosure, 5 October 2022

Do you still have questions? Questions regarding this advisory should go to security-officer@isc.org. To report a new issue, please encrypt your message using security-officer@isc.org's PGP key which can be found here: https://www.isc.org/pgpkey/. If you are unable to use encrypted email, you may also report new issues at: https://www.isc.org/reportbug/.

Note:

ISC patches only currently supported versions. When possible we indicate EOL versions affected. (For current information on which versions are actively supported, please see https://www.isc.org/download/.)

ISC Security Vulnerability Disclosure Policy:

Details of our current security advisory policy and practice can be found in the ISC Software Defect and Security Vulnerability Disclosure Policy at https://kb.isc.org/docs/aa-00861.

The Knowledgebase article https://kb.isc.org/docs/cve-2022-2928 is the complete and official security advisory document.

Legal Disclaimer:

Internet Systems Consortium (ISC) is providing this notice on an "AS IS" basis. No warranty or guarantee of any kind is expressed in this notice and none should be implied. ISC expressly excludes and disclaims any warranties regarding this notice or materials referred to in this notice, including, without limitation, any implied warranty of merchantability, fitness for a particular purpose, absence of hidden defects, or of non-infringement. Your use or reliance on this notice or materials referred to in this notice is at your own risk. ISC may change this notice at any time. A stand-alone copy or paraphrase of the text of this document that omits the document URL is an uncontrolled copy. Uncontrolled copies may lack important information, be out of date, or contain factual errors.