Bug 236182 - CVE-2007-0774 mod_jk overflow flaw
CVE-2007-0774 mod_jk overflow flaw
Status: CLOSED ERRATA
Product: Red Hat Application Server
Classification: Retired
Component: mod_jk (Show other bugs)
2.0
All Linux
urgent Severity urgent
: ---
: ---
Assigned To: Vivek Lakshmanan
impact=critical,reported=20070223,emb...
: Security
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-04-12 07:57 EDT by Mark J. Cox (Product Security)
Modified: 2007-04-12 19:31 EDT (History)
2 users (show)

See Also:
Fixed In Version: RHSA-2007-0164
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-04-12 19:31:58 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


Attachments (Terms of Use)

  None (edit)
Description Mark J. Cox (Product Security) 2007-04-12 07:57:10 EDT
+++ This bug was initially created as a clone of Bug #230045 +++

This issue is embargoed until probably Tue 27th Feb (it may well be Wed).
Please do not release anything until you see an update publically on the
Tomcat site (tomcat.apache.org).

-- VULNERABILITY DETAILS -----------------------------------------------

This vulnerability allows remote attackers to execute arbitrary code on
vulnerable installations of Apache Tomcat Connector. Authentication is not
required to exploit this vulnerability.

The specific flaw exists in the URI handler for the mod_jk.so library.
When parsing a long URL request, the URI worker map routine performs an
unsafe memory copy. This results in a stack overflow condition which can
be leveraged execute arbitrary code.

The vulnerable routine exists in native/common/jk_uri_worker_map.c:

    [...]
    char url[JK_MAX_URI_LEN+1];
    [...]
    for (i = 0; i < strlen(uri); i++)
    if (uri[i] == ';')
    break;
    else
    url[i] = uri[i]; // Overflow if length(uri) > 4095
    url[i] = '\0';
    [...]


This is the commit that added the flaw:

http://svn.apache.org/viewvc/tomcat/connectors/trunk/jk/native/common/jk_uri_worker_map.c?view=diff&r1=424095&r2=424096

Patch from Tomcat security team attached.

-- VERSIONS ------------------------------------------------------------

Please note this issue only affected versions 1.2.19 and 1.2.20 of the
Apache Tomcat JK Web Server Connector and not previous versions.  Tomcat
5.5.20 and Tomcat 4.1.34 included a vulnerable version in their source
packages.  Other versions of Tomcat were not affected.

-- Additional comment from mjc@redhat.com on 2007-02-26 05:00 EST --
Created an attachment (id=148786)
patch from jclere

-- Additional comment from mjc@redhat.com on 2007-03-02 13:27 EST --
Removing embargo, this is now public at:
http://tomcat.apache.org/connectors-doc/miscellaneous/changelog.html
Comment 2 Red Hat Bugzilla 2007-04-12 19:31:58 EDT
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on the solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHSA-2007-0164.html

Note You need to log in before you can comment on or make changes to this bug.