Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 601736 (CVE-2016-8740) - <www-servers/apache-2.4.25: HTTP/2 CONTINUATION denial of service (CVE-2016-8740)
Summary: <www-servers/apache-2.4.25: HTTP/2 CONTINUATION denial of service (CVE-2016-8...
Status: RESOLVED FIXED
Alias: CVE-2016-8740
Product: Gentoo Security
Classification: Unclassified
Component: Vulnerabilities (show other bugs)
Hardware: All Linux
: Normal minor (vote)
Assignee: Gentoo Security
URL: http://seclists.org/fulldisclosure/20...
Whiteboard: B3 [glsa cve]
Keywords:
Depends on: CVE-2016-2161, CVE-2016-8743
Blocks:
  Show dependency tree
 
Reported: 2016-12-05 22:20 UTC by Thomas Deutschmann (RETIRED)
Modified: 2017-01-15 08:19 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Thomas Deutschmann (RETIRED) gentoo-dev 2016-12-05 22:20:16 UTC
From $URL:

         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.
Comment 1 Thomas Deutschmann (RETIRED) gentoo-dev 2016-12-05 22:31:18 UTC
Patch: https://svn.apache.org/viewvc?view=revision&revision=1772579
Comment 2 GLSAMaker/CVETool Bot gentoo-dev 2017-01-02 09:50:52 UTC
CVE-2016-8740 (http://nvd.nist.gov/nvd.cfm?cvename=CVE-2016-8740):
  The mod_http2 module in the Apache HTTP Server 2.4.17 through 2.4.23, when
  the Protocols configuration includes h2 or h2c, does not restrict
  request-header length, which allows remote attackers to cause a denial of
  service (memory consumption) via crafted CONTINUATION frames in an HTTP/2
  request.
Comment 3 GLSAMaker/CVETool Bot gentoo-dev 2017-01-15 08:19:43 UTC
This issue was resolved and addressed in
 GLSA 201701-36 at https://security.gentoo.org/glsa/201701-36
by GLSA coordinator Aaron Bauman (b-man).