__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN Multiple Vulnerabilities in ISC DHCP 3 [US-CERT Technical Cyber Security Alert TA04-174A] July 13, 2004 19:00 GMT Number O-177 ______________________________________________________________________________ PROBLEM: Two vulnerabilities exist in the Internet Systems Consortium's (ISC) Dynamic Host Configuration Protocol (DHCP) 3. For both of the vulnerabilities, only ISC DHCP 3.0.1rc12 and ISC DHCP 3.0.1rc13 are believed to be vulnerable. PLATFORM: CAN-2004-0460 is exploitable for all operating systems and configurations. CAN-2004-0461 is only defined for the following operating systems: AIX, AlphaOS, Cygwin32, HP-UX, Irix, Linux, NextStep, SCO, SunOS 4, SunOS 5.5, Ultrix. DAMAGE: Exploitation of these vulnerabilities may cause a denial-of-service condition to the DHCP daemon (DHCPD) and may permit a remote attacker to execute arbitrary code on the system with the privileges of the DHCPD process, typically root. SOLUTION: Apply the security update. ______________________________________________________________________________ VULNERABILITY The risk is MEDIUM. Vulnerabilities may potentially lead to ASSESSMENT: denial of service and/or remote execution of code with root privileges. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/o-177.shtml ORIGINAL BULLETIN: http://www.us-cert.gov/cas/techalerts/TA04-174A.html CVE/CAN: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name= CAN-2004-0460, 2004-0461 ______________________________________________________________________________ [***** Start US-CERT Technical Cyber Security Alert TA04-174A *****] Multiple Vulnerabilities in ISC DHCP 3 Original release date: June 22, 2004 Last revised: -- Source: US-CERT Systems Affected * ISC DHCP versions 3.0.1rc12 and 3.0.1rc13 Overview Two vulnerabilities in the ISC DHCP allow a remote attacker to cause a denial of the DHCP service on a vulnerable system. It may be possible to exploit these vulnerabilities to execute arbitrary code on the system. I. Description As described in RFC 2131, "the Dynamic Host Configuration Protocol (DHCP) provides a framework for passing configuration information to hosts on a TCP/IP network." The Internet Systems Consortium's (ISC) Dynamic Host Configuration Protocol (DHCP) 3 application contains two vulnerabilities that present several potential buffer overflow conditions. VU#317350 discusses a buffer overflow vulnerability in the temporary storage of log lines. In transactions, ISC DHCPD logs every DHCP packet along with several pieces of descriptive information. The client's DISCOVER and the resulting OFFER, REQUEST, ACK, and NAKs are all logged. In all of these messages, if the client supplied a hostname, then it is also included in the logged line. As part of the DHCP datagram format, a client may specify multiple hostname options, up to 255 bytes per option. These options are concatenated by the server. If the hostname and options contain only ASCII characters, then the string will pass non-ASCII character filters and be temporarily stored in 1024 byte fixed-length buffers on the stack. If a client supplies enough hostname options, it is possible to overflow the fixed-length buffer. VU#654390 discusses C include files for systems that do not support the bounds checking vsnprintf() function. These files define the bounds checking vsnprintf() to the non-bounds checking vsprintf() function. Since vsprintf() is a function that does not check bounds, the size is discarded, creating the potential for a buffer overflow when client data is supplied. Note that the vsnprintf() statements are defined after the vulnerable code that is discussed in VU#317350. Since the preconditions for this vulnerability are similar to those required to exploit VU#317350, these buffer overflow conditions occur sequentially in the code after the buffer overflow vulnerability discussed in VU#317350, and these issues were discovered and resolved at the same time, there is no known exploit path to exploit these buffer overflow conditions caused by VU#654390. Note that VU#654390 was discovered and exploitable once VU#317350 was resolved. For both of the vulnerabilities, only ISC DHCP 3.0.1rc12 and ISC DHCP 3.0.1rc13 are believed to be vulnerable. VU#317350 is exploitable for all operating systems and configurations. VU#654390 is only defined for the following operating systems: * AIX * AlphaOS * Cygwin32 * HP-UX * Irix * Linux * NextStep * SCO * SunOS 4 * SunOS 5.5 * Ultrix All versions of ISC DCHP 3, including all snapshots, betas, and release candidates, contain the flawed code. However, versions other than ISC DHCP 3.0.1rc12 and ISC DHCP 3.0.1rc13 discard all but the last hostname option provided by the client, so it is not believed that these versions are exploitable. US-CERT is tracking these issues as VU#317350, which has been assigned CVE CAN-2004-0460, and VU#654390, which has been assigned CVE CAN-2004-0461. II. Impact Exploitation of these vulnerabilities may cause a denial-of-service condition to the DHCP daemon (DHCPD) and may permit a remote attacker to execute arbitrary code on the system with the privileges of the DHCPD process, typically root. III. Solution Apply patches or upgrade These issues have been resolved in ISC DHCP 3.0.1rc14. Your vendor may provide specific patches or updates. For vendor-specific information, please see your vendor's site, or look for your vendor infomation in VU#317350 and VU#654390. As vendors report new information to US-CERT, we will update the vulnerability notes. Appendix B. References * http://www.isc.org/sw/dhcp/ * http://www.kb.cert.org/vuls/id/317350 * http://www.kb.cert.org/vuls/id/654390 US-CERT thanks Gregory Duchemin and Solar Designer for discovering, reporting, and resolving this vulnerability. Thanks also to David Hankins of ISC for notifying us of this vulnerability and the technical information provided to create this document. Feedback can be directed to the author: Jason A. Rafail Copyright 2004 Carnegie Mellon University. Terms of use Revision History June 22, 2004: Initial release [***** End US-CERT Technical Cyber Security Alert TA04-174A *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of US-CERT for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Capability, is the computer security incident response team for the U.S. Department of Energy (DOE) and the emergency backup response team for the National Institutes of Health (NIH). CIAC is located at the Lawrence Livermore National Laboratory in Livermore, California. CIAC is also a founding member of FIRST, the Forum of Incident Response and Security Teams, a global organization established to foster cooperation and coordination among computer security teams worldwide. CIAC services are available to DOE, DOE contractors, and the NIH. CIAC can be contacted at: Voice: +1 925-422-8193 (7x24) FAX: +1 925-423-8002 STU-III: +1 925-423-2604 E-mail: ciac@ciac.org Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ Anonymous FTP: ftp.ciac.org PLEASE NOTE: Many users outside of the DOE, ESnet, and NIH computing communities receive CIAC bulletins. If you are not part of these communities, please contact your agency's response team to report incidents. Your agency's team will coordinate with CIAC. The Forum of Incident Response and Security Teams (FIRST) is a world-wide organization. A list of FIRST member organizations and their constituencies can be obtained via WWW at http://www.first.org/. This document was prepared as an account of work sponsored by an agency of the United States Government. Neither the United States Government nor the University of California nor any of their employees, makes any warranty, express or implied, or assumes any legal liability or responsibility for the accuracy, completeness, or usefulness of any information, apparatus, product, or process disclosed, or represents that its use would not infringe privately owned rights. Reference herein to any specific commercial products, process, or service by trade name, trademark, manufacturer, or otherwise, does not necessarily constitute or imply its endorsement, recommendation or favoring by the United States Government or the University of California. The views and opinions of authors expressed herein do not necessarily state or reflect those of the United States Government or the University of California, and shall not be used for advertising or product endorsement purposes. LAST 10 CIAC BULLETINS ISSUED (Previous bulletins available from CIAC) O-167: SGI - System Call SGI_IOPROBE Vulnerability O-168: Squid - NTLM Authentication Buffer Overflow Vulnerability O-169: Apache Buffer Overflow Vulnerability O-170: HP-UX Netscape Vulnerabilities O-171: Hewlett Packard OpenSSL Potential Vulnerabilities O-172: Sun Solaris 9 Patches O-173: Debian Webmin Vulnerabilities O-174: Ethereal Multiple Problems in 0.10.4 O-175: 'shell:' Protocol Security Issue O-176: Adobe Acrobat and Adobe Reader Filename Handler Buffer Overflow