Operating System:


22 December 2004

Protect yourself against future threats.

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--------------------

Hash: SHA1


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

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

# 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:


Security related Emergency Fixes can be downloaded from:


V.  Contact Information

If you would like to receive AIX Security Advisories via email, please visit:

Comments regarding the content of this announcement can be directed to:


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.
Version: GnuPG v1.2.4 (MingW32)


- --------------------------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:


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:


Australian Computer Emergency Response Team
The University of Queensland
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.

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