http2: avoid uaf while receiving and sending rst_stream · nodejs/node@7c2df5d · GitHub
Skip to content

Commit 7c2df5d

Browse files
Eusgorjuanarbol
authored andcommitted
http2: avoid uaf while receiving and sending rst_stream
Mark the session as receiving around nghttp2_session_mem_recv() and defer RST_STREAM handling while receive is in progress. This prevents closing a stream while nghttp2 still processes it and avoids heap-use-after-free in nghttp2_session_mem_recv2(). Fixes: #64113 Signed-off-by: Evgeniy Gorbanev <gorbanev.es@gmail.com> PR-URL: #64166 Backport-PR-URL: #65264 Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
1 parent 02cafc4 commit 7c2df5d

2 files changed

Lines changed: 115 additions & 6 deletions

File tree

‎src/node_http2.cc‎

Lines changed: 97 additions & 6 deletions

‎src/node_http2.h‎

Lines changed: 18 additions & 0 deletions

0 commit comments

Comments
 (0)