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

Commit 563cab1

Browse files
Eusgoraduh95
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 af867ce commit 563cab1

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)