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

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

                          ESB-2008.0263 -- [AIX]
                  AIX lsmcode environment variable error
                               14 March 2008

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

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

Product:              lsmcode
Publisher:            IBM
Operating System:     AIX
Impact:               Execute Arbitrary Code/Commands
Access:               Existing Account

Original Bulletin:    
http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd?mode=18&ID=4158

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

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

IBM SECURITY ADVISORY

First Issued: Tue Mar 11 10:01:36 CDT 2008
===============================================================================
                           VULNERABILITY SUMMARY

VULNERABILITY:      AIX lsmcode environment variable error

PLATFORMS:          AIX 5.2, 5.3, 6.1

SOLUTION:           Apply the fix or workaround as described below.

THREAT:             A local attacker may execute arbitrary code.

CVE Number:         n/a

Reboot required?    NO
Workarounds?        YES
Protected by FPM?   YES (high, medium, or low)
Protected by SED?   NO
===============================================================================
                           DETAILED INFORMATION

I. DESCRIPTION

    The lsmcode command contains an environment variable handling
    error.  A local attacker may exploit this error to execute
    arbitrary code with root privileges because the command is setuid
    root.

    The following files are vulnerable:

    /usr/sbin/lsmcode

II. PLATFORM VULNERABILITY ASSESSMENT

    To determine if your system is vulnerable, execute the following
    command:

    lslpp -L bos.diag.util

    The following fileset levels are vulnerable:

    AIX Fileset      Lower Level    Upper Level
    -----------------------------------------------------------
    bos.diag.util    5.2.0.85       5.2.0.85
    bos.diag.util    5.2.0.95       5.2.0.96
    bos.diag.util    5.2.0.105      5.2.0.107
    bos.diag.util    5.3.0.50       5.3.0.51
    bos.diag.util    5.3.0.60       5.3.0.64
    bos.diag.util    5.3.7.0        5.3.7.0
    bos.diag.util    6.1.0.0        6.1.0.0

III. SOLUTIONS

    A. APARS

        IBM has assigned the following APARs to this problem:

        AIX Level           APAR number        Availability
        ---------------------------------------------------
        5.2.0               IZ15276            Now
        5.3.0               IZ15100            Now
        5.3.7               IZ15057            Now
        6.1.0               IZ15277            Now

        Subscribe to the APARs here:

        http://www.ibm.com/support/docview.wss?uid=isg1IZ15276
        http://www.ibm.com/support/docview.wss?uid=isg1IZ15100
        http://www.ibm.com/support/docview.wss?uid=isg1IZ15057
        http://www.ibm.com/support/docview.wss?uid=isg1IZ15277

        By subscribing, you will receive periodic email alerting you
        to the status of the APAR, and a link to download the fix once
        it becomes available.

    B. FIXES

        Fixes are available.  The fixes can be downloaded via ftp
        from:

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

        The link above is to a tar file containing this signed
        advisory, fix packages, and PGP signatures for each package.
        The fixes below include prerequisite checking. This will
        enforce the correct mapping between the fixes and AIX
        Technology Levels.

        AIX Level          Fix (*.U) and Interim Fix (*.Z)
        -------------------------------------------------------------------
        5.2.0 TL8          IZ15276_08.080305.epkg.Z
        5.2.0 TL9          IZ15276_09.080305.epkg.Z
        5.2.0 TL10         bos.diag.util.5.2.0.108.U
        5.3.0 TL5          IZ15100_05.080305.epkg.Z
        5.3.0 TL6          bos.diag.util.5.3.0.65.U
        5.3.0 TL7          bos.diag.util.5.3.7.1.U
        6.1.0              bos.diag.util.6.1.0.1.U

        To extract the fixes from the tar file:

        tar xvf lsmcode_fix.tar
        cd lsmcode_fix

        Verify you have retrieved the fixes intact:

        The checksums below were generated using the "sum", "cksum",
        "csum -h MD5" (md5sum), and "csum -h SHA1" (sha1sum) commands
        and are as follows:

        sum         filename
        -------------------------------------
        36297   512 bos.diag.util.5.2.0.108.U
        00209   419 bos.diag.util.5.3.0.65.U
        23450   552 bos.diag.util.5.3.7.1.U
        36043    19 bos.diag.util.6.1.0.1.U
        37984    10 IZ15100_05.080305.epkg.Z
        41110     9 IZ15276_08.080305.epkg.Z
        56487    10 IZ15276_09.080305.epkg.Z

        cksum             filename
        -------------------------------------------
        2879294144 524288 bos.diag.util.5.2.0.108.U
        353199196 429056 bos.diag.util.5.3.0.65.U
        1908936478 565248 bos.diag.util.5.3.7.1.U
        45177424 19456 bos.diag.util.6.1.0.1.U
        3796873270 9580 IZ15100_05.080305.epkg.Z
        3435249083 9125 IZ15276_08.080305.epkg.Z
        2615257769 9567 IZ15276_09.080305.epkg.Z

        csum -h MD5 (md5sum)              filename
        -----------------------------------------------------------
        ca29fd06621ce8100f10f66df37f6d2f  bos.diag.util.5.2.0.108.U
        9aafda7247210d664c27face27896b72  bos.diag.util.5.3.0.65.U
        6827187134749ad24b562f7a302a9cab  bos.diag.util.5.3.7.1.U
        ae0c2d2d87b5f73d4f5e24c6fe47e083  bos.diag.util.6.1.0.1.U
        5b9add727a4656f65db8a17c5bf79ace  IZ15100_05.080305.epkg.Z
        86f0f7f18636875e90287623ce88b179  IZ15276_08.080305.epkg.Z
        42711668127921030cd22bf763addc63  IZ15276_09.080305.epkg.Z

        csum -h SHA1 (sha1sum)                    filename
        -------------------------------------------------------------------
        399b55dd40ca366b730392262ae9d7cfce21db63  bos.diag.util.5.2.0.108.U
        1f55f43f6fbf72e6100fc5bed9b21933ba29358a  bos.diag.util.5.3.0.65.U
        f14e275679db28b701e3729cf9421a23c72595da  bos.diag.util.5.3.7.1.U
        9b5d03c75513f14d02df40754c218a3d197c464a  bos.diag.util.6.1.0.1.U
        76443b3c0d66fac27a990486615ce5abe8827489  IZ15100_05.080305.epkg.Z
        7188cbac3c4f7de2ab2c5244a7c148e1aaee43eb  IZ15276_08.080305.epkg.Z
        1d78437ab48208b56ef04857d1ca572819c735e7  IZ15276_09.080305.epkg.Z

        To verify the sums, use the text of this advisory as input to
        csum, md5sum, or sha1sum. For example:

        csum -h SHA1 -i Advisory.asc
        md5sum -c Advisory.asc
        sha1sum -c Advisory.asc

        These sums should match exactly. The PGP signatures in the tar
        file and on this advisory can also be used to verify the
        integrity of the fixes.  If the sums or signatures cannot be
        confirmed, contact IBM AIX Security at
        security-alert@austin.ibm.com and describe the discrepancy.

     C. FIX AND INTERIM FIX INSTALLATION

        IMPORTANT: If possible, it is recommended that a mksysb backup
        of the system be created.  Verify it is both bootable and
        readable before proceeding.

        To preview a fix installation:

        installp -a -d fix_name -p all  # where fix_name is the name of the
                                        # fix package being previewed.
        To install a fix package:

        installp -a -d fix_name -X all  # where fix_name is the name of the  
                                        # fix package being installed.

        Interim fixes have had limited functional and regression
        testing but not the full regression testing that takes place
        for Service Packs; thus, IBM does not warrant the fully
        correct functionality of an interim fix.

        Interim fix management documentation can be found at:

        http://www14.software.ibm.com/webapp/set2/sas/f/aix.efixmgmt/home.html

        To preview an interim fix installation:

        emgr -e ipkg_name -p         # where ipkg_name is the name of the  
                                     # interim fix package being previewed.

        To install an interim fix package:

        emgr -e ipkg_name -X         # where ipkg_name is the name of the  
                                     # interim fix package being installed.

IV. WORKAROUNDS

    There are two workarounds available.

    A. OPTION 1

        Change the permissions of these commands to remove the setuid
        bit using the following commands:

        chmod 500 /usr/sbin/lsmcode

        NOTE: chmod will disable functionality of these commands for
        all users except root.

    B. OPTION 2 (AIX 6.1, AIX 5.3 TL6 and TL7)

        Use the File Permissions Manager (fpm) command to manage
        setuid and setgid programs.

        fpm documentation can be found in the AIX 6 Security Redbook
        at:

        http://www.redbooks.ibm.com/abstracts/sg247430.html

        An fpm level of high, medium, or low will remove the setuid
        bit from the affected commands.  For example:

        fpm -l high -p    # to preview changes
        fpm -l high       # to execute changes

        NOTE: Please review the documentation before execution.  fpm
        will disable functionality of multiple commands for all users
        except root.


V. OBTAINING FIXES

    AIX security fixes can be downloaded from:

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

    AIX fixes can be downloaded from:

        http://www.ibm.com/eserver/support/fixes/fixcentral/main/pseries/aix

    NOTE: Affected customers are urged to upgrade to the latest
    applicable Technology Level and Service Pack.

VI. CONTACT INFORMATION

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

        http://www14.software.ibm.com/webapp/set2/subscriptions/pqvcmjd
 
    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 you can either:

        A. Send an email with "get key" in the subject line to:

            security-alert@austin.ibm.com

        B. Download the key from a PGP Public Key Server. The key ID is:

            0xA6A36CCC

    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.

VII. ACKNOWLEDGMENTS

    IBM discovered and fixed this vulnerability as part of its
    commitment to secure the AIX operating system.

- -----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (AIX)

iD8DBQFH1sBc8lficKajbMwRAqylAKCeZGwD5r6zh6bWzpOn+xwn2+f1FwCeO9GX
BIgZDGKj1Fuu4EyX60TLOUc=
=/TSu
- -----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

iQCVAwUBR9nPcih9+71yA2DNAQJ3tAP+NiFOQBg50vtCXlk3qSOrcoCrx1aG16gR
0rK4t3+LxzsUb9UDpQ3su0xncpruPoXxHI162O6hAFqEbc5RjQEKejWzWTGMs+Lr
1yik1g6l7N3bm/39/hz8av7eBs9R0NrK8ljR7MXRchUFXAp/N/mWIxQCeQvLZ4k1
GNoWrCoTv7M=
=BNE4
-----END PGP SIGNATURE-----