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

                         Note d'Information No. 2006/VULN539
_____________________________________________________________________

DATE                      : 06/12/2006

HARDWARE PLATFORM(S)      : /

OPERATING SYSTEM(S)       : Solaris 8, Solaris 9, Solaris 10, Systems
                                     running Apache 1.3 Web Server.

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

Sun(sm) Alert Notification
      * Sun Alert ID: 102663
      * Synopsis: Security Vulnerabilities in the Apache 1.3 Web Server
        "mod_rewrite" and "mod_imap" Modules
      * Category: Security
      * Product: Solaris 9 Operating System, Solaris 10 Operating System,
        Solaris 8 Operating System
      * BugIDs: 6452767, 6452773
      * Avoidance: Patch, Workaround
      * State: Resolved
      * Date Released: 11-Oct-2006, 04-Dec-2006
      * Date Closed: 04-Dec-2006
      * Date Modified: 04-Nov-2006

1. Impact

    Two security vulnerabilities have been found in the Apache HTTP server
    which affect the Apache 1.3 web server bundled with Solaris 8, 9, and
    10.

    The first issue, a vulnerability in the mod_rewrite Apache HTTP server
    module (CVE-2006-3747), may allow a local or remote unprivileged user
    to execute arbitrary code with the privileges of the Apache 1.3
    process, or cause a Denial of Service (DoS) to the Apache HTTP
    process. The Apache process normally runs as the unprivileged user
    "nobody" (uid 60001).

    The second issue, a Cross Site Scripting (CSS or XSS) vulnerability in
    the mod_imap Apache HTTP server module (CVE-2005-3352), may allow a
    local or remote unprivileged user to steal cookie information, hijack
    sessions, or cause a loss of data privacy between a client and the
    server.

    Additional information regarding these issues is available at:
      * The Change Log for Apache 1.3, at:
        http://www.apache.org/dist/httpd/CHANGES_1.3
      * CERT VU#395412 at: http://www.kb.cert.org/vuls/id/395412
      * CVE-2006-3747 at:
        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2006-3747
      * CVE-2005-3352 at:
        http://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2005-3352

2. Contributing Factors

    These issues can occur in the following releases:

    SPARC Platform
      * Solaris 8 with patches 116973-01 through 116973-04 and
        without patch 116973-05
      * Solaris 9 with patches 113146-03 through 113146-07 and
        without patch 113146-08
      * Solaris 10 without patch 122911-02

    x86 Platform
      * Solaris 8 with patches 116974-01 through 116974-04 and
        without patch 116974-05
      * Solaris 9 with patches 114145-02 through 114145-06 and
        without patch 114145-07
      * Solaris 10 without patch 122912-02

    Note 1: Apache 2.0 ships with Solaris 10 and is impacted by the issues
    referenced in this Sun Alert. For details on the impact to Apache 2.0
    see Sun Alert 102662.

    Note 2: A system is only vulnerable to these issues if the Apache 1.3
    web server has been configured and is running on the system. The
    following command can be executed to determine if the Apache(1M) httpd
    daemon is currently running on the system:
     $ /usr/bin/ps -ef | grep httpd
     nobody 103892 102307 0 Jan 20 ? 0:27 /usr/apache/bin/httpd

    The Solaris bundled Apache 1.3 web server will start automatically at
    boot time if the file "/etc/apache/httpd.conf" exists, and
    "/etc/rc3.d/S50apache" has not been disabled.

    Customers who have built and/or installed a vulnerable version of
    Apache on any version of Solaris are at risk. Refer to
    http://httpd.apache.org/security_report.html for information about
    vulnerable unbundled Apache versions.

    Note 3: The mod_rewrite vulnerability (CVE-2006-3747) is present in
    Apache versions 1.3.28 to 1.3.36 and Solaris 10 bundled Apache 1.3
    versions 1.3.28 to 1.3.35, Solaris 9 bundled Apache 1.3 versions
    1.3.28 to 1.3.35.

    The mod_rewrite vulnerability is addressed in the patches listed in
    the "Resolution" section of this Sun Alert which update Apache 1.3 to
    1.3.36 built Sep 5 2006 for Solaris 10.

    To determine the version and build date of the Solaris bundled Apache
    1.3 web server installed on a host, the following command can be run:
     $ /usr/apache/bin/httpd -v
     Server version: Apache/1.3.31 (Unix)
     Server built:   Jun 30 2005 05:48:24

    Note 4: This issue only affects hosts which make use of the Apache URL
    Rewriting Engine module (mod_rewrite). To determine if this module is
    enabled, a command such as the following can be run for all of the
    configuration files that define the running Apache configuration:
     $ grep RewriteEngine /etc/apache/httpd.conf
     RewriteEngine on

    This option defaults to "off", therefore, if it is not present in the
    configuration files, the host is not affected.

    Note 5: The mod_imap vulnerability (CVE-2005-3352) only affects
    systems which make use of the Apache IMAP module (mod_imap) along with
    image map files. To determine if the mod_imap module is enabled for
    use with image map files, a command such as the following can be run
    for all of the configuration files that define the running Apache
    configuration:
     $ grep 'imap-file map' /etc/apache2/httpd.conf
     #AddHandler imap-file map

    This option is not enabled by default as the initial hash sign '#'
    indicates.

3. Symptoms

    There are no predictable symptoms that would indicate the described
    issues have occurred.

4. Relief/Workaround

    To workaround the mod_rewrite issue (CVE-2006-3747), disable the
    "RewriteEngine" option in the Apache 2 httpd.conf file.  The
    RewriteEngine line should look like:
     RewriteEngine off

    Refer to http://httpd.apache.org/docs/1.3/mod/mod_rewrite.html
    for details.

    To workaround the mod_imap issue (CVE-2005-3352), disable the
    "imap-file map" entry in the Apache 2 httpd.conf file. The "imap-file
    map" entry should look like:
     #AddHandler imap-file map

    Refer to http://httpd.apache.org/docs/1.3/mod/mod_imap.html for
    details.

5. Resolution

    These issues are addressed in the following releases:

    SPARC Platform
      * Solaris 8 with patch 116973-05 or later
      * Solaris 9 with patch 113146-08 or later
      * Solaris 10 with patch 122911-02 or later


    x86 Platform
      * Solaris 8 with patch 116974-05 or later
      * Solaris 9 with patch 114145-07 or later
      * Solaris 10 with patch 122912-02 or later

Change History

    04-Nov-2006:
      * State: Resolved
      * Updated Contributing Factors and Resolution sections

    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-2006 Sun Microsystems, Inc., 4150 Network Circle, Santa
    Clara, CA 95054 U.S.A. All rights reserved

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

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



