Date: Fri, 22 Jun 2001 09:48:10 -0400
From: Keith Stevenson <keith.stevenson@louisville.edu.>
To: [email protected]Subject: IBM ERS: Vulnerability in AIX diagrpt
----- Forwarded message from AIX Service Mail Server <aixserv@austin.ibm.com.> -----
This file contains security alerts published by the IBM Emergency Response
Service. These alerts are published at the following URL on the world-wide
web:
http://www.ers.ibm.com/
In order to keep the size of this file reasonable, it contains only
advisories for the current year. You can obtain a list of previous
advisories either from the above URLs, or by requesting one of the
"ERS_YYYY" documents from this mail server.
The fixes mentioned in this document, when available, will be available
from FixDist. Information on obtaining and using FixDist is available
by requesting the 'FixDist' document from this mail server, or at the
following URL on the world-wide web:
http://techsupport.services.ibm.com/rs6k/fixes.html
The 'Security_APARs' document on this mail server contains a list of
security related APARs.
VULNERABILITY SUMMARY
VULNERABILITY: Root Shell Spawning Possible Via "diagrpt"
PLATFORMS: IBM AIX 4.3.x and 5.1
SOLUTION: Apply the emergency-fixes described below, or
employ the workaround, also described below.
THREAT: Malicious user could obtain root privileges.
CERT Advisory: NONE.
DETAILED INFORMATION
I. Description
AIX ships with the diagnostic reporting command, "diagrpt". This
command is shipped SUID, or "set user ID", and is executable by
an ordinary user.
An ordinary user is able to set the "DIAGDATADIR" environment
veriable to a directory of his or her choosing. In this
directory, a user can place a carefully crafted shell program
that is executed when the user runs the "diagrpt" command.
The SUID bit for "diagrpt" will run the shell program as root,
and this program will force the spawning of a new shell with
root privileges.
II. Impact
A malicious local user can use a well-crafted exploit code
to gain root privileges on the attacked system, compromising the
integrity of the system and its attached local network.
III. Solutions
A. WORKAROUND
If you do not wish to install the efix for this vulnerability
but instead wait for the APAR that fixes it to be made
available, you can also negate this vulnerability by making the
"diagrpt" command to be non-SUID. You must be "root" to do this.
However, ordinary users will not be able to use the command if
the SUID bit is removed.
B. Official fix
IBM is working on the following fixes which will be available
soon:
AIX 4.3.x and 5.1: APAR assignment pending.
NOTE: Fix will not be provided for versions prior to 4.3 as
these are no longer supported by IBM. Affected customers are
urged to upgrade to 4.3.3 at the latest maintenance level,
or to 5.1.
C. How to minimize the vulnerability
Temporary fixes for AIX 4.3.x and 5.1 systems are available.
The temporary fixes can be downloaded via ftp from:
ftp://aix.software.ibm.com/aix/efixes/security/diagrpt_efix.tar.Z
The efix tarball consists of two patched diagrpt tarred binaries, one
for
AIX 4.3.x systems (diagrpt.43.tar) and one for AIX 5.1
(diagrpt.51.tar). A copy of this Advisory is included in the efix
tarball.
These temporary fixes have not been fully regression tested; thus,
IBM does not warrant the fully correct functioning of the efix.
Customers install the efix and operate the modified version of AIX
at their own risk.
To proceed with efix installation:
First, verify the MD5 cryptographic hash sums of each efix files
you obtain from unpacking the efix tarball with those given below.
These
should match exactly; if they do not, double check the hash results
and the download site address. If OK, contact IBM AIX Security at
[email protected] and describe the discrepancy.
Filename sum md5
diagrpt.43.tar 02875 30 168c5bf253b516cd7e6a69a94aefa061
diagrpt.51.tar 02327 30 f5df8339dde46d3cc12c6d7b22fd37c4
Efix Installation Instructions:
IMPORTANT NOTICE: Before installing the efix, you must upgrade
to the latest maintenance level of AIX for your version of AIX.
For AIX 4.3, this level is 4.3.3.75. For AIX 5.1, this level
is 5.1.0.0.
1. Become root, if not already done.
2. Change to the /usr/lpp/diagnostics/bin directory. Make
a backup copy of the existing diagrpt binary, giving it
a distinctive, meaningful name, such as "diagrpt.original"
or "diagrpt.backup". This is IMPORTANT to do, so you can
recover the orginal diagrpt binary if something goes wrong during
the installation of the efix!
3. In the root ("/") directory, download, uncompress, and untar
the efix.
a. uncompress diagrpt_efix.tar.Z
b. tar -xvf diagrpt_efix.tar
4. You will have two tarfiles: "diagrpt.43.tar" and
"diagrpt.51.tar". Save the tarfile appropriate for your
version of AIX (i.e., 4.3.3.x or 5.1.0.0); you may discard
the other, unneeded tarfile.
Untar the appropriate (for your AIX version) tarfile by
executing "tar -xvf diagrpt.xy.tar". The efix version of
diagrpt will be untarred and placed in the proper directory.
"xy" is either "43" or "51".
5. Check to be certain that the new diagrpt is SUID and
is assigned proper permissions, "-r-sr-xr-x", and the ownership
is assigned properly, "root" and "system".
IV. Obtaining Fixes
IBM AIX APARs may be ordered using Electronic Fix Distribution (via the
FixDist program), or from the IBM Support Center. For more information
on FixDist, and to obtain fixes via the Internet, please reference
http://techsupport.services.ibm.com/rs6k/fixes.html
or send email to "[email protected]" with the word "FixDist" in the
"Subject:" line.
To facilitate ease of ordering all security related APARs for each AIX
release, security fixes are periodically bundled into a cumulative APAR.
For more information on these cumulative APARs including last update and
list of individual fixes, send email to "[email protected]" with
the word "subscribe Security_APARs" in the "Subject:" line.
V. Acknowledgements
Many thanks go to Johan Van Mengsel of IBM Belgium for
discovering this vulnerability, and to Troy Bollinger of
IBM Boulder and Austin for demonstrating the exploitation
of this vulnerability.
VI. Contact Information
Comments regarding the content of this announcement can be directed to:
[email protected]
To request the PGP public key that can be used to encrypt new AIX
security vulnerabilities, send email to [email protected]
with a subject of "get key".
If you would like to subscribe to the AIX security newsletter, send a
note to [email protected] 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.
----- End forwarded message -----