-----BEGIN PGP SIGNED MESSAGE-----
__________________________________________________________
The U.S. Department of Energy
Computer Incident Advisory Capability
___ __ __ _ ___
/ | /_\ /
\___ __|__ / \ \___
__________________________________________________________
INFORMATION BULLETIN
Incorrect Permissions on /tmp
August 17, 1995 1200 PDT Number F-27
_______________________________________________________________________________
PROBLEM: A vulnerability exists in Solaris 2.x systems that allows
a race condition to be exploited to gain root access.
PLATFORM: Sun Solaris 2.x (SunOS 5.x) and Solaris 2.4x86
DAMAGE: Users logged into a system may gain unauthorized root
privileges.
SOLUTION: Use the workaround contained in this bulletin to modify the
sticky bit on the /tmp directory.
AVAILABILITY: See the workaround that is contained in this bulletin
_______________________________________________________________________________
VULNERABILITY Unprivileged users who are logged on to a system can use this
ASSESSMENT: vulnerability to gain unauthorized root privileges. An
exploit program for this vulnerability has been published
publically. CIAC advises that the workaround described below
be performed immediately.
_______________________________________________________________________________
CRITICAL Information on the Incorrect Permissions on /tmp
CIAC has received information from the Australian Computer Emergency Response
Team (AUSCERT) and from the bugtraq mailing list that a vulnerability has been
identified in Solaris 2.x systems that allows a race condition to be exploited
to gain root access. The basic problem is that the sticky bit is sometimes
not set on the /tmp directory. This improper setting causes users to be able
to access other user's files in the /tmp directory.
Sun Microsystems has confirmed this vulnerability and is currently testing
patches for this vulnerability. Patches from Sun Microsystems will be for
Solaris 2.3, 2.4 and 2.4x86. Sun Microsystems expects to have patches
available within about a week. This vulnerability has been fixed in the
upcoming release of Solaris.
Detailed Description
____________________
A race condition has been identified in at least one Solaris 2.x system
program which can be exploited to gain root access if a user has access to the
temporary files. Access to these temporary files may be obtained if the
permissions on the /tmp and /var/tmp directories are set incorrectly. The
permissions on the /tmp directory are often reset improperly by the system if
tmpfs (which is mounting swap as /tmp) is in use.
This vulnerability affects the Solaris 2.x (SunOS 5.x) systems. A
vulnerability similar to this affected SunOS 4.1.x (Solaris 1.x) systems in
the past. Therefore, CIAC recommends that these systems also be checked for
the correct permissions. The remainder of this bulletin shows how to identify
if this vulnerability exists on your system and additionally identifies
commands to be used as a workaround to this vulnerability. Commands shown are
for Solaris 2.x systems. Similar commands and configurations exist for SunOS
4.1.x users.
To determine if you are running tmpfs, the following command can be used to
verify if the filesystem for /tmp is swap:
$ /usr/sbin/df -k /tmp
Filesystem kbytes used avail capacity Mounted on
swap 158728 28 158700 0% /tmp
or look in the file /etc/vfstab for the configuration line:
#device device mount FS fsck mount mount
#to mount to fsck point type pass at boot options
#
swap - /tmp tmpfs - yes -
If either of these two conditions exist, then you are running tmpfs and the
system may automatically reset the permissions bits of /tmp at the next
reboot.
To verify if your configuration is vulnerable, the following command may be
used:
$ ls -ld /tmp
drwxrwxrwt 5 root root 306 Aug 16 11:12 /tmp
^
^ (Sticky bit is set -- system not currently vulnerable)
$ ls -ld /tmp
drwxrwxrwx 5 root root 306 Aug 16 11:12 /tmp
^
^ (Sticky bit is not set -- system is vulnerable)
If the sticky bit (t) is not set, then the system is vulnerable.
WORKAROUNDS
___________
These workarounds have been verified with Sun Microsystems. Sun Microsystems
expect a patch to be released in the near future.
1. Immediate Workaround
The immediate workaround is to set the sticky bit on the /tmp directory
using the following command as root:
# /usr/bin/chmod 1777 /tmp
Note that this command must be performed after each reboot if you are
mounting swap as /tmp (using tmpfs).
In addition, the ownership and group membership of the /tmp directory
should be verified using ls -ld /tmp and if incorrect may be reset by
issuing the following commands:
# /usr/bin/chown root /tmp
# /usr/bin/chgrp root /tmp
2. System Reboot workaround
It is possible to perform these commands automatically at reboot by
creating the following script as /etc/init.d/tmpfsfix:
-------------------------8<--- cut here ---8<--------------------------------
#!/bin/sh
if [ -d /tmp ]
then
/usr/bin/chmod 1777 /tmp
/usr/bin/chgrp root /tmp
/usr/bin/chown root /tmp
fi
#
# end of script tmpfsfix
-------------------------8<--- cut here ---8<--------------------------------
A symbolic link should be then be created called /etc/rc3.d/S79tmpfix
which points to /etc/init.d/tmpfsfix by issuing the following command
as root:
# /usr/bin/ln -s /etc/init.d/tmpfsfix /etc/rc3.d/S79tmpfix
3. /var/tmp permissions
The /var/tmp directory should be similarly checked and corrected. Note
that this directory is not usually mounted as tmpfs, and therefore is
not subject to automatic resetting of its permission bits on reboot.
% ls -ld /var/tmp
drwxrwxrwt 2 root 512 Aug 15 11:35 /var/tmp
_______________________________________________________________________________
CIAC wishes to thank the AUSCERT team and Mark Graff of Sun Microsystems for
providing 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. 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 and DOE contractors, and CIAC can be
contacted at:
Voice: 510-422-8193
FAX: 510-423-8002
STU-III: 510-423-2604
E-mail: ciac@llnl.gov
For emergencies and off-hour assistance, DOE and DOE contractor sites 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: (510) 423-4753 (14.4K baud)
(510) 423-3331 (9600 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 OUHara, 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 and ESnet 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 by sending email to docserver@first.org
with an empty subject line and a message body containing the line: send
first-contacts.
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.
CIAC BULLETINS ISSUED IN FY95 (Previous bulletins available from CIAC)
(F-01) SGI IRIX serial_ports Vulnerability
(F-02) Summary of HP Security Bulletins
(F-03) Restricted Distribution
(F-04) Security Vulnerabilities in DECnet/OSI for OpenVMS
(F-05) SCO Unix at, login, prwarn, sadc, and pt_chmod
Patches Available
(F-06) Novell UnixWare sadc, urestore, and suid_exec Vulnerabilities
(F-07) New and Revised HP Bulletins
(F-08) Internet Address Spoofing and Hijacked Session Attacks
(F-09) Unix /bin/mail Vulnerabilities
(F-10) HP-UX Remote Watch
(F-11) Unix NCSA httpd Vulnerability
(F-12) Kerberos Telnet Encryption Vulnerability
(F-13) Unix sendmail vulnerabilities
(F-14) HP-UX Malicious Code Sequences
(F-15) HP-UX "at" and "cron" vulnerabilities
(F-16) SGI IRIX Desktop Permissions Tool Vulnerability
(F-17) Limited Distribution
(F-18) MPE/iX Vulnerabilities
(F-19) Protecting HP-UX Systems Against SATAN
(F-20) Security Administrator Tool for Analyzing Networks (SATAN)
(F-21) Protecting SUN OS Systems Against SATAN
(F-22) SATAN Password Disclosure
(F-23) Protecting IBM AIX Systems Against SATAN
(F-24) Protecting SGI IRIX Systems Against SATAN
(F-25) Cisco IOS Router Software Vulnerability
(F-26) OSF/DCE Security Hole
CIAC NOTES ISSUED IN FY1995 (Previous Notes available from CIAC)
04c December 8, 1994
05d January 11, 1995
06 March 22, 1995
07 March 29, 1995
08 April 4, 1995
09 April 24, 1995
10a June 16, 1995
11 July, 31, 1995
-----BEGIN PGP SIGNATURE-----
Version: 2.6.1
iQCVAwUBMDOoZrnzJzdsy3QZAQH3JwQA4aLdx+CVgFl0zXbtxUXDLPqI/9lalaLQ
qgh1ec7ydoY6hW8l9JOkpf+TsTznTsw2WH4UBeej2Aia3e3Uq60g4FzhdpaG6TCq
ZKaSaMxo3HixhEHEZYKDYKR6YtYUaDZzFhAKyrHv3CbsFddpWwHaBj7zGLDXqfKq
EqhQckC5Z/U=
=rpta
-----END PGP SIGNATURE-----
TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2025 AOH