-----BEGIN PGP SIGNED MESSAGE----- __________________________________________________________ The U.S. Department of Energy Computer Incident Advisory Capability ___ __ __ _ ___ / | /_\ / \___ __|__ / \ \___ __________________________________________________________ INFORMATION BULLETIN HP-UX vgdisplay Buffer Overrun Vulnerability February 7, 1997 22:00 GMT Number H-27 ______________________________________________________________________________ PROBLEM: A vulnerability exists in the vgdisplay(1M) program which is part of the Logical Volume Manager subsystem. PLATFORM: HP-UX 10.x. DAMAGE: This vulnerability may allow local users to gain root privileges. SOLUTION: Until patches are available, it is recommended that sites take the steps outlined in section 3 as soon as possible. ______________________________________________________________________________ VULNERABILITY Exploit details involving this vulnerability have been made ASSESSMENT: publicly available. ______________________________________________________________________________ [ Start AUSCERT Advisory ] =========================================================================== AA-97.04 AUSCERT Advisory HP-UX vgdisplay Buffer Overrun Vulnerability 7 February 1997 Last Revised: -- - -------------------------------------------------------------------------- AUSCERT has received information that a vulnerability exists in the vgdisplay(1M) program which is part of the Logical Volume Manager subsystem under HP-UX 10.x. This vulnerability may allow local users to gain root privileges. Exploit information involving this vulnerability has been made publicly available. Currently there are no vendor patches available that address this vulnerability. AUSCERT recommends that sites take the steps outlined in section 3 as soon as possible. This advisory will be updated as more information becomes available. - -------------------------------------------------------------------------- 1. Description The HP-UX Logical Volume Manager (LVM) is a subsystem for managing disk space. It comprises a number of auxiliary programs used to create, display and manipulate the LVM information. AUSCERT has received information that a vulnerability exists in the vgdisplay(1M) program used to display information about LVM volume groups. Due to insufficient bounds checking on arguments which are supplied by users, it is possible to overwrite the internal stack space of the vgdisplay program while it is executing. By supplying a carefully designed argument to the vgdisplay program, intruders may be able to force vgdisplay to execute arbitrary commands. As vgdisplay is setuid root, this may allow intruders to run arbitrary commands with root privileges. This vulnerability is known to affect HP-UX 10.x. Note that many of the LVM utility programs are hard links to vgdisplay(1M). This indicates that these utility programs share the same code with vgdisplay, and may also be subject to similar attacks. The following programs are all hard links: lvchange, lvcreate, lvdisplay, lvextend, lvlnboot, lvreduce, lvremove, lvrmboot, pvchange, pvcreate, pvdisplay, pvmove, vgcfgbackup, vgcfgrestore, vgchange, vgcreate, vgdisplay, vgexport, vgextend, vgimport, vgreduce, vgremove, vgscan. By default, dynamically linked versions of the LVM programs are found in /usr/sbin under HP-UX 10.x. Statically linked versions are also available under HP-UX 10.x in /sbin. Exploit information involving this vulnerability has been made publicly available. 2. Impact Local users may gain root privileges. 3. Workarounds/Solution AUSCERT recommends that sites limit the possible exploitation of this vulnerability by immediately removing the setuid permissions as stated in Section 3.1. Currently there are no vendor patches available that address this vulnerability. AUSCERT recommends that official vendor patches be installed when they are made available. 3.1 Remove setuid and non-root execute permissions To prevent the exploitation of the vulnerability described in this advisory, AUSCERT recommends that the setuid permissions be removed from the vgdisplay program immediately. Note that permission changes to vgdisplay will also affect those LVM utility programs which are hard links to vgdisplay. As the vgdisplay and related programs will no longer work for non-root users, it is recommended that the execute permissions also be removed. Sites will need to restrict permissions on both the dynamically linked copies in /usr/sbin and the statically linked copies in /sbin. First, restrict permissions on the copies in /usr/sbin. For example: # ls -l /usr/sbin/vgdisplay -r-sr-xr-x 23 root sys 376832 Jun 10 1996 /usr/sbin/vgdisplay # chmod 500 /usr/sbin/vgdisplay # ls -l /usr/sbin/vgdisplay -r-x------ 23 root sys 376832 Jun 10 1996 /usr/sbin/vgdisplay Second, restrict permissions on the copies in /sbin. For example: # ls -l /sbin/vgdisplay -r-sr-xr-x 23 root sys 606208 Jun 10 1996 /sbin/vgdisplay # chmod 500 /sbin/vgdisplay # ls -l /sbin/vgdisplay -r-x------ 23 root sys 606208 Jun 10 1996 /sbin/vgdisplay Note that this will remove the ability for any non-root user to run vgdisplay or any of the LVM utility programs which are hard linked to vgdisplay. 4. Previous patches During the installation of HP-UX patches, copies of files being replaced are saved in case the patches need to be backed out of. The original versions of patched files are often stored in the following location: HP-UX 10.x: /var/adm/sw/patch// If patches for vulnerable programs have been previously installed, copies of the vulnerable programs may be available in the above location. Sites should ensure the directories have permissions which restrict access to the patch areas. 5. Additional measures Most Unix systems ship numerous programs which have setuid or setgid privileges. Often the functionality supplied by these privileged programs is not required by many sites. The large number of privileged programs that are shipped by default are to cater for all possible uses of the system. AUSCERT encourages sites to examine all the setuid/setgid programs and determine the necessity of each program. If a program does not absolutely require the setuid/setgid privileges to operate (for example, it is only run by the root user), the setuid/setgid privileges should be removed. Furthermore, if a program is not required at your site, then all execute permissions should be removed. A sample command to find all setuid/setgid programs is (run as root): # find / \( -perm -4000 -o -perm -2000 \) -exec ls -ld {} \; It is AUSCERT's experience that many vulnerabilities are being discovered in setuid/setgid programs which are not necessary for the correct operation of most systems. Sites can increase their security by removing unnecessary setuid/setgid programs. =========================================================================== [ End AUSCERT Advisory ] _______________________________________________________________________________ CIAC wishes to acknowledge the contributions of AUSCERT and Hewlett-Packard 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-17: cron/crontab Buffer Overrun Vulnerabilities H-18: Denial-of-Service Attack via ping H-19: HP Software Installation Programs Vulnerability H-20: Vulnerability in IRIX csetup H-21: HP Security Vulnerabilities (newgrp, authentication, passwor H-22: talkd Buffer Overrun Vulnerability H-23: Sendmail MIME Conversion Buffer Overrun Vulnerability H-24: IBM AIX(r) "gethostbyname()" Buffer Overrun Vulnerability H-25: Vulnerability in rlogin/term H-26: FreeBSD setlocale() Vulnerability 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 -----BEGIN PGP SIGNATURE----- Version: 2.6.2 iQCVAwUBMxtcyLnzJzdsy3QZAQFD2QQAhDzH6P2rD1AAfckl1uMvK1xndWqFg/CO MBMkI6I0wxBUZzFLuae3mSqRf27MrTVbefUpDqOLfMjUJT50dszI4OzNcp3h2m1s /eaaHtzTXVu95//k3aKth7M0R+9fQah1Uc58ea35+Fon/4tNu8G0UbT4FOTOc7V8 jwATUC5EvVk= =h1sp -----END PGP SIGNATURE-----