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

===========================================================================
             AUSCERT External Security Bulletin Redistribution

                  ESB-2001.252 -- MSS-OAR-E01-2001:225.1
                Root Shell Spawning Possible Via "diagrpt"
                               26 June 2001

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

        AusCERT Security Bulletin Summary
        ---------------------------------

Vendor:                 IBM
Operating System:       AIX 4.3.x
                        AIX 5.1
Impact:                 Root Compromise
Access Required:        Local

- --------------------------BEGIN INCLUDED TEXT--------------------

- -----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

===========================================================================
                           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
    security-alert@austin.ibm.com 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 "aixserv@austin.ibm.com" 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 "aixserv@austin.ibm.com" 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:

   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.
- -----BEGIN PGP SIGNATURE-----
Version: PGP Personal Privacy 6.5.3

iQA/AwUBOy+i/MXrSKQHhgFwEQIErACgwMcgwgfXhZGWYfq5AjvCwIskBfQAnjr1
El7wVxmjZfgplH2ZRkEchxJ+
=mijN
- -----END PGP SIGNATURE-----



- --------------------------END INCLUDED TEXT--------------------

You have received this e-mail bulletin as a result of your organisation's
registration with AusCERT. The mailing list you are subscribed to is
maintained within your organisation, so if you do not wish to continue
receiving these bulletins you should contact your local IT manager. If
you do not know who that is, please send an email to auscert@auscert.org.au
and we will forward your request to the appropriate person.

This security bulletin is provided as a service to AusCERT's members.  As
AusCERT did not write the document quoted above, AusCERT has had no control
over its content.  The decision to use any or all of this information is
the responsibility of each user or organisation, and should be done so in
accordance with site policies and procedures.

NOTE: This is only the original release of the security bulletin.  It may
not be updated when updates to the original are made.  If downloading at
a later date, it is recommended that the bulletin is retrieved directly
from the original authors to ensure that the information is still current.

Contact information for the authors of the original document is included
in the Security Bulletin above.  If you have any questions or need further
information, please contact them directly.

Previous advisories and external security bulletins can be retrieved from:

	http://www.auscert.org.au/Information/advisories.html

If you believe that your system has been compromised, contact AusCERT or
your representative in FIRST (Forum of Incident Response and Security
Teams).

Internet Email: auscert@auscert.org.au
Facsimile:	(07) 3365 7031
Telephone:	(07) 3365 4417 (International: +61 7 3365 4417)
		AusCERT personnel answer during Queensland business hours
		which are GMT+10:00 (AEST).
		On call after hours for emergencies.

-----BEGIN PGP SIGNATURE-----
Version: 2.6.3i
Charset: noconv
Comment: ftp://ftp.auscert.org.au/pub/auscert/AUSCERT_PGP.key

iQCVAwUBOzhm1ih9+71yA2DNAQHwFwP7Bhiv9FnxJqZ9b98qAdEtiNwGwImbvTvy
mp/Uq/QWARTga5A5sl3UZ30+lx8uFDs7/YF0RXnOYH/NRXvSb/Cc9axBSpl/rNJ9
SdGksB1gmeFZY/tQUZELOfAUZvfJgogskyR/Rs0lwj9L5AA6rpAeivO1t8r9o7xn
/uyVpxUPAa0=
=MWUo
-----END PGP SIGNATURE-----