0
0
mirror of https://github.com/nodejs/node.git synced 2024-11-22 15:47:56 +01:00
nodejs/test/cctest
Tobias Nießen a47c2c58ae
tls: fix out-of-bounds read in ClientHelloParser
ClientHelloParser::ParseHeader(data, avail) potentially accesses data
beyond avail bytes because it trusts the client to transmit a valid
frame length. Sending an impossibly small frame length causes the TLS
server to read beyond the buffer provided by the caller.

Guard against this by calling End() on the ClientHelloParser when the
client transmits an impossibly small frame length.

The test is designed to reliable cause a segmentation fault on Linux and
Windows when the buffer overrun occurs, and to trigger a spatial safety
violation when compiled with an address sanitizer enabled or when
running under valgrind.

PR-URL: https://github.com/nodejs/node/pull/44580
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Minwoo Jung <nodecorelab@gmail.com>
2022-09-15 17:27:04 +00:00
..
node_test_fixture.cc
node_test_fixture.h
test_aliased_buffer.cc
test_base64.cc
test_base_object_ptr.cc
test_crypto_clienthello.cc tls: fix out-of-bounds read in ClientHelloParser 2022-09-15 17:27:04 +00:00
test_environment.cc src: expose environment RequestInterrupt api 2022-09-01 17:01:00 +08:00
test_inspector_socket_server.cc
test_inspector_socket.cc
test_js_native_api_v8.cc
test_json_utils.cc
test_linked_binding.cc
test_node_api.cc
test_node_crypto.cc
test_node_postmortem_metadata.cc test: fix DebugSymbolsTest.ReqWrapList on PPC64LE 2022-09-06 10:06:42 +02:00
test_per_process.cc
test_platform.cc
test_report.cc report: expose report public native apis 2022-08-24 17:02:26 +00:00
test_sockaddr.cc
test_traced_value.cc
test_url.cc
test_util.cc