=====================================================================
                                  CERT-Renater

                       Note d'Information No. 2005/VULN771
_____________________________________________________________________

DATE                      : 16/12/2005

HARDWARE PLATFORM(S)      : IBM.

OPERATING SYSTEM(S)       : AIX 5.1, AIX 5.2 and AIX 5.3.

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

IBM SECURITY ADVISORY

First Issued: Thu Dec 15 09:00:44 CST 2005

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

VULNERABILITY:      A buffer overflow vulnerability in slocal may allow
                     any local user to gain root privileges.

PLATFORMS:          AIX 5.1, 5.2 and 5.3.

SOLUTION:           Apply the APAR, interim fix or workaround as
                     described below.

THREAT:             A local user may gain root privileges.

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


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

A buffer overflow vulnerability in slocal may allow any local user to gain
root privileges. The slocal command is used to perform various actions when
mail is received for a user.

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

# lslpp -L bos.mh

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


II. Impact
==========

A local user may gain root privileges.


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

A. Official Fix

IBM provides the following fixes:

       APAR number for AIX 5.1.0: IY78224 (available approx. 01/30/06)
       APAR number for AIX 5.2.0: IY78225 (available approx. 01/30/06)
       APAR number for AIX 5.3.0: IY78226 (available approx. 01/30/06)

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

B. Interim Fix

Interim fixes are available for AIX 5.1.0, 5.2.0 and 5.3.0. The ifixes can
be downloaded via ftp from:

     ftp://aix.software.ibm.com/aix/efixes/security/slocal_ifix.tar.Z

slocal_ifix.tar.Z is a compressed tarball containing this advisory,
ifix packages and cleartext PGP signatures for each ifix package.


Verify you have retrieved the fixes intact:
- - --------------------------------------------
The interim fixes below are named by using the APAR corresponding to the
release that the fix applies to. The APAR is followed by an underscore and
the maintenance level for the particular AIX release that a fix applies to.

The checksums below were generated using the "sum" and "md5sum" commands
and are as follows:

Filename                  sum           md5
========================================================================
IY78224_09.051030.epkg.Z  40220    42   c87ca388a41a6c6b5463ceaac0281477
IY78225_05.051030.epkg.Z  03039    40   36e272bed902efc571c6081fb2181100
IY78225_06.051030.epkg.Z  33105    40   20085be1b87209c4d8aa947b26ea508e
IY78225_07.051030.epkg.Z  27898    40   f435b1d6289ff3149baab5e871b9a21b
IY78226_01.051030.epkg.Z  23364    40   32cc3c485e9cff7c2174155885a84cae
IY78226_02.051030.epkg.Z  52233    40   b0fe8a00a26e8a2738bb50676861a6de
IY78226_03.051030.epkg.Z  20347    40   27dca198577a8eaf242649738ef2c896

These sums should match exactly. The PGP signatures in the compressed
tarball and on this advisory can also be used to verify the integrity of
the various files they correspond to. If the sums or signatures cannot be
confirmed, double check the command results and the download site
address. If those are OK, contact IBM AIX Security at
security-alert@austin.ibm.com and describe the discrepancy.

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

These ifixes have not been fully regression tested; thus, IBM does not
warrant the fully correct functioning of the ifix.  Customers install the
ifix and operate the modified version of AIX at their own risk.

Interim Installation Instructions:
- - ----------------------------------
These packages use the new Interim Fix Management Solution to install
and manage ifixes. More information can be found at:

      http://techsupport.services.ibm.com/server/aix.efixmgmt

To preview an epkg ifix installation execute the following command:

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

To install an epkg ifix package, execute the following command:

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

The "X" flag will expand any filesystems if required.


C. Workaround

Remote the setuid file mode bit
- - -------------------------------
Removing the setuid root file mode bit will prevent non-root users from
exploiting the vulnerability. To remove the setuid bit, execute the
following command:

# chmod 555 /usr/lib/mh/slocal

Verify that the file mode bits have been updated:

# ls -la /usr/lib/mh/slocal
- - -r-xr-xr-x   1 root     bin           85304 Apr 10 2005  /usr/lib/mh/slocal

sendmail starts slocal if a user's .forward file contains
"/usr/lib/mh/slocal". If slocal is not used, the suidroot bit can be safely
removed.


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

AIX Version 5 APARs can be downloaded from:

      http://www-1.ibm.com/servers/eserver/support/pseries/aixfixes.html

Security related Interim Fixes can be downloaded from:

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


V. Acknowledgments
==================

This vulnerability was reported by David Litchfield of NGS Software.


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

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

         =========================================================
         Les serveurs de référence du CERT-Renater
         http://www.urec.fr/securite
         http://www.cru.fr/securite
         http://www.renater.fr
         =========================================================
         + CERT-RENATER          | tel : 01-53-94-20-44          +
         + 151 bd de l'Hopital   | fax : 01-53-94-20-41          +
         + 75013 Paris           | email: certsvp@renater.fr     +
         =========================================================


