0
Fork 0
mirror of https://github.com/ninenines/cowboy.git synced 2025-07-14 12:20:24 +00:00
cowboy/test
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
..
handlers Implement backpressure on cowboy_req:stream_body 2019-09-14 18:21:05 +02:00
static_handler_SUITE_data cowboy_static: Add support for files in EZ archives 2017-01-24 11:36:58 +01:00
ws_autobahn_SUITE_data Don't run long test suites by default 2018-11-20 13:23:59 +01:00
ws_SUITE_data Don't run long test suites by default 2018-11-20 13:23:59 +01:00
compress_SUITE.erl Fix compress buffering tests before OTP 20.1 2018-11-22 10:41:02 +01:00
cover.spec Use ct_run instead of rebar ct for running ct tests 2013-01-04 17:56:49 +01:00
cowboy_ct_hook.erl Welcome to 2017 2017-01-02 19:36:36 +01:00
cowboy_test.erl Update gun_down messages in test suites 2019-10-02 10:10:43 +02:00
examples_SUITE.erl Fix tests for most recent Gun 2018-06-26 10:32:33 +02:00
h2spec_SUITE.erl Fix HTTP/2 CVEs 2019-10-02 10:44:45 +02:00
http2_SUITE.erl Add persistent_term support to the router 2019-09-28 15:40:41 +02:00
http_SUITE.erl Add persistent_term support to the router 2019-09-28 15:40:41 +02:00
loop_handler_SUITE.erl Remove a broken test from loop_handler_SUITE 2018-05-17 13:39:35 +02:00
metrics_SUITE.erl Handle error_response command in cowboy_metrics_h 2018-10-31 15:13:23 +01:00
misc_SUITE.erl Silence the expected set_env_missing error 2018-11-20 16:24:56 +01:00
plain_handler_SUITE.erl Move a old HTTP test cases to new plain_handler test suite 2018-11-21 14:29:36 +01:00
proxy_header_SUITE.erl Fix a test listener not being stopped 2018-10-31 09:25:19 +01:00
req_SUITE.erl Update gun_down messages in test suites 2019-10-02 10:10:43 +02:00
rest_handler_SUITE.erl Move the final old HTTP suite tests and remove it 2018-11-22 00:12:18 +01:00
rfc6585_SUITE.erl Add a test suite for RFC6585 2018-11-03 20:57:51 +01:00
rfc7230_SUITE.erl Move one more old HTTP test case 2018-11-21 14:06:57 +01:00
rfc7231_SUITE.erl Update gun_down messages in test suites 2019-10-02 10:10:43 +02:00
rfc7538_SUITE.erl Add a test suite for RFC7538; update Cowlib to 2.2.0 2018-03-05 16:48:56 +01:00
rfc7540_SUITE.erl Fix HTTP/2 CVEs 2019-10-02 10:44:45 +02:00
rfc8297_SUITE.erl Add a test suite for RFC8297 2018-05-07 13:05:50 +02:00
rfc8441_SUITE.erl Fix and optimize sending of WINDOW_UPDATE frames 2019-09-05 14:07:38 +02:00
security_SUITE.erl Fix HTTP/2 CVEs 2019-10-02 10:44:45 +02:00
static_handler_SUITE.erl Improve the cowboy_static consistency across platforms 2019-09-07 12:18:16 +02:00
stream_handler_SUITE.erl Fix tests failing following Gun update to master 2019-09-06 15:37:42 +02:00
sys_SUITE.erl Fix intermittent failures in sys_SUITE 2019-09-15 10:01:32 +02:00
tracer_SUITE.erl Add nowarn_export_all to all test suites 2017-11-29 16:57:10 +01:00
ws_autobahn_SUITE.erl Don't run long test suites by default 2018-11-20 13:23:59 +01:00
ws_handler_SUITE.erl Update gun_down messages in test suites 2019-10-02 10:10:43 +02:00
ws_SUITE.erl Don't run long test suites by default 2018-11-20 13:23:59 +01:00