__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Center ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN FreeBSD tcpdump Remote Buffer Overflow Vulnerability [FreeBSD Security Advisory 01:48] July 23, 2001 22:00 GMT Number L-122 ______________________________________________________________________________ PROBLEM: A remote buffer overflow exists in tcpdump. PLATFORM: All releases of FreeBSD 4.x prior to 4.4 DAMAGE: Due to incorrect string length handling in the decoding of AFS RPC packets, a remote user may be able to overflow a buffer causing the local tcpdump process to crash. In addition, it may be possible to execute arbitrary code with the privileges of the user running tcpdump, that is often root. SOLUTION: Upgrade your FreeBSD system to 4.3-STABLE or apply the appropriate patch for your release as prescribed by FreeBSD. ______________________________________________________________________________ VULNERABILITY The risk is HIGH. The tcpdump runs as root, therefore having ASSESSMENT: the potential to give an unauthorized person remote root access. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/l-122.shtml ORIGINAL BULLETIN: ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/advisories/FreeBSD-SA-01%3A48.tcpdump.asc ______________________________________________________________________________ [***** Start FreeBSD Security Advisory 01:48 *****] FreeBSD-SA-01:48 Security Advisory FreeBSD, Inc. Topic: tcpdump contains remote buffer overflow Category: core Module: tcpdump Announced: 2001-07-17 Credits: Nick Cleaton Affects: All releases of FreeBSD 4.x prior to 4.4, FreeBSD 4.3-STABLE prior to the correction date FreeBSD 3.x is unaffected. Corrected: 2001-07-09 Vendor status: Patch released FreeBSD only: NO I. Background tcpdump is a tool for monitoring network traffic activity. II. Problem Description An overflowable buffer was found in the version of tcpdump included with FreeBSD 4.x. Due to incorrect string length handling in the decoding of AFS RPC packets, a remote user may be able to overflow a buffer causing the local tcpdump process to crash. In addition, it may be possible to execute arbitrary code with the privileges of the user running tcpdump, often root. The effects of this vulnerability are similiar to those described in advisory FreeBSD-SA-00:61.tcpdump.v1.1. All released versions of FreeBSD prior to the correction date including 4.3-RELEASE are vulnerable to this problem, however it does not affect the FreeBSD 3.x branch which includes an older version of tcpdump. III. Impact Remote users can cause the local tcpdump process to crash, and may be able to cause arbitrary code to be executed as the user running tcpdump, often root. IV. Workaround Do not use vulnerable versions of tcpdump in network environments which may contain packets from untrusted sources. V. Solution One of the following: 1) Upgrade your vulnerable FreeBSD system to 4.3-STABLE or the RELENG_4_3 security branch after the respective correction dates. 2) FreeBSD 4.x systems prior to the correction date: Download the patch and the detached PGP signature from the following locations, and verify the signature using your PGP utility. ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:48/tcpdump-4.x.patch ftp://ftp.freebsd.org/pub/FreeBSD/CERT/patches/SA-01:48/tcpdump-4.x.patch.asc # cd /usr/src/contrib/tcpdump # patch -p < /path/to/patch # cd /usr/src/usr.sbin/tcpdump # make depend && make all install 3) FreeBSD 4.3-RELEASE systems: An experimental upgrade package is available for users who wish to provide testing and feedback on the binary upgrade process. This package may be installed on FreeBSD 4.3-RELEASE systems only, and is intended for use on systems for which source patching is not practical or convenient. If you use the upgrade package, feedback (positive or negative) is requested to security-officer@FreeBSD.org so we can improve the process for future advisories. During the installation procedure, backup copies are made of the files which are replaced by the package. These backup copies will be reinstalled if the package is removed, reverting the system to a pre-patched state. Two versions of the upgrade package are available, depending on whether or not the system has openssl installed. To verify whether your system has openssl installed, perform the following command: # ls /usr/bin/openssl Possible responses: /usr/bin/openssl # This response indicates you have openssl present ls: /usr/bin/openssl: No such file or directory # This reponse indicates you do not have # openssl present 3a) If OpenSSL is not present # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:48/security-patch-tcpdump-nossl-01.48.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:48/security-patch-tcpdump-nossl-01.48.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-tcpdump-nossl-01.48.tgz 3b) If OpenSSL is present # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:48/security-patch-tcpdump-ssl-01.48.tgz # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/packages/SA-01:48/security-patch-tcpdump-ssl-01.48.tgz.asc Verify the detached PGP signature using your PGP utility. # pkg_add security-patch-tcpdump-ssl-01.48.tgz [***** End FreeBSD Security Advisory 01:48 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of FreeBSD for the information contained in this bulletin. _______________________________________________________________________________ CIAC, the Computer Incident Advisory Center, 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) L-112: Cisco SN 5420 Storage Router Vulnerabilities L-113: Microsoft Outlook View Control Exposes Unsafe Functionality L-114: Hewlett-Packard login Vulnerability L-115: Hewlett-Packard dlkm Vulnerability L-116: Lightweight Directory Access Protocol (LDAP) Vulnerabilities L-117: The Code Red Worm L-118: Hewlett-Packard ftpd and ftp Vulnerability L-119: Hewlett-Packard mkacct Program Vulnerability L-120: Cisco "Code Red" Worm Impact L-121: SSH Secure Shell Remote Root Exploit Vulnerability