IBM-ERS Security Vulnerability Alert: IBM AIX: Insecure temporary

ibm-ers@ERS.IBM.COM
Tue, 10 Feb 1998 12:06:10 -0500

---FOR PUBLIC RELEASE ---

-----BEGIN PGP SIGNED MESSAGE-----

- --ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--
- ---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---

======= ============ ====== ======
======= ============== ======= =======
=== === ==== ====== ======
=== =========== ======= =======
=== =========== === ======= ===
=== === ==== === ===== ===
======= ============== ===== === =====
======= ============ ===== = =====

EMERGENCY RESPONSE SERVICE
SECURITY VULNERABILITY ALERT

10 February 1998 17:00 GMT Number: ERS-SVA-E01-1998:002.1
===============================================================================
VULNERABILITY SUMMARY

VULNERABILITY: Insecure temporary files allow symbolic link attacks

PLATFORMS: IBM AIX(r) 3.2.5, 4.1.x, 4.2.x, 4.3

SOLUTION: Apply the fixes listed below.

THREAT: Local users can modify system files.

===============================================================================
DETAILED INFORMATION

I. Description

Several insecure temporary files have been identified in AIX that will follow
symbolic links when they are created. In addition, these temporary files are
created with world-writable permissions. This can lead to denial of service
attacks.

II. Impact

If the root user executes one of the vulnerable commands while a symbolic link
from the corresponding temporary file exists, then the link will be followed
and overwrite or create arbitrary system files.

The vulnerable commands are not installed as set-user-id programs, thus,
unpriviledged users cannot create files in system directories. However, the
root user may be tricked into executing the programs while the symbolic link
is in place.

III. Details

The following is a list of world-writable files with workaround and fix
information:

==============
/tmp/last_uuid
==============
This file is created and used by the License Management subsystem and must be
world-writable in order to function correctly.

APAR:
Not available.

Workaround:
Ensure that /tmp/last_uuid is a regular file and owned by root. This can
be done by modifying /sbin/rc.boot to re-create this file during system
boot.

#!/usr/bin/ksh
cd /sbin
cp -p rc.boot rc.boot.before.security.patch
/bin/rm -f /tmp/last_uuid
>/tmp/last_uuid
chown root.system /tmp/last_uuid
chmod 666 /tmp/last_uuid
/usr/bin/ex <<EOF /sbin/rc.boot >/dev/null 2>&1
/rm -f \/etc\/lock/a
/bin/rm -f /tmp/last_uuid
>/tmp/last_uuid
chown root.system /tmp/last_uuid
chmod 666 /tmp/last_uuid
.
x!
EOF

========================
/var/adm/ras/dumpsymplog
========================
/var/adm/ras/dumpsymplog is used for storing the dump symptom string.

APAR:
Fixed in 4.2.1 maintenance level (IX58183)
Fixed in 4.3.0 release

Workaround:
If the file exists, change the permissions to 644. Add "umask 022" to
/usr/lib/ras/logsymptom.

======================
/tmp/x, /var/adm/ras/$
======================
/tmp/x and /var/adm/ras/$ are not needed.

APAR:
Fixed in 4.2.1 maintenance level (IX58183)
Fixed in 4.3.0 release.

Workaround:
Remove both files and change /usr/lib/ras/notifymeth so that they are not
re-created.

===============
/tmp/rc.net.out
===============
This file is used to log the output of rc.net and rc.bsdnet.

APAR:
Fixed in 4.3.0 release.

Workaround:
If the file exists, change the permissions to 644. Add "umask 022" to
/etc/rc.net and /etc/rc.bsdnet

=============
/tmp/xlogfile
=============
This file is used to log error messages from the X server.

APAR:
Fixed in 4.1.5 APAR IX58516 (fileset X11.base.rte.4.1.5.0)
Fixed in 4.2.1 maintenance level (IX58183)
Fixed in 4.3.0 release

Workaround:
Remove /tmp/xlogfile before and after starting the X server. This can be
done by changing /usr/lpp/X11/defaults/xserverrc.

==========================
/tmp/.oslevel.mlcache.info
==========================
This file must be world-writable in order for the oslevel command to function
correctly.

APAR:
Fixed in 4.1.5 APAR IX56229 (fileset bos.rte.install.4.1.5.0)
Fixed in 4.2.1 maintenance level (IX58183)
Fixed in 4.3.0 release

Workaround:
Ensure that /tmp/.oslevel.mlinfo.cache is a regular file and owned by root.
This can be done by modifying /sbin/rc.boot to re-create this file during
system boot.

=================
/tmp/sysdumpdev-L
=================
This file contains information processed by /usr/lib/ras/logsymptom. It is
not needed after logsymptom has finished execution.

APAR:
Not available.

Workaround:
Remove /tmp/sysdumpdev-L if it exists. Update /usr/lib/ras/logsymptom.

#!/usr/bin/ksh
/bin/rm -f /tmp/sysdumpdev-L
cd /usr/lib/ras
cp -p logsymptom logsymptom.before.security.patch
/usr/bin/ex <<EOF /usr/lib/ras/logsymptom >/dev/null 2>&1
/^tmpf=
a
/bin/rm -f \$tmpf
umask 022
.
x!
EOF

IV. Acknowledgements

Thanks to Joerg Schumacher <schuma@gaertner.de>, for bringing this problem to
our attention.

VI. Contact Information

Comments regarding the content of this announcement can be directed to the IBM
Support Center or to:

security-alert@austin.ibm.com

To request the PGP public key that can be used to encrypt new AIX security
vulnerabilities, send email to security-alert@austin.ibm.com with a subject of
"get key".

If you would like to subscribe to the AIX security newsletter, send a note to
aixserv@austin.ibm.com with a subject of "subscribe Security". To cancel your
subscription, use a subject of "unsubscribe Security". To see a list of other
available subscriptions, use a subject of "help".

IBM and AIX are a registered trademark of International Business Machines
Corporation. All other trademarks are property of their respective holders.

===============================================================================

IBM's Internet Emergency Response Service (IBM-ERS) is a subscription-based
Internet security response service that includes computer security incident
response and management, regular electronic verification of your Internet
gateway(s), and security vulnerability alerts similar to this one that are
tailored to your specific computing environment. By acting as an extension
of your own internal security staff, IBM-ERS's team of Internet security
experts helps you quickly detect and respond to attacks and exposures across
your Internet connection(s).

As a part of IBM's Business Recovery Services organization, the IBM Internet
Emergency Response Service is a component of IBM's SecureWay(tm) line of
security products and services. From hardware to software to consulting,
SecureWay solutions can give you the assurance and expertise you need to
protect your valuable business resources. To find out more about the IBM
Internet Emergency Response Service, send an electronic mail message to
ers-sales@vnet.ibm.com, or call 1-800-742-2493 (Prompt 4).

IBM-ERS maintains a site on the World Wide Web at http://www.ers.ibm.com/.
Visit the site for information about the service, copies of security alerts,
team contact information, and other items.

IBM-ERS uses Pretty Good Privacy* (PGP*) as the digital signature mechanism for
security vulnerability alerts and other distributed information. The IBM-ERS
PGP* public key is available from http://www.ers.ibm.com/team-info/pgpkey.html.
"Pretty Good Privacy" and "PGP" are trademarks of Philip Zimmermann.

IBM-ERS is a Member Team of the Forum of Incident Response and Security Teams
(FIRST), a global organization established to foster cooperation and response
coordination among computer security teams worldwide.

Copyright 1998 International Business Machines Corporation.

The information in this document is provided as a service to customers of
the IBM Emergency Response Service. Neither International Business Machines
Corporation, Integrated Systems Solutions Corporation, 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 contained herein, or
represents that its use would not infringe any 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 IBM or
its subsidiaries. The views and opinions of authors expressed herein do not
necessarily state or reflect those of IBM or its subsidiaries, and may not be
used for advertising or product endorsement purposes.

The material in this security alert may be reproduced and distributed,
without permission, in whole or in part, by other security incident response
teams (both commercial and non-commercial), provided the above copyright is
kept intact and due credit is given to IBM-ERS.

This security alert may be reproduced and distributed, without permission,
in its entirety only, by any person provided such reproduction and/or
distribution is performed for non-commercial purposes and with the intent of
increasing the awareness of the Internet community.

- ---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---EXTERNAL RELEASE---
- --ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--ERS-ALERT--

-----BEGIN PGP SIGNATURE-----
Version: 2.7.1

iQCVAwUBNOCIZfWDLGpfj4rlAQFSegQAmDwuQVPG8s8KkqiYVd3dXCwUAKuedmtA
xxlIT67X6FqOhHZY0euWz7y6HlhATdpWGyB2Dlfjoen6ikCP58fom1SFy1RzNkxM
Jt6JEMVxhDWj/chwjI22HtpOAl7DXd6hGo3ZmNGkHIOxBHAHezvcHe1IWxKwx67Q
B6y1tcI5gds=
=2GXM
-----END PGP SIGNATURE-----