0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
cowboy/src
Loïc Hoguin ab44985a9e
Fix HTTP/2 CVEs
A number of HTTP/2 CVEs were documented recently:

  https://www.kb.cert.org/vuls/id/605641/

This commit, along with a few changes and additions in Cowlib,
fix or improve protection against all of them.

For CVE-2019-9511, also known as Data Dribble, the new option
stream_window_data_threshold can be used to control how little
the DATA frames that Cowboy sends can get.

For CVE-2019-9516, also known as 0-Length Headers Leak, Cowboy
will now simply reject streams containing 0-length header names.

For CVE-2019-9517, also known as Internal Data Buffering, the
backpressure changes were already pretty good at preventing this
issue, but a new option max_connection_buffer_size was added for
even better control over how much memory we are willing to allocate.

For CVE-2019-9512, also known as Ping Flood; CVE-2019-9515, also
known as Settings Flood; CVE-2019-9518, also known as Empty Frame
Flooding; and similar undocumented scenarios, a frame rate limiting
mechanism was added. By default Cowboy will now allow 1000 frames
every 10 seconds. This can be configured via max_received_frame_rate.

For CVE-2019-9514, also known as Reset Flood, another rate limiting
mechanism was added and can be configured via max_reset_stream_rate.
By default Cowboy will do up to 10 stream resets every 10 seconds.

Finally, nothing was done for CVE-2019-9513, also known as Resource
Loop, because Cowboy does not currently implement the HTTP/2
priority mechanism (in parts because these issues were well known
from the start).

Tests were added for all cases except Internal Data Buffering,
which I'm not sure how to test, and Resource Loop, which is not
currently relevant.
2019-10-02 10:44:45 +02:00
..
cowboy.erl Improve a few types, including cowboy_req:req() 2018-10-31 14:11:45 +01:00
cowboy_app.erl Welcome to 2017 2017-01-02 19:36:36 +01:00
cowboy_bstr.erl Welcome to 2017 2017-01-02 19:36:36 +01:00
cowboy_children.erl Handle supervisor calls properly everywhere 2018-03-13 10:40:14 +01:00
cowboy_clear.erl Make Cowboy compatible with upcoming Ranch 2.0 2019-07-16 15:35:45 +02:00
cowboy_clock.erl Don't crash when cowboy_clock is not running 2017-11-01 17:06:37 +00:00
cowboy_compress_h.erl Ensure unknown options are ignored in set_options command 2018-11-16 13:09:01 +01:00
cowboy_constraints.erl Fix more documentation todos 2017-09-04 14:33:44 +02:00
cowboy_handler.erl Bind erlang:get_stacktrace prior to making other calls 2019-04-03 13:54:32 +02:00
cowboy_http.erl Fix closing of connection on response_body_too_small 2019-09-16 11:34:51 +02:00
cowboy_http2.erl Fix HTTP/2 CVEs 2019-10-02 10:44:45 +02:00
cowboy_loop.erl Bind erlang:get_stacktrace prior to making other calls 2019-04-03 13:54:32 +02:00
cowboy_metrics_h.erl Add sendfile support to cowboy_req:stream_body 2018-11-09 17:42:37 +01:00
cowboy_middleware.erl Welcome to 2017 2017-01-02 19:36:36 +01:00
cowboy_req.erl Implement backpressure on cowboy_req:stream_body 2019-09-14 18:21:05 +02:00
cowboy_rest.erl Bind erlang:get_stacktrace prior to making other calls 2019-04-03 13:54:32 +02:00
cowboy_router.erl Add persistent_term support to the router 2019-09-28 15:40:41 +02:00
cowboy_static.erl Improve the cowboy_static consistency across platforms 2019-09-07 12:18:16 +02:00
cowboy_stream.erl Add the set_options stream handler command 2018-11-15 18:53:42 +01:00
cowboy_stream_h.erl Fix HTTP/2 CVEs 2019-10-02 10:44:45 +02:00
cowboy_sub_protocol.erl Allow passing options to sub protocols 2017-02-18 18:26:20 +01:00
cowboy_sup.erl Welcome to 2017 2017-01-02 19:36:36 +01:00
cowboy_tls.erl Make Cowboy compatible with upcoming Ranch 2.0 2019-07-16 15:35:45 +02:00
cowboy_tracer_h.erl Improve a few types, including cowboy_req:req() 2018-10-31 14:11:45 +01:00
cowboy_websocket.erl Bind erlang:get_stacktrace prior to making other calls 2019-04-03 13:54:32 +02:00