Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnna Henningsen <anna@addaleax.net>2019-08-12 23:55:16 +0300
committerMichaƫl Zasso <targos@protonmail.com>2019-08-15 10:51:38 +0300
commita54af9e1888c01f9a9553eb0e91664a249cabe96 (patch)
tree502fc62203de256a1bc14022b0772119aab8f99c /src/node_http2.h
parent474577cf54c3a5f48dec8ab88bd2d03881e2ac02 (diff)
http2: limit number of invalid incoming frames
Limit the number of invalid input frames, as they may be pointing towards a misbehaving peer. The limit is currently set to 1000 but could be changed or made configurable. This is intended to mitigate CVE-2019-9514. PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'src/node_http2.h')
-rw-r--r--src/node_http2.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/node_http2.h b/src/node_http2.h
index 1739a29b256..fe0c3ffa7aa 100644
--- a/src/node_http2.h
+++ b/src/node_http2.h
@@ -1010,6 +1010,8 @@ class Http2Session : public AsyncWrap, public StreamListener {
// misbehaving peer. This counter is reset once new streams are being
// accepted again.
int32_t rejected_stream_count_ = 0;
+ // Also use the invalid frame count as a measure for rejecting input frames.
+ int32_t invalid_frame_count_ = 0;
void CopyDataIntoOutgoing(const uint8_t* src, size_t src_length);
void ClearOutgoing(int status);