From 55e4c72af8a0f08443b5d8fdbd6622c03bf4ab23 Mon Sep 17 00:00:00 2001 From: James M Snell Date: Mon, 27 Apr 2020 10:47:58 -0700 Subject: [PATCH] http2: implement support for max settings entries Adds the maxSettings option to limit the number of settings entries allowed per SETTINGS frame. Default 32 Fixes: https://hackerone.com/reports/446662 CVE-ID: CVE-2020-11080 PR-URL: https://github.com/nodejs-private/node-private/pull/204 Reviewed-By: Matteo Collina --- doc/api/http2.md | 15 ++++++++ lib/internal/http2/util.js | 8 ++++- src/node_http2.cc | 6 ++++ src/node_http2_state.h | 1 + test/parallel/test-http2-max-settings.js | 35 +++++++++++++++++++ .../test-http2-util-update-options-buffer.js | 8 +++-- 6 files changed, 70 insertions(+), 3 deletions(-) create mode 100644 test/parallel/test-http2-max-settings.js diff --git a/doc/api/http2.md b/doc/api/http2.md index 5f130b02e99a36..ffd120c550312f 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1991,6 +1991,9 @@ value only affects new connections to the server, not any existing connections.