From 3948830ce6408be620b09a70bf66158623022af0 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 7f61bc54ebae64..21385af1b5b03c 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -2001,6 +2001,9 @@ value only affects new connections to the server, not any existing connections.