[UNIX] Legacy Apache mod_jk2 Buffer Overflow



The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com
- - promotion

The SecuriTeam alerts list - Free, Accurate, Independent.

Get your security news from a reliable source.
http://www.securiteam.com/mailinglist.html

- - - - - - - - -



Legacy Apache mod_jk2 Buffer Overflow
------------------------------------------------------------------------


SUMMARY

IOActive has discovered a buffer overflow in the Host Header field in the
legacy version of the mod_jk2 Apache module (jakarta-tomcat-connectors)
which allows for remote code execution in the context of the Apache
process.

DETAILS

Vulnerable Systems:
* mod_jk2 version 2.0.3-DEV
* F5 BIG-IP version 9.2.3.30

Immune Systems:
* mod_jk2 version 2.0.4-DEV

mod_jk2 versions prior to 2.0.4 are vulnerable to multiple stack overflow
vulnerabilities. Specifically, IOActive has discovered multiple locations
where these vulnerabilities are exploitable via the Host request header in
any given request. These overflows all result in remote code execution
under the user of the running Apache process. Although a legacy module
which is end of life, certain vendors may use this module in their
products rendering them vulnerable to remote exploitation.

Technical Details:
Within the mod_jk2 module, the module registers with Apache a request
handler which parses the entire content of the request, specifically the
Host headers, in order to determine which Tomcat worker to forward the
request to. For example, multiple buffer overflow opportunities exist
within the following code segments:

native2\common\jk_uriMap.c: line ~269
if (port) {
if (vhost) {
if (strchr(vhost, ':'))
strcpy(hostname, vhost);
else
sprintf(hostname, "%s:%d", vhost, port);
}
else
sprintf(hostname, "*:%d", port);
}
else if (vhost)
strcpy(hostname, vhost);


native2\common\jk_uriMap.c: line ~842
char key[1024];

if (!vhost && !port)
return uriMap->vhosts->get(env, uriMap->vhosts, "*");
if (!vhost)
vhost = "*";
sprintf(key, "%s:%d", vhost, port);
return uriMap->vhcache->get(env, uriMap->vhcache, key);

In each of these code segments, exploitable stack overflows on the Host
request header are visible. Additionally, in every circumstance, the
condition occurs when a Hostname is provided within the Host: Header
request which is longer than 1024 characters. Exploitation of these
overflows is considered trivial.

Remediation:
Upgrade to the latest version of the legacy mod_jk2 (mod_jk2 2.0.4) or
migrate to the non-legacy reimplementation of this package, the new
jakarta-tomcat-connectors, called mod_jk.


ADDITIONAL INFORMATION

The information has been provided by <mailto:advisory@xxxxxxxxxxxx>
IOActive Advisories.



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


This bulletin is sent to members of the SecuriTeam mailing list.
To unsubscribe from the list, send mail with an empty subject line and body to: list-unsubscribe@xxxxxxxxxxxxxx
In order to subscribe to the mailing list, simply forward this email to: list-subscribe@xxxxxxxxxxxxxx


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

DISCLAIMER:
The information in this bulletin is provided "AS IS" without warranty of any kind.
In no event shall we be liable for any damages whatsoever including direct, indirect, incidental, consequential, loss of business profits or special damages.



Relevant Pages

  • [NT] HP Radia Notify Daemon Multiple Buffer Overflows
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... RADEXECD process with parameters of a greater length than the buffer used ... structures, executes the target process, and waits for it to terminate. ... text:0040619E call _strcpy; overflow here ...
    (Securiteam)
  • [NT] Winamp ID3v2 Buffer Overflow
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... Winamp is vulnerable to a buffer overflow vulnerability when processing ... control the EAX register, ...
    (Securiteam)
  • [NEWS] McAfee ePolicy Orchestrator Remote Compromise
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... request, UUID, and computer hostname. ... The data that follows first specifies a directory and xml filename, ... +06h DWORD file offset of XML ...
    (Securiteam)
  • [UNIX] BNC IRC Proxy Server Remote Buffer Overflow
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... server under the GPL. ... bouncing off the computer which is running BNC. ... A buffer overflow vulnerability exhibit itself under certain conditions ...
    (Securiteam)
  • [UNIX] UMN Gopher Client Buffer Overflows (Exploit)
    ... The following security advisory is sent to the securiteam mailing list, and can be found at the SecuriTeam web site: http://www.securiteam.com ... The Internet Gopher Client is "based on the UMN Gopher/Gopherd 2.3.1 code. ... past the end of the tmpstrbuffer, making this a stack overflow. ... exploitation more involved and specific to each system. ...
    (Securiteam)