exploit the possibilities
Home Files News &[SERVICES_TAB]About Contact Add New

Apache HTTPD Web Server 2.4.23 Memory Exhaustion

Apache HTTPD Web Server 2.4.23 Memory Exhaustion
Posted Dec 5, 2016
Authored by Naveen Tiwari

Apache HTTPD web server versions 2.4.17 through 2.4.23 did not apply limitations on request headers correctly when experimental module for the HTTP/2 protocol is used to access a resource. The net result is that a server allocates too much memory instead of denying the request. This can lead to memory exhaustion of the server by a properly crafted request.

tags | advisory, web, protocol
advisories | CVE-2016-8740
SHA-256 | ce59b7317dd8f5505d72923540ebf2779ce068b9cee27dfa83ab5f0a3bf93819

Apache HTTPD Web Server 2.4.23 Memory Exhaustion

Change Mirror Download
         Security Advisory - Apache Software Foundation
Apache HTTPD WebServer / httpd.apache.org

Server memory can be exhausted and service denied when HTTP/2 is used

CVE-2016-8740

The Apache HTTPD web server (from 2.4.17-2.4.23) did not apply limitations
on request headers correctly when experimental module for the HTTP/2
protocol is used to access a resource.

The net result is that a the server allocates too much memory instead of denying
the request. This can lead to memory exhaustion of the server by a properly
crafted request.

Background:
- -----------

Apache has limits on the number and length of request header fields. which
limits the amount of memory a client can allocate on the server for a request.

Version 2.4.17 of the Apache HTTP Server introduced an experimental feature:
mod_http2 for the HTTP/2 protocol (RFC7540, previous versions were known as
Google SPDY).

This module is NOT compiled in by default -and- is not enabled by default,
although some distribution may have chosen to do so.

It is generally needs to be enabled in the 'Protocols' line in httpd by
adding 'h2' and/or 'h2c' to the 'http/1.1' only default.

The default distributions of the Apache Software Foundation do not include
this experimental feature.

Details:
- --------

- From version 2.4.17, upto and including version 2.4.23 the server failed
to take the limitations on request memory use into account when providing
access to a resource over HTTP/2. This issue has been fixed
in version 2.4.23 (r1772576).

As a result - with a request using the HTTP/2 protocol a specially crafted
request can allocate memory on the server until it reaches its limit. This can
lead to denial of service for all requests against the server.

Impact:
- -------

This can lead to denial of service for all server resources.
Versions affected:
- ------------------
All versions from 2.4.17 to 2.4.23.

Resolution:
- -----------

For a 2.4.23 version a patch is supplied. This will be included in the
next release.

Mitigations and work arounds:
- -----------------------------

As a temporary workaround - HTTP/2 can be disabled by changing
the configuration by removing h2 and h2c from the Protocols
line(s) in the configuration file.

The resulting line should read:

Protocols http/1.1

Credits and timeline
- --------------------

The flaw was found and reported by Naveen Tiwari <naveen.tiwari@asu.edu>
and CDF/SEFCOM at Arizona State University on 2016-11-22. The issue was
resolved by Stefan Eissing and incorporated in the Apache repository,
ready for inclusion in the next release.

Apache would like to thank all involved for their help with this.


-------------------------
CVE-2016-8740-2.4.23.diff
-------------------------

Patch against 2.4.23 release source:

Index: modules/http2/h2_stream.c
===================================================================
--- modules/http2/h2_stream.c (revision 1771866)
+++ modules/http2/h2_stream.c (working copy)
@@ -322,18 +322,18 @@
HTTP_REQUEST_HEADER_FIELDS_TOO_LARGE);
}
}
- }
-
- if (h2_stream_is_scheduled(stream)) {
- return h2_request_add_trailer(stream->request, stream->pool,
- name, nlen, value, vlen);
- }
- else {
- if (!input_open(stream)) {
- return APR_ECONNRESET;
+
+ if (h2_stream_is_scheduled(stream)) {
+ return h2_request_add_trailer(stream->request, stream->pool,
+ name, nlen, value, vlen);
}
- return h2_request_add_header(stream->request, stream->pool,
- name, nlen, value, vlen);
+ else {
+ if (!input_open(stream)) {
+ return APR_ECONNRESET;
+ }
+ return h2_request_add_header(stream->request, stream->pool,
+ name, nlen, value, vlen);
+ }
}
}

Login or Register to add favorites

File Archive:

July 2024

  • Su
  • Mo
  • Tu
  • We
  • Th
  • Fr
  • Sa
  • 1
    Jul 1st
    27 Files
  • 2
    Jul 2nd
    10 Files
  • 3
    Jul 3rd
    35 Files
  • 4
    Jul 4th
    27 Files
  • 5
    Jul 5th
    18 Files
  • 6
    Jul 6th
    0 Files
  • 7
    Jul 7th
    0 Files
  • 8
    Jul 8th
    28 Files
  • 9
    Jul 9th
    44 Files
  • 10
    Jul 10th
    24 Files
  • 11
    Jul 11th
    25 Files
  • 12
    Jul 12th
    11 Files
  • 13
    Jul 13th
    0 Files
  • 14
    Jul 14th
    0 Files
  • 15
    Jul 15th
    28 Files
  • 16
    Jul 16th
    6 Files
  • 17
    Jul 17th
    34 Files
  • 18
    Jul 18th
    6 Files
  • 19
    Jul 19th
    34 Files
  • 20
    Jul 20th
    0 Files
  • 21
    Jul 21st
    0 Files
  • 22
    Jul 22nd
    19 Files
  • 23
    Jul 23rd
    0 Files
  • 24
    Jul 24th
    0 Files
  • 25
    Jul 25th
    0 Files
  • 26
    Jul 26th
    0 Files
  • 27
    Jul 27th
    0 Files
  • 28
    Jul 28th
    0 Files
  • 29
    Jul 29th
    0 Files
  • 30
    Jul 30th
    0 Files
  • 31
    Jul 31st
    0 Files

Top Authors In Last 30 Days

File Tags

Systems

packet storm

© 2022 Packet Storm. All rights reserved.

Services
Security Services
Hosting By
Rokasec
close