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:
authorJames M Snell <jasnell@gmail.com>2020-11-12 23:34:33 +0300
committerBeth Griggs <bgriggs@redhat.com>2021-01-04 20:10:40 +0300
commitb0ac080fa77286dbc92b0beb49d1bb4d69c5784e (patch)
tree1a9a91fc71c4f5b2f66406d4e9bff70dde80d151 /src/stream_base.cc
parent029703100fb33a13a94e32c06d7677ec33801dcc (diff)
src: retain pointers to WriteWrap/ShutdownWrap
Avoids potential use-after-free when wrap req's are synchronously destroyed. CVE-ID: CVE-2020-8265 Fixes: https://github.com/nodejs-private/node-private/issues/227 Refs: https://hackerone.com/bugs?subject=nodejs&report_id=988103 PR-URL: https://github.com/nodejs-private/node-private/pull/23 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Rich Trott <rtrott@gmail.com>
Diffstat (limited to 'src/stream_base.cc')
-rw-r--r--src/stream_base.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/stream_base.cc b/src/stream_base.cc
index 3ad20174600..87781efb0e8 100644
--- a/src/stream_base.cc
+++ b/src/stream_base.cc
@@ -265,7 +265,7 @@ int StreamBase::WriteString(const FunctionCallbackInfo<Value>& args) {
// Immediate failure or success
if (err != 0 || count == 0) {
- SetWriteResult(StreamWriteResult { false, err, nullptr, data_size });
+ SetWriteResult(StreamWriteResult { false, err, nullptr, data_size, {} });
return err;
}