__________________________________________________________
The U.S. Department of Energy
Computer Incident Advisory Capability
___ __ __ _ ___
/ | /_\ /
\___ __|__ / \ \___
__________________________________________________________
INFORMATION BULLETIN
Korn Shell (ksh) suid_exec Vulnerability
April 8, 1998 23:00 GMT Number H-15a
______________________________________________________________________________
PROBLEM: A problem has been identified in the "suid_exec" program often
supplied with the Korn Shell (ksh) distribution.
PLATFORM: All operating systems with "suid_exec" program supplied with
the Korn Shell (ksh) distribution.
DAMAGE: Local users may gain root privileges.
SOLUTION: Apply the workaround described below.
______________________________________________________________________________
VULNERABILITY Exploit details involving this vulnerability have been widely
ASSESSMENT: distributed.
______________________________________________________________________________
[ Appended on April 8, 1998 with additional vendor information ]
[ Start AUSCERT Advisory ]
===========================================================================
AA-96.17 AUSCERT Advisory
Korn Shell (ksh) suid_exec Vulnerability
5 December 1996
Last Revised: --
----------------------------------------------------------------------------
AUSCERT has received information that there is a vulnerability in the
"suid_exec" program often supplied with the Korn Shell (ksh) distribution.
ksh may be part of the standard vendor distribution or may have been
installed as additional software by system administrators.
This vulnerability may allow local users to gain root privileges.
Exploit details involving this vulnerability have been widely distributed.
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 new information becomes available.
----------------------------------------------------------------------------
1. Description
suid_exec is a program that is often installed when the Korn shell
(ksh) interpreter is installed. suid_exec is installed to allow the
execution of setuid/setgid shell scripts and shell scripts which do
not have read permissions set. All versions of suid_exec are
currently vulnerable.
The vulnerability in suid_exec may allow arbitrary commands to be
executed with root privileges.
Exploit information involving this vulnerability has been made
publicly available.
suid_exec is known to be present in the default installation on the
following Unix operating systems:
IRIX 5.x
IRIX 6.x
This list is not necessarily complete, and other operating systems
may have suid_exec installed by default. Sites may also have installed
suid_exec when installing the publicly available version of the Korn
Shell (ksh). This version of suid_exec is also vulnerable.
All sites are encouraged to check their systems for the presence of
the suid_exec program. By default, suid_exec will be found in /etc.
To determine the location of any other copies of suid_exec, the
following command can be executed as root:
# find / -name suid_exec -perm -4000 -exec ls -l {} \;
If suid_exec is installed, sites should take the steps outlined in
Section 3.
2. Impact
Local users may gain root privileges.
3. Workarounds/Solution
AUSCERT recommends that sites prevent the exploitation of the
vulnerability in suid_exec 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 suid_exec. For example,
if suid_exec is located in /etc, the following command should be run
as root:
# chmod 400 /etc/suid_exec
# ls -l /etc/suid_exec
-r-------- 1 root sys 14384 May 30 1996 /etc/suid_exec
Note that the removing these permissions from suid_exec may stop
non-root users from executing setuid/setgid shell scripts and scripts
upon which read permissions have not been set.
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 suid_exec program is
not needed by most sites. If sites had previously disabled the
suid_exec program, they would not have been vulnerable to this latest
exploit.
----------------------------------------------------------------------------
AUSCERT thanks Silicon Graphics Inc. for their assistance and technical
expertise essential for the production of this advisory.
----------------------------------------------------------------------------
[ End AUSCERT Advisory ]
[ Append with Silicon Graphics Inc. Advisory ]
-----BEGIN PGP SIGNED MESSAGE-----
______________________________________________________________________________
Silicon Graphics Inc. Security Advisory
Title: suid_exec Buffer Overflow
Title: AUSCERT AA-96.17
Number: 19980405-01-I
Date: April 6, 1998
______________________________________________________________________________
Silicon Graphics provides this information freely to the SGI user community
for its consideration, interpretation, implementation and use. Silicon
Graphics recommends that this information be acted upon as soon as possible.
Silicon Graphics provides the information in this Security Advisory on
an "AS-IS" basis only, and disclaims all warranties with respect thereto,
express, implied or otherwise, including, without limitation, any warranty
of merchantability or fitness for a particular purpose. In no event shall
Silicon Graphics be liable for any loss of profits, loss of business, loss
of data or for any indirect, special, exemplary, incidental or consequential
damages of any kind arising from your use of, failure to use or improper
use of any of the instructions or information in this Security Advisory.
______________________________________________________________________________
- -----------------------
- --- Issue Specifics ---
- -----------------------
The suid_exec program is part of the Korn Shell (ksh) software distributions.
Under normal operation, the suid_exec program will run shell scripts
setuid. Unfortunately, a buffer overrun has been discovered in the
suid_exec program which could allow arbitrary commands to be run as the
privileged user root.
Silicon Graphics Inc. has investigated the issue and recommends the
following steps for neutralizing the exposure. It is HIGHLY RECOMMENDED
that these measures be implemented on ALL vulnerable SGI systems.
- --------------
- --- Impact ---
- --------------
The suid_exec program is installed by default on all IRIX 5.x and 6.x
systems.
With a local account, the suid_exec buffer overrun vulnerability can be
exploited locally and remotely.
The suid_exec buffer overrun vulnerability can be utilized to execute
commands with root privileges.
The suid_exec buffer overrun vulnerability has been publicly discussed
in Usenet newsgroups and mailing lists and also reported in AUSCERT
Security Advisory AA-96.17.
- --------------------------
- --- Temporary Solution ---
- --------------------------
To disable the programs that are believed to be vulnerable, use the
following steps.
1) Become the root user on the system.
% /bin/su -
Password:
#
2) Change the setuid root permissions on the program.
# /bin/chmod 400 /sbin/suid_exec
************
*** NOTE ***
************
Removing these permissions from suid_exec will stop
non-root users from executing setuid/setgid shell
scripts and scripts upon which read permissions have
not been set.
3) Confirm the new permissions on the program.
# ls -la /sbin/suid_exec
-r-------- 1 root sys 14384 May 30 1996 /sbin/suid_exec
4) Using the find command, locate any additional copies of suid_exec
and disable them.
Note that this is one long command, though we have separated it
onto two lines using backslashes.
# find / -local -type f -name suid_exec \
-print -ok chmod 400 '{}' \;
This command will find all files on a system that are
- only in the local file system you name (/ -local)
- regular files (-type f)
- named appropriately (-name suid_exec)
Once found, those files will
- have their names printed (-print)
- have their modes changed, but only if you type `y' in response
to the prompt (-ok chmod 400 '{}' \;)
5) Return to previous level.
# exit
$
- ----------------
- --- Solution ---
- ----------------
The suid_exec program is considered freeware and will not be patched.
As freeware software, all reasonable efforts will be made to address
the issue in future versions of the software.
OS Version Vulnerable? Patch # Other Actions
---------- ----------- ------- -------------
IRIX 3.x no
IRIX 4.x no
IRIX 5.0.x yes not avail Note 1
IRIX 5.1.x yes not avail Note 1
IRIX 5.2 yes not avail Note 1
IRIX 5.3 yes not avail Note 1
IRIX 6.0.x yes not avail Note 1
IRIX 6.1 yes not avail Note 1
IRIX 6.2 yes not avail Note 1
IRIX 6.3 yes not avail Note 1
IRIX 6.4 yes not avail Note 1
Notes:
1) Freeware upgrades should be applied.
- ------------------------
- --- Acknowledgments ---
- ------------------------
Silicon Graphics wishes to thank AUSCERT for their assistance in
this matter.
- -----------------------------------------------------------
- --- Silicon Graphics Inc. Security Information/Contacts ---
- -----------------------------------------------------------
If there are questions about this document, email can be sent to
cse-security-alert@sgi.com.
------oOo------
Silicon Graphics provides security information and patches for
use by the entire SGI community. This information is freely
available to any person needing the information and is available
via anonymous FTP and the Web.
The primary SGI anonymous FTP site for security information and patches
is sgigate.sgi.com (204.94.209.1). Security information and patches
are located under the directories ~ftp/security and ~ftp/patches,
respectively. The Silicon Graphics Security Headquarters Web page is
accessible at the URL http://www.sgi.com/Support/security/security.html.
For issues with the patches on the FTP sites, email can be sent to
cse-security-alert@sgi.com.
For assistance obtaining or working with security patches, please
contact your SGI support provider.
------oOo------
Silicon Graphics provides a free security mailing list service
called wiretap and encourages interested parties to self-subscribe
to receive (via email) all SGI Security Advisories when they are
released. Subscribing to the mailing list can be done via the Web
(http://www.sgi.com/Support/security/wiretap.html) or by sending email
to SGI as outlined below.
% mail wiretap-request@sgi.com
subscribe wiretap <YourEmailAddress>
end
^d
In the example above, <YourEmailAddress> is the email address that you
wish the mailing list information sent to. The word end must be on a
separate line to indicate the end of the body of the message. The
control-d (^d) is used to indicate to the mail program that you are
finished composing the mail message.
------oOo------
Silicon Graphics provides a comprehensive customer World Wide Web site.
This site is located at http://www.sgi.com/Support/security/security.html.
------oOo------
For reporting *NEW* SGI security issues, email can be sent to
security-alert@sgi.com or contact your SGI support provider. A
support contract is not required for submitting a security report.
______________________________________________________________________________
This information is provided freely to all interested parties and may
be redistributed provided that it is not altered in any way, Silicon
Graphics is appropriately credited and the document retains and
includes its valid PGP signature.
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBNSlQ6LQ4cFApAP75AQEK/QP/QtoOa7kml2Rs2KgW2cx5s83SDXe6kXgD
yqlIQUk7ZDbNEq7ha+3dezQG4V8VrJj2xaBmjNvdIky2NM7SNQbo8/Q4vwsXOG4W
qfUhPgqaTZ4vqqh+hWQ009h8bAbU5VQiyeFqwrhOhs9eK56pVx9jKD/RZFB2g8uK
wHeierfHt3M=
=OPMG
-----END PGP SIGNATURE-----
[ End Silicon Graphics Inc. Advisory ]
_______________________________________________________________________________
CIAC wishes to acknowledge the contributions of AUSCERT 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-04: HP-UX Ping Vulnerability
H-05: Internet Hoaxes
H-07: Sendmail SIGHUP-smtpd Vulnerability
H-08: lpr Buffer Overrun Vulnerability
H-09: HP 9000 Access Vulnerability
H-10: HP-UX Security Vulnerabilities (passwd, fpkg2swpkg, newgrp)
H-11: sendmail Group Permissions Vulnerability
H-12: IBM AIX(r) 'SYN Flood' and 'Ping o' Death' Vulnerabilities
H-13: IBM AIX(r) Security Vulnerabilities (gethostbyname, lquerypv)
H-14: SGI IRIX Vulnerabilities (systour, OutOfBox, cdplayer, datman)
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
TUCoPS is optimized to look best in Firefox® on a widescreen monitor (1440x900 or better).
Site design & layout copyright © 1986-2025 AOH