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

                       Note d'Information No. 2004/VULN458
_____________________________________________________________________

DATE                      : 27/10/2004

HARDWARE PLATFORM(S)      : /

OPERATING SYSTEM(S)       : Solaris 9 running Samba.

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

    Sun(sm) Alert Notification
      * Sun Alert ID: 57664
      * Synopsis: Security Vulnerability in Samba May Allow Unauthorized
        Root Privileges
      * Category: Security
      * Product: Solaris
      * BugIDs: 5080288
      * Avoidance: Workaround
      * State: Committed
      * Date Released: 25-Oct-2004
      * Date Closed:
      * Date Modified:

    1. Impact A buffer overflow in Samba may allow a remote unprivileged
    user the ability to execute arbitrary code with the privileges of
    Super User (typically root) on a Solaris 9 system running as a Samba
    server.

    This issue is referenced in the following document:

      * CAN-2004-0686 at:
        [2]http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0686

    2. Contributing Factors This issue can occur in the following
    releases:

    SPARC Platform

      * Solaris 9

    x86 Platform

      * Solaris 9

    Note: Solaris 7 and Solaris 8 do not include the Samba software and
    are not affected by this issue. Sun does include Samba on the Solaris
    Companion CD for Solaris 8 as an unsupported package which installs to
    "/opt/sfw" and is vulnerable to this issue. Sites using the freeware
    version of Samba from the Solaris Companion CD will need to upgrade to
    a later version from Samba.org.

    This issue only occurs if all of the following conditions are true:

      * The system is configured as a Samba server
      * The version of Samba installed is 2.2.0 through 2.2.9 or 3.0.0
        through 3.0.4
      * The server is configured to use the "hash" mangling method. (This
        is the default configuration for Samba 2.2.x only)

    To determine if a system is configured as a Samba server, use the
    following command to check for the presence of the smb.conf(4) file:

     % ls -l /etc/sfw/smb.conf
     -rw-r--r--   1 root     other      11665 Sep 28 16:37 /etc/sfw/smb.conf


    If the output is similar to that shown above, the system is configured
    as a Samba server.

    To determine the version of Samba installed on a system, the following
    command can be run:

     % /usr/sfw/sbin/smbd -V
     Version 2.2.8a

    To determine if the server is configured to use the "hash" mangling
    method, the following command can be run:

     % grep 'mangling method' /etc/sfw/smb.conf

    If the output is either of the following, then the system is
    vulnerable:

     1. "mangling method = hash"
     2. There is no output AND the Samba version is 2.2.x

    Note: For Samba 2.2.x the default is "mangling method = hash". If this
    has not been changed, there will be no entry in the
    "/etc/sfw/smb.conf" file for "mangling method".

    3. Symptoms There are no predictable symptoms that would indicate the
    described issue has been exploited.

    Solution Summary [3]Top

    4. Relief/Workaround Servers which are configured to use the "hash2"
    mangling method are unaffected by this issue. As a result, this issue
    can be avoided by modifying or adding the following "mangling method"
    line to smb.conf(4):

     mangling method = hash2

    5. Resolution A final resolution is pending completion.

    This Sun Alert notification is being provided to you on an "AS IS"
    basis. This Sun Alert notification may contain information provided by
    third parties. The issues described in this Sun Alert notification may
    or may not impact your system(s). Sun makes no representations,
    warranties, or guarantees as to the information contained herein. ANY
    AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION
    WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
    NON-INFRINGEMENT, ARE HEREBY DISCLAIMED. BY ACCESSING THIS DOCUMENT
    YOU ACKNOWLEDGE THAT SUN SHALL IN NO EVENT BE LIABLE FOR ANY DIRECT,
    INDIRECT, INCIDENTAL, PUNITIVE, OR CONSEQUENTIAL DAMAGES THAT ARISE
    OUT OF YOUR USE OR FAILURE TO USE THE INFORMATION CONTAINED HEREIN.
    This Sun Alert notification contains Sun proprietary and confidential
    information. It is being provided to you pursuant to the provisions of
    your agreement to purchase services from Sun, or, if you do not have
    such an agreement, the Sun.com Terms of Use. This Sun Alert
    notification may only be used for the purposes contemplated by these
    agreements.

    Copyright 2000-2004 Sun Microsystems, Inc., 4150 Network Circle, Santa
    Clara, CA 95054 U.S.A. All rights reserved.

References

    1. http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-26-57664-1#top
    2. http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=CAN-2004-0686
    3. http://sunsolve.sun.com/search/printfriendly.do?assetkey=1-26-57664-1#top

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

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





