__________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN AIX Diag script Vulnerability [MSS-OAR-E01-2004:2061.1] December 21, 2004 20:00 GMT Number P-078 ______________________________________________________________________________ PROBLEM: An untrusted path vulnerability exists in the diag script. The diag script is used to perform various diagnostic functions. PLATFORM: AIX 5.1, 5.2 and 5.3 DAMAGE: An untrusted path vulnerability in the diag script allows local users to execute arbitrary code if invoked via a suid root application. SOLUTION: Apply the available updates or workaround. ______________________________________________________________________________ VULNERABILITY The risk is MEDIUM. A local user can execute arbitrary code ASSESSMENT: with root privileges. Exploits for this vulnerability are publicly available. ______________________________________________________________________________ LINKS: CIAC BULLETIN: http://www.ciac.org/ciac/bulletins/p-078.shtml ORIGINAL BULLETIN: http://www-1.ibm.com/services/continuity/recover1.nsf/mss/ MSS-OAR-E01-2004.2061.1 ______________________________________________________________________________ [***** Start MSS-OAR-E01-2004:2061.1 *****] IBM SECURITY ADVISORY First Issued: Mon Dec 20 10:44:36 CST 2004 =========================================================================== VULNERABILITY SUMMARY VULNERABILITY: An untrusted path vulnerability in the diag script allows local users to execute arbitrary code if invoked via a suid root application. PLATFORMS: AIX 5.1, 5.2 and 5.3. SOLUTION: Apply the workaround or APARs as described below. THREAT: A local user can execute arbitrary code with root privileges. CERT VU Number: N/A CVE Number: N/A =========================================================================== DETAILED INFORMATION I. Description =============== A vulnerability was discovered in the diag script that may allow any user to execute arbitrary code with root privileges. The diag script is used to perform various diagnostic functions. Exploits for this vulnerability are publicly available. The script affected by this issue ships as part of the bos.rte.diag fileset. To determine if this fileset is installed, execute the following command: # lslpp -L bos.rte.diag If the fileset is installed it will be listed along with its version information, state, type and a description. The diag script is only executable by the root user or users in the system group; an unprivileged user cannot exploit this vulnerability by executing the diag script. However, various suid root AIX commands invoke the diag script with root privileges. Unprivileged users can exploit this vulnerability via these commands. These commands include lsmcode, invscout, invscoutd and diag_exec. The following describes how to check for the filesets containing these commands: To determine if Inventory Scout (invscout and invscoutd) is installed, execute the following command: # lslpp -L invscout.rte To determine if diag_exec is installed, execute the following command: # lslpp -L bos.rte.diag To determine if lsmcode is installed, execute the following command: # lslpp -L bos.diag.util If the fileset is installed it will be listed along with its version information, state, type and a description. II. Impact ========== Local users can execute arbitrary commands with root privileges. III. Solutions =============== A. Official Fix IBM provides the following fixes: APAR number for AIX 5.1.0: IY64389 (available) APAR number for AIX 5.2.0: IY64523 (available) APAR number for AIX 5.3.0: IY64277 (available) NOTE: Affected customers are urged to upgrade to 5.1.0, 5.2.0 or 5.3.0 at the latest maintenance level. B. Workaround Setting the file mode bits for lsmcode, invscout, invscoutd and diag_exec to 500 will allow only the root user to execute the these commands. This can be done by executing the following commands as root: # chmod 500 /usr/sbin/lsmcode # chmod 500 /usr/sbin/invscout # chmod 500 /usr/sbin/invscoutd # chmod 500 /usr/sbin/diag_exec Verify that the file mode bits have been changed to 500: # ls -la /usr/sbin/lsmcode - - -r-x------ 1 root system 10014 Sep 15 2002 /usr/sbin/lsmcode # ls -la /usr/sbin/invscout - - -r-x------ 1 root system 465216 Oct 13 20:58 /usr/sbin/invscout # ls -la /usr/sbin/invscoutd - - -r-x------ 1 root system 525131 Oct 13 20:58 /usr/sbin/invscoutd # ls -la /usr/sbin/diag_exec - - -r-x------ 1 root system 2796 Sep 15 2002 /usr/sbin/diag_exec IV. Obtaining Fixes =================== AIX Version 5 APARs can be downloaded from the eServer pSeries Fix Central web site: http://www-912.ibm.com/eserver/support/fixes/fcgui.jsp Security related Emergency Fixes can be downloaded from: ftp://aix.software.ibm.com/aix/efixes/security V. Contact Information ======================== If you would like to receive AIX Security Advisories via email, please visit: https://techsupport.services.ibm.com/server/pseries.subscriptionSvcs Comments regarding the content of this announcement can be directed to: security-alert@austin.ibm.com To request the PGP public key that can be used to communicate securely with the AIX Security Team send email to security-alert@austin.ibm.com with a subject of "get key". The key can also be downloaded from a PGP Public Key Server. The key id is 0x9391C1F2. Please contact your local IBM AIX support center for any assistance. eServer is a trademark of International Business Machines Corporation. IBM, AIX and pSeries are registered trademarks of International Business Machines Corporation. All other trademarks are property of their respective holders. [***** End MSS-OAR-E01-2004:2061.1 *****] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of IBM Global Services MSS 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) P-068: Sun Webmail Vulnerability P-069: Sun - Multiple Mozilla Vulnerabilities P-070: Updated Samba Packages P-071: Updated "gd" Packages P-072: Updated ZIP Packages P-073: Updated "libxml" Packages for Versions Prior to 2.6.14 P-074: “newgrp(1)” Local Privilege Escalation p-075: "libkadm5srv" Heap Buffer Overflow P-076: "nfs-utils" Package Vulnerabilities P-077: "paginit" Command Vulnerability