-----BEGIN PGP SIGNED MESSAGE----- =============================================================================== Security Advisory CERT-NL =============================================================================== Author/Source : Rene Ritzen Index : S-96-69 Distribution : World Page : Classification: External Version: Subject : HP-UX fpkg2swpkg Vulnerability Date : 29-Nov-96 =============================================================================== By courtesy of AUSCERT, the Australian CERT, we received information on a vulnerability in HP-UX fpkg2swpkg. This information is made publicly available by AUSCERT advisory AA-96.14, dated 29 Nov 1996. CERT-NL recommends that sites apply the workaround given in Section 3. Keywords: fpkg2swpkg , root , setuid root =============================================================================== AA-96.14 AUSCERT Advisory HP-UX fpkg2swpkg Vulnerability 29 November 1996 Last Revised: -- - - --------------------------------------------------------------------------- AUSCERT has received information that a vulnerability exists in the HP-UX 10.x program fpkg2swpkg. This vulnerability may allow local users to gain root privileges. Exploit information involving this vulnerability has been made publicly available. At this stage, AUSCERT is unaware of any official vendor patches. AUSCERT recommends that sites apply the workaround given in Section 3 until vendor patches are made available. This advisory will be updated as more information becomes available. - - --------------------------------------------------------------------------- 1. Description The HP-UX 10.x fpkg2swpkg(1m) program is used to translate fpkg (HP-UX 9.x) network media or Product Specification Files (PSFs) to SD swpackage (HP-UX 10.x) PSFs. The fpkg2swpkg program creates files in an insecure manner. As this program executes with root privileges, it is possible for local users to create or append to arbitrary files on the system. Exploit information involving this vulnerability has been made publicly available. The default location for fpkg2swpkg is /usr/sbin/fpkg2swpkg. 2. Impact Local users may be able to create or append to arbitrary files on the system. This can be leveraged to gain root privileges. 3. Workarounds/Solution AUSCERT recommends that sites prevent the exploitation of the vulnerability in fpkg2swpkg by immediately applying the workaround given 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 execute permissions Until official vendor patches are made available, sites should remove the setuid root and execute permissions from fpkg2swpkg. To do this, the following command should be run as root: # chmod 400 /usr/sbin/fpkg2swpkg # ls -l /usr/sbin/fpkg2swpkg -r-------- 1 root bin 57344 May 30 1996 /usr/sbin/fpkg2swpkg Note that this will remove the ability for any user to run this program. If only the setuid permissions are removed, it is still possible for users to gain privileges when fpkg2swpkg is executed by the root user. 4. Additional measures Most Unix systems ship with 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. For example, the functionality provided by the fpkg2swpkg program is not needed by most sites. If sites had previously disabled the fpkg2swpkg program, they would not have been vulnerable to this latest exploit. - - --------------------------------------------------------------------------- AUSCERT thanks Hewlett-Packard for their continued assistance and technical expertise essential for the production of this advisory. AUSCERT also thanks Information Technology Services of the University of Southern Queensland for their assistance. - - --------------------------------------------------------------------------- ============================================================================= CERT-NL is the Computer Emergency Response Team for SURFnet customers. SURFnet is the Dutch network for educational, research and related institutes. CERT-NL is a member of the Forum of Incident Response and Security Teams (FIRST). All CERT-NL material is available under: http://www.surfnet.nl/surfnet/security/cert-nl.html ftp://ftp.surfnet.nl/surfnet/net-security In case of computer or network security problems please contact your local CERT/security-team or CERT-NL (if your institute is NOT a SURFnet customer please address the appropriate (local) CERT/security-team). CERT-NL is one/two hour(s) ahead of UTC (GMT) in winter/summer, i.e. UTC+0100 in winter and UTC+0200 in summer (DST). Email: cert-nl@surfnet.nl Phone: +31 302 305 305 Fax: +31 302 305 329 Snailmail: SURFnet bv Attn. CERT-NL P.O. Box 19035 NL - 3501 DA UTRECHT The Netherlands A 7 * 24 hours phone number is available to SURFnet SSC's and FIRST members on request. ============================================================================== -----BEGIN PGP SIGNATURE----- Version: 2.6.i iQCVAgUBMp7cq2L2fnkJN/jpAQEFzQQAwk2rwQ46p4pQ1vBnu/2vlbG201R6p3ZD 0cme4YPBvX5yhs+zLlC0rbxU1XNQjpvQ/yq6SuDwp6yVp4nQuOU3WU+bDclZjIz4 bWqOASym/+5ubyx7hANRl8VMvabRoNXbP4f1oXLb8JmQ7TgRcAXNqB3lzlqOp1YJ Qtr3XQxeEjk= =6GD9 -----END PGP SIGNATURE-----