__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN IBM AIX(r) Security Vulnerabilities (gethostbyname, lquerypv) December 10, 1996 23:00 GMT Number H-13 ______________________________________________________________________________ PROBLEM: Two problems have been identified in IBM AIX: (1) Possible buffer overrun condition in "gethostbyname()" library function, and (2) the "lquerypv" command does not correctly enforce file access permissions. PLATFORM: (1) IBM AIX 3.2.x, 4.1.x, 4.2.x, (2) IBM AIX 4.1, 4.2 DAMAGE: (1) If exploited, this condition may permit unauthorized super-user access to the system. (2) Users who know how to exploit this vulnerability may be able to read files they would not normally have access to. SOLUTION: Apply the fixes described below. ______________________________________________________________________________ VULNERABILITY Instructions on how to exploit these vulnerabilities have been ASSESSMENT: published on the Internet. ______________________________________________________________________________ [ Start IBM-ERS Bulletins ] 1. Vulnerability in gethostbyname() library function =============================================================================== ======= ============ ====== ====== ======= ============== ======= ======= === === ==== ====== ====== === =========== ======= ======= === =========== === ======= === === === ==== === ===== === ======= ============== ===== === ===== ======= ============ ===== = ===== EMERGENCY RESPONSE SERVICE SECURITY VULNERABILITY ALERT 03 December 1996 18:30 GMT Number: ERS-SVA-E01-1996:007.1 =============================================================================== VULNERABILITY SUMMARY VULNERABILITY: Possible buffer overrun condition in "gethostbyname()" library function PLATFORMS: IBM AIX(r) 3.2.x, 4.1.x, 4.2.x SOLUTION: Apply the fixes described below THREAT: If exploited, this condition may permit unauthorized super-user access to the system =============================================================================== DETAILED INFORMATION I. Description In TCP/IP networks such as the Internet and many corporate networks, hosts are identified by 32-bit numbers called addresses. However, because these numbers are difficult to remember, names are also given to hosts. Although people use the names to refer to the hosts, computer software must translate these names into the numeric addresses in order to use them. The Domain Name System (DNS), also called "the name server," is the primary database used to perform these name-to-address (and address-to-name) translations. Other databases, such as the Network Information System (NIS, formerly called Yellow Pages) and the "hosts file" are also used on some systems. When a program on a UNIX system wants to look up a host's name and obtain its network address, it uses a library function called "gethostbyname()." This function takes a host name as a parameter, contacts the Domain Name System (or another source of information), and returns the host's address(es) to the program. This saves the programmer the trouble of writing the complex code to interface with the name server. Under certain conditions, the "gethostbyname()" library function provided with IBM AIX versions 3.2.x, 4.1.x, and 4.2.x can encounter a buffer overrun that allows information on the program stack to be corrupted. II. Impact Many set-user-id and set-group-id programs, as well as many network programs running with super-user privileges, make use of the "gethostbyname()" library function. Corrupting the program stack of these programs may allow arbitrary user-provided code to be executed inadvertently. If successfully exploited, this buffer overrun condition could be used to gain super-user access to the system. Such an action could be initiated over the network from a remote system, or by a user on the local system. Penetration through a firewall may also be possible, depending on which services and applications are permitted by the firewall system. A script that exploits a similar buffer overrun condition in the Sun Solaris 2.x version of "gethostbyname()" was publicly released in November, 1996. Sun Microsystems announced fixes for that condition in Security Bulletin 137, which was released on 20 Nov 96. As of this writing, IBM-ERS is not aware of any similar exploitation script for the AIX operating system, nor are we aware of any successful exploitations of this condition (against either AIX systems or Solaris systems). III. Solutions The following Automated Program Analysis Reports (APARs) for IBM AIX are now available to address the concerns described above: AIX 3.2.x --------- APAR - IX60927 (PTF - U443452,U444191,U444206,U444213,U444233,U444244) To determine if you have this PTF on your system, run the following command: lslpp -lB U443452 U444191 U444206 U444213 U444233 U444244 AIX 4.1.x --------- APAR - IX61019 To determine if you have this APAR on your system, run the following command: instfix -ik IX61019 AIX 4.2.x --------- APAR - IX62144 To determine if you have this APAR on your system, run the following command: instfix -ik IX62144 IBM AIX APARs may be ordered using Electronic Fix Distribution (via the FixDist program), or from the IBM Support Center. For more information on FixDist, and to obtain fixes via the Internet, please reference http://service.software.ibm.com/aixsupport/ or send electronic mail to "aixserv@austin.ibm.com" with the word "FixDist" in the "Subject:" line. IV. Acknowledgements IBM-ERS would like to thank the CERT Coordination Center (CERT/CC), AUSCERT, Sun Microsystems, and Marko Laakso (University of Oulu) for providing some of the information in this advisory. AIX is a registered trademark of International Business Machines Corporation. =============================================================================== 2. Vulnerability in "lquerypv" command =============================================================================== ======= ============ ====== ====== ======= ============== ======= ======= === === ==== ====== ====== === =========== ======= ======= === =========== === ======= === === === ==== === ===== === ======= ============== ===== === ===== ======= ============ ===== = ===== EMERGENCY RESPONSE SERVICE SECURITY VULNERABILITY ALERT 03 December 1996 18:30 GMT Number: ERS-SVA-E01-1996:008.1 =============================================================================== VULNERABILITY SUMMARY VULNERABILITY: The "lquerypv" command does not correctly enforce file access permissions. PLATFORMS: IBM AIX(r) 4.1, 4.2 SOLUTION: Apply the fix described below. THREAT: Users who know how to exploit this vulnerability may be able to read files they would not normally have access to. =============================================================================== DETAILED INFORMATION I. Description The "lquerypv" command is an undocumented, low-level worker program that is a part of the AIX Logical Volume Manager family of commands. When installed, the "lquerypv" command is set-user-id "root", which allows it to run with super-user access permissions. When invoked with the "-h" option, "lquerypv" does not adequately enforce the read permissions on files when it is run by regular (non-"root") users. This can allow users to obtain access to the contents of files that they are not authorized to read. Instructions for exploiting this vulnerability were made available on USENET newsgroups and Internet mailing lists in November, 1996. II. Impact Allowing users to obtain unauthorized access to file contents can reveal such confidential information as encrypted passwords, electronic mail, and other data. III. Solutions A. How to alleviate the problem This problem can be alleviated by removing the set-user-id bit from the "lquerypv" program. To do this, execute the following command as "root": chmod u-s /usr/sbin/lquerypv Note that this action will cause some Logical Volume Manager commands to fail when they are executed by non-"root" users (such as "lsps"). It will not affect the operation of these commands when they are executed by "root". B. Official fix The following Automated Program Analysis Reports (APARs) for IBM AIX are now available to address this problem: AIX 3.2.x --------- Not vulnerable; no fix necessary. AIX 4.1.x --------- APAR - IX64203 To determine if you have this APAR on your system, run the following command: instfix -ik IX64203 Or, run this command: lslpp -h bos.rte.lvm and verify that your version of bos.rte.lvm is 4.1.5.3 or later. AIX 4.2.x --------- APAR - IX64204 To determine if you have this APAR on your system, run the following command: instfix -ik IX64204 Or, run this command: lslpp -h bos.rte.lvm and verify that your version of bos.rte.lvm is 4.2.0.7 or later. IBM AIX APARs may be ordered using Electronic Fix Distribution (via the FixDist program), or from the IBM Support Center. For more information on FixDist, and to obtain fixes via the Internet, please reference http://service.software.ibm.com/aixsupport/ or send electronic mail to "aixserv@austin.ibm.com" with the word "FixDist" in the "Subject:" line. V. Acknowledgements IBM-ERS would like to thank Andrew Pechenov for bringing this vulnerability to our attention. AIX is a registered trademark of International Business Machines Corporation. =============================================================================== [ End IBM-ERS Bulletins ] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of IBM-ERS 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 510-422-8193 FAX: +1 510-423-8002 STU-III: +1 510-423-2604 E-mail: ciac@llnl.gov For emergencies and off-hour assistance, DOE, DOE contractor sites, and the NIH may contact CIAC 24-hours a day. During off hours (5PM - 8AM PST), call the CIAC voice number 510-422-8193 and leave a message, or call 800-759-7243 (800-SKY-PAGE) to send a Sky Page. CIAC has two Sky Page PIN numbers, the primary PIN number, 8550070, is for the CIAC duty person, and the secondary PIN number, 8550074 is for the CIAC Project Leader. Previous CIAC notices, anti-virus software, and other information are available from the CIAC Computer Security Archive. World Wide Web: http://ciac.llnl.gov/ Anonymous FTP: ciac.llnl.gov (128.115.19.53) Modem access: +1 (510) 423-4753 (28.8K baud) +1 (510) 423-3331 (28.8K baud) CIAC has several self-subscribing mailing lists for electronic publications: 1. CIAC-BULLETIN for Advisories, highest priority - time critical information and Bulletins, important computer security information; 2. CIAC-NOTES for Notes, a collection of computer security articles; 3. SPI-ANNOUNCE for official news about Security Profile Inspector (SPI) software updates, new features, distribution and availability; 4. SPI-NOTES, for discussion of problems and solutions regarding the use of SPI products. Our mailing lists are managed by a public domain software package called ListProcessor, which ignores E-mail header subject lines. To subscribe (add yourself) to one of our mailing lists, send the following request as the E-mail message body, substituting CIAC-BULLETIN, CIAC-NOTES, SPI-ANNOUNCE or SPI-NOTES for list-name and valid information for LastName FirstName and PhoneNumber when sending E-mail to ciac-listproc@llnl.gov: subscribe list-name LastName, FirstName PhoneNumber e.g., subscribe ciac-notes OHara, Scarlett W. 404-555-1212 x36 You will receive an acknowledgment containing address, initial PIN, and information on how to change either of them, cancel your subscription, or get help. 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) H-02: SUN's TCP SYN Flooding Solutions H-03: HP-UX_suid_Vulnerabilities H-04: HP-UX Ping Vulnerability H-05: Internet Hoaxes H-07: Sendmail SIGHUP-smtpd Vulnerability H-08: lpr Buffer Overrun Vulnerability H-09: HP 9000 Access Vulnerability H-10: HP-UX Security Vulnerabilities (passwd, fpkg2swpkg, newgrp) H-11: sendmail Group Permissions Vulnerability H-12: IBM AIX(r) 'SYN Flood' and 'Ping o' Death' Vulnerabilities RECENT CIAC NOTES ISSUED (Previous Notes available from CIAC) Notes 07 - 3/29/95 A comprehensive review of SATAN Notes 08 - 4/4/95 A Courtney update Notes 09 - 4/24/95 More on the "Good Times" virus urban legend Notes 10 - 6/16/95 PKZ300B Trojan, Logdaemon/FreeBSD, vulnerability in S/Key, EBOLA Virus Hoax, and Caibua Virus Notes 11 - 7/31/95 Virus Update, Hats Off to Administrators, America On-Line Virus Scare, SPI 3.2.2 Released, The Die_Hard Virus Notes 12 - 9/12/95 Securely configuring Public Telnet Services, X Windows, beta release of Merlin, Microsoft Word Macro Viruses, Allegations of Inappropriate Data Collection in Win95 Notes 96-01 - 3/18/96 Java and JavaScript Vulnerabilities, FIRST Conference Announcement, Security and Web Search Engines, Microsoft Word Macro Virus Update