Operating System:

Published:

22 December 2004

Protect yourself against future threats.

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

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

                  ESB-2004.0813 -- IBM Security Advisory
              Untrusted path vulnerability in the diag script
                             22 December 2004

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

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

Product:           diag
Publisher:         IBM
Operating System:  AIX
Impact:            Root Compromise
Access:            Existing Account

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

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

IBM SECURITY ADVISORY

First Issued: Mon Dec 20 10:44:36 CST 2004

===========================================================================
                           VULNERABILITY SUMMARY

VULNERABILITY:      An untrusted path vulnerability in the diag script
                    allows local users to execute arbitrary code if invoked
                    via a suid root application.

PLATFORMS:          AIX 5.1, 5.2 and 5.3.

SOLUTION:           Apply the workaround or APARs as described below.

THREAT:             A local user can execute arbitrary code with root
                    privileges.

CERT VU Number:     N/A
CVE Number:         N/A
===========================================================================
                           DETAILED INFORMATION


I.  Description
===============

A vulnerability was discovered in the diag script that may allow any user
to execute arbitrary code with root privileges. The diag script is used to
perform various diagnostic functions. Exploits for this vulnerability are
publicly available.

The script affected by this issue ships as part of the bos.rte.diag
fileset. To determine if this fileset is installed, execute the following
command:

# lslpp -L bos.rte.diag

If the fileset is installed it will be listed along with its version
information, state, type and a description.

The diag script is only executable by the root user or users in the system
group; an unprivileged user cannot exploit this vulnerability by executing
the diag script. However, various suid root AIX commands invoke the diag
script with root privileges. Unprivileged users can exploit this
vulnerability via these commands. These commands include lsmcode, invscout,
invscoutd and diag_exec. The following describes how to check for the
filesets containing these commands:

To determine if Inventory Scout (invscout and invscoutd) is installed,
execute the following command:

# lslpp -L invscout.rte

To determine if diag_exec is installed, execute the following command:

# lslpp -L bos.rte.diag

To determine if lsmcode is installed, execute the following command:

# lslpp -L bos.diag.util

If the fileset is installed it will be listed along with its version
information, state, type and a description.


II. Impact
==========
Local users can execute arbitrary commands with root privileges.


III.  Solutions
===============

A. Official Fix

IBM provides the following fixes:

      APAR number for AIX 5.1.0:  IY64389 (available)
      APAR number for AIX 5.2.0:  IY64523 (available)
      APAR number for AIX 5.3.0:  IY64277 (available)

NOTE: Affected customers are urged to upgrade to 5.1.0, 5.2.0 or 5.3.0 at
the latest maintenance level.


B. Workaround

Setting the file mode bits for lsmcode, invscout, invscoutd and diag_exec
to 500 will allow only the root user to execute the these commands. This
can be done by executing the following commands as root:

# chmod 500 /usr/sbin/lsmcode
# chmod 500 /usr/sbin/invscout
# chmod 500 /usr/sbin/invscoutd
# chmod 500 /usr/sbin/diag_exec

Verify that the file mode bits have been changed to 500:

# ls -la /usr/sbin/lsmcode
- - -r-x------   1 root     system        10014 Sep 15 2002  /usr/sbin/lsmcode
# ls -la /usr/sbin/invscout
- - -r-x------   1 root     system       465216 Oct 13 20:58 /usr/sbin/invscout
# ls -la /usr/sbin/invscoutd
- - -r-x------   1 root     system       525131 Oct 13 20:58 /usr/sbin/invscoutd
# ls -la /usr/sbin/diag_exec
- - -r-x------   1 root     system         2796 Sep 15 2002  /usr/sbin/diag_exec


IV. Obtaining Fixes
===================

AIX Version 5 APARs can be downloaded from the eServer pSeries Fix Central
web site:

     http://www-912.ibm.com/eserver/support/fixes/fcgui.jsp

Security related Emergency Fixes can be downloaded from:

     ftp://aix.software.ibm.com/aix/efixes/security


V.  Contact Information
========================

If you would like to receive AIX Security Advisories via email, please visit:
     https://techsupport.services.ibm.com/server/pseries.subscriptionSvcs

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 communicate securely
with the AIX Security Team send email to security-alert@austin.ibm.com
with a subject of "get key". The key can also be downloaded from a
PGP Public Key Server. The key id is 0x9391C1F2.

Please contact your local IBM AIX support center for any assistance.

eServer is a trademark of International Business Machines Corporation.
IBM, AIX and pSeries are registered trademarks of International Business
Machines Corporation. All other trademarks are property of their
respective holders.
- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.4 (MingW32)

iD8DBQFBx3k3xwSSvpORwfIRAk0IAJoCzN4zXLYDuiDyo3HSGuUMiM1KcACZAUJq
74UDtrgFh1l8FLkU8xpxXs0=
=xQQM
- -----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.

NOTE: Third Party Rights
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 follow or act on information or advice
contained in this security bulletin is the responsibility of each user or
organisation, and should be considered in accordance with your organisation's
site policies and procedures. AusCERT takes no responsibility for consequences
which may arise from following or acting on information or advice contained in
this security bulletin.

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 author's website 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/render.html?cid=1980

If you believe that your computer system has been compromised or attacked in 
any way, we encourage you to let us know by completing the secure National IT 
Incident Reporting Form at:

        http://www.auscert.org.au/render.html?it=3192

===========================================================================
Australian Computer Emergency Response Team
The University of Queensland
Brisbane
Qld 4072

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 member emergencies only.
===========================================================================

-----BEGIN PGP SIGNATURE-----
Comment: http://www.auscert.org.au/render.html?it=1967

iQCVAwUBQckWIyh9+71yA2DNAQIyZgP/Wc5V1KZ3/sNXQn7x7QNzzZgeWSC4YTw8
iGZVg4dyz27ohnVqFNwvw324yAuQAX0ObRT17RIykttcEh4LUQ6BAoyPJ4iqEDPu
05OYEd12QCvJbF9Nu4K61BSA5CqC6InJ+V7beAreJOyIt6bnpLm5Z5AZf+z1mVDJ
7d5VQjUe9A0=
=noIk
-----END PGP SIGNATURE-----