From 881c244a4e1b857d883cd105cd035a1fd6ed3fa6 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 Signed-off-by: James M Snell Fixes: https://hackerone.com/reports/446662 CVE-ID: CVE-2020-11080 PR-URL: https://github.com/nodejs-private/node-private/pull/204 Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/207 Reviewed-By: Beth Griggs Reviewed-By: Sam Roberts --- 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 3e836f5dae35b6..c3b4e67f3ea2c6 100644 --- a/doc/api/http2.md +++ b/doc/api/http2.md @@ -1900,6 +1900,9 @@ error will be thrown.