__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN FreeBSD inetd ident Server Vulnerability February 1, 2001 17:00 GMT Number L-038 ______________________________________________________________________________ PROBLEM: During internal auditing, the internal ident server in identd was found to incorrectly set group privileges according to the user. Due to ident using root's group permissions, users may read the first 16 (excluding initial whitespace) bytes of wheel-accessible files. PLATFORM: FreeBSD 3.x (all releases) and FressBSD 4.x (all releases). DAMAGE: Users could read the first 16 bytes of wheel-accessible files. SOLUTION: Upgrade the vulnerable FreeBSD system to 3.5-STABLE or 4.2-STABLE after the correction date or patch your present system. Refer to section V. of this bulletin for additional information. ______________________________________________________________________________ VULNERABILITY The risk is LOW. Users can read the first 16 bytes of ASSESSMENT: wheel-accessible files only if the inetd internal ident server is enabled. ______________________________________________________________________________ [****** Start FreeBSD Advisory ******] ============================================================================= FreeBSD-SA-01:11 Security Advisory FreeBSD, Inc. Topic: inetd ident server allows remote users to partially read arbitrary wheel-accessible files [REVISED] Category: core Module: inetd Announced: 2001-01-29 Revised: 2001-01-29 Credits: dynamo Affects: FreeBSD 3.x (all releases) FreeBSD 4.x (all releases) Corrected: 2000-11-25 (FreeBSD 4.2-STABLE) 2001-01-26 (FreeBSD 3.5-STABLE) FreeBSD only: Yes 0. Revision History v1.0 2001-01-29 Initial release v1.1 2001-01-29 Correctly credit original problem reporter I. Background The inetd ident server is an implementation of the RFC1413 identification server which returns the local username of the user connecting to a remote service. II. Problem Description During internal auditing, the internal ident server in inetd was found to incorrectly set group privileges according to the user. Due to ident using root's group permissions, users may read the first 16 (excluding initial whitespace) bytes of wheel-accessible files. All released versions of FreeBSD prior to the correction date including FreeBSD 3.5.1 and FreeBSD 4.2 are vulnerable. III. Impact Users can read the first 16 bytes of wheel-accessible files. To determine which may be potentially read, execute the following command as root: # find / -group wheel \( -perm -40 -a \! -perm +4 \) -ls The inetd internal ident server is not enabled by default. If you have not enabled the ident portion of inetd, you are not vulnerable. IV. Workaround Disable the internal ident server, if enabled: comment out all lines beginning with "auth" in /etc/inetd.conf, then restart inetd by sending it a SIGHUP: # killall -HUP inetd V. Solution One of the following: Upgrade the vulnerable FreeBSD system to 3.5-STABLE or 4.2-STABLE after the correction date. To patch your present system: download the relevant patch from the below location, and execute the following commands as root: [FreeBSD 4.2 base system] # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:11/inetd- 4.2.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:11/inetd- 4.2.patch.asc Verify the detached PGP signature using your PGP utility. # cd /usr/src/usr.sbin/inetd # patch -p < /path/to/patch # make depend && make all install # killall -HUP inetd [FreeBSD 3.5.1 base system] # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:11/inetd- 3.5.1.patch # fetch ftp://ftp.FreeBSD.org/pub/FreeBSD/CERT/patches/SA-01:11/inetd- 3.5.1.patch.asc Verify the detached PGP signature using your PGP utility. # cd /usr/src/usr.sbin/inetd # patch -p < /path/to/patch # make depend && make all install # killall -HUP inetd [****** End FreeBSD Advisory ******] ______________________________________________________________________________ CIAC wishes to acknowledge the contributions of FreeBSD 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@llnl.gov Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://www.ciac.org/ (or http://ciac.llnl.gov -- they're the same machine) Anonymous FTP: ftp.ciac.org (or ciac.llnl.gov -- they're the same machine) 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-028: Solaris arp(setgid) Vulnerability L-029: FreeBSD "ipfw/ip6fw" Vulnerability L-030: Four Vulnerabilities in ISC Bind L-031: Sun AnswerBook2 Vulnerability L-032: Class Loading Vulnerability in Sun Java (TM) Runtime Environment L-033: Sun Java Web Server Vulnerability L-034: HP Security Vulnerability in man(1) Command L-035: HP-UX Support Tools Manager Vulnerability L-036: FreeBSD procfs Vulnerabilities L-037: FreeBSD periodic Uses Insecure Temporary Files