J-Security Center

Title: Apache ap_escape_html Memory Allocation Denial Of Service Vulnerability

Severity: HIGH

Description:

Apache is a freely available Web server for Unix and Linux variants, as well as Microsoft operating systems.

Apache Web Server is reportedly affected by a memory allocation based denial of service vulnerability. This issue is due to a failure of the server to handle malicious HTTP header strings.

The problem presents itself during processing of excessively large HTTP headers of incoming requests. Apparently the length of a header can be of arbitrary size; if a tab or space character precedes the header Apache will allocate memory on the heap for the string, allowing it to be of arbitrary length.

The offending header string is then processed so that all HTML tags are escaped and displayed correctly in a function titled 'ap_escape_html()'. During the escape process signed integer variables are used in a loop to process the excessively long string and memory is allocated with the occurrence of each '<', '>', and '&' character. By creating a string that contains a large number of the offending HTML characters an attacker can force the Apache process to attempt to allocate large amounts of memory.

With an appropriately crafted string an attacker may cause the application to crash when heap-based memory allocation fails due to excessive memory use by the 'ap_escape_html()' function, denying service to legitimate users.

It has been reported that on 64 bit systems with more than 4GB virtual memory this may lead to a heap based buffer overflow; it is not confirmed that this may be leveraged to execute code. This BID will be updated as more information becomes available.

Although Apache version 2.0.49 reportedly affected by this issue, it is likely that earlier versions are affected as well.

Affected Products:

  • Apache Software Foundation Apache 2.0.0
  • Apache Software Foundation Apache 2.0.0 a9
  • Apache Software Foundation Apache 2.0.28
  • Apache Software Foundation Apache 2.0.28 Beta
  • Apache Software Foundation Apache 2.0.32
  • Apache Software Foundation Apache 2.0.35
  • Apache Software Foundation Apache 2.0.36
  • Apache Software Foundation Apache 2.0.37
  • Apache Software Foundation Apache 2.0.38
  • Apache Software Foundation Apache 2.0.39
  • Apache Software Foundation Apache 2.0.40
  • Apache Software Foundation Apache 2.0.41
  • Apache Software Foundation Apache 2.0.42
  • Apache Software Foundation Apache 2.0.43
  • Apache Software Foundation Apache 2.0.44
  • Apache Software Foundation Apache 2.0.45
  • Apache Software Foundation Apache 2.0.46
  • Apache Software Foundation Apache 2.0.47
  • Apache Software Foundation Apache 2.0.48
  • Apache Software Foundation Apache 2.0.49
  • Apple Mac OS X 10.2.8
  • Apple Mac OS X 10.3.4
  • Apple Mac OS X 10.3.5
  • Apple Mac OS X Server 10.1.0
  • Apple Mac OS X Server 10.1.1
  • Apple Mac OS X Server 10.1.2
  • Apple Mac OS X Server 10.1.3
  • Apple Mac OS X Server 10.1.4
  • Apple Mac OS X Server 10.1.5
  • Apple Mac OS X Server 10.2.0
  • Apple Mac OS X Server 10.2.1
  • Apple Mac OS X Server 10.2.2
  • Apple Mac OS X Server 10.2.3
  • Apple Mac OS X Server 10.2.4
  • Apple Mac OS X Server 10.2.5
  • Apple Mac OS X Server 10.2.6
  • Apple Mac OS X Server 10.2.7
  • Apple Mac OS X Server 10.2.8
  • Apple Mac OS X Server 10.3.0
  • Apple Mac OS X Server 10.3.1
  • Apple Mac OS X Server 10.3.2
  • Apple Mac OS X Server 10.3.3
  • Apple Mac OS X Server 10.3.4
  • Apple Mac OS X Server 10.3.5
  • Avaya Converged Communications Server 2.0.0
  • Avaya S8300 R2.0.0
  • Avaya S8500 R2.0.0
  • Avaya S8700 R2.0.0
  • Conectiva Linux 10.0.0
  • Conectiva Linux 9.0.0
  • Gentoo Linux 1.2.0
  • Gentoo Linux 1.4.0
  • Gentoo Linux 1.4.0 _rc1
  • HP HP-UX B.11.00
  • HP HP-UX B.11.11
  • HP HP-UX B.11.11
  • HP HP-UX B.11.22
  • HP HP-UX B.11.23
  • IBM HTTP Server 2.0.42
  • IBM HTTP Server 2.0.42 .1
  • IBM HTTP Server 2.0.42 .2
  • IBM HTTP Server 2.0.47
  • IBM HTTP Server 2.0.47 .1
  • MandrakeSoft Linux Mandrake 10.0.0
  • MandrakeSoft Linux Mandrake 10.0.0 amd64
  • MandrakeSoft Linux Mandrake 9.1.0
  • MandrakeSoft Linux Mandrake 9.1.0 ppc
  • MandrakeSoft Linux Mandrake 9.2.0
  • MandrakeSoft Linux Mandrake 9.2.0 amd64
  • RedHat Desktop 3.0.0
  • RedHat Enterprise Linux AS 3
  • RedHat Enterprise Linux ES 3
  • RedHat Enterprise Linux WS 3
  • RedHat Linux 8.0.0
  • RedHat Linux 9.0.0 i386
  • S.u.S.E. Linux 8.1.0
  • S.u.S.E. Linux Personal 8.2.0
  • S.u.S.E. Linux Personal 9.0.0
  • S.u.S.E. Linux Personal 9.0.0 x86_64
  • S.u.S.E. Linux Personal 9.1.0
  • Terra Soft Solutions Yellow Dog Linux 3.0.0
  • Trustix Secure Enterprise Linux 2.0.0
  • Trustix Secure Linux 1.5.0
  • Trustix Secure Linux 2.0.0
  • Trustix Secure Linux 2.1.0
  • Yellow Dog Linux Yellow Dog Linux 3.0.0

References:

Juniper Networks provides this content via a wide variety of sources and production methods. If notified of errors or omissions in the content of this page, Juniper Networks, at its discretion, will modify or remove the page or leave the content as is, depending on various factors including but not limited to the reputation and authority of the party providing the notification. Please use the contact information displayed elsewhere on this page to report any errors or omissions regarding the content on this page.