Daniel Bevenius
c491ac424b
crypto: remove BIO_set_shutdown
...
I've not been able to find any reason for calling
BIO_set_shutdown(bio, 1). This is done by default for the following
versions of OpenSSL:
https://github.com/openssl/openssl/blob/OpenSSL_1_1_0/
crypto/bio/bio_lib.c#L26
https://github.com/openssl/openssl/blob/OpenSSL_1_0_1/
crypto/bio/bio_lib.c#L90
https://github.com/openssl/openssl/blob/OpenSSL_1_0_2/
crypto/bio/bio_lib.c#L88
https://github.com/openssl/openssl/blob/OpenSSL_1_0_0/
crypto/bio/bio_lib.c#L90
This commit removes the call and the comment.
PR-URL: https://github.com/nodejs/node/pull/17542
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
88c4adfdde
test: remove test case 0 from tls-cnnic-whitelist
...
I looks like this test has not worked as expected since commit
2bc7841d0f ("test: use random ports
where possible"). The test in that commit checked for `CERT_REVOKED`
which was returned by CheckWhitelistedServerCert.
CheckWhitelistedServerCert was later removed in commit
6ee4228c1d ("src: drop CNNIC+StartCom
certificate whitelisting").
I'm suggesting that this test case be removed as I don't think it is
valid anymore.
Backport-PR-URL: https://github.com/nodejs/node/pull/20776
PR-URL: https://github.com/nodejs/node/pull/19767
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-16 11:38:48 +10:00
Daniel Bevenius
64b4ea47ed
test: set clientOpts.port property
...
Currently this test will overwrite the clientOpts object with the port,
instead of setting the port property on the clientOpts object which
looks like the original intent.
Doing this the test fails reporting that the fake-cnnic-root-cert has
expired. This is indeed true:
$ openssl x509 -in test/fixtures/keys/fake-cnnic-root-cert.pem \
-text -noout
Certificate:
...
Validity
Not Before: Jun 9 17:15:16 2015 GMT
Not After : Mar 29 17:15:16 2018 GMT
This commit sets the errorCode to CERT_HAS_EXPIRED. I tried updating the
certificate using test/fixtures/keys/Makefile but then no error is
thrown and I'm currently looking into this.
Backport-PR-URL: https://github.com/nodejs/node/pull/20776
PR-URL: https://github.com/nodejs/node/pull/19767
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
2018-08-16 11:38:48 +10:00
Ruben Bridgewater
98f5b17ee1
errors: make message non-enumerable
...
A error message should always be non-enumerable. This makes sure
that is true for dns errors as well. It also adds another check
in `common.expectsError` to make sure no other regressions are
introduced going forward.
Fixes #19716
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/19719
Fixes: https://github.com/nodejs/node/issues/19716
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Joyee Cheung
9dc1f509f1
errors: move error creation helpers to errors.js
...
This commit moves error creation helpers scattered around
under lib/ into lib/internal/errors.js in the hope of being clearer
about the differences of errors that we throw into the user land.
- Move util._errnoException and util._exceptionWithHostPort
into internal/errors.js and simplify their logic so it's
clearer what the properties these helpers create.
- Move the errnoException helper in dns.js to internal/errors.js
into internal/errors.js and rename it to dnsException. Simplify
it's logic so it no longer calls errnoException and skips
the unnecessary argument checks.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:48 +10:00
Joyee Cheung
66520afdb8
util: skip type checks in internal getSystemErrorName
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18546
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Joyee Cheung
9696bf920f
errors: lazy load util in internal/errors.js
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18358
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Jon Moss <me@jonathanmoss.me >
2018-08-16 11:38:47 +10:00
Joyee Cheung
58b5a610d8
util: implement util.getSystemErrorName()
...
Reimplement uv.errname() as internal/util.getSystemErrorName() to
avoid the memory leaks caused by unknown error codes
and avoid calling into C++ for the error names. Also
expose it as a public API for external use.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/18186
Refs: http://docs.libuv.org/en/v1.x/errors.html#c.uv_err_name
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Joyee Cheung
c39b0020b5
src: expose uv.errmap to binding
...
Add a errno -> [error code, uv error message] map to the uv binding
so the error message can be assembled in the JS layer.
Backport-PR-URL: https://github.com/nodejs/node/pull/19191
PR-URL: https://github.com/nodejs/node/pull/17338
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Joyee Cheung
75b456d0b8
src: do not redefine private for GenDebugSymbols
...
Redefining private breaks any private inheritance in the
included files. We can simply declare GenDebugSymbols()
as friends in related classes to gain the access that we need.
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/18653
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Ben Noordhuis
b7564c48dd
test: fix cctest -Wunused-variable warning
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/18530
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com >
2018-08-16 11:38:47 +10:00
Matheus Marchini
0564454b75
src, test: node internals' postmortem metadata
...
Before these changes, only V8 added postmortem metadata to Node's
binary, limiting the possibilities for debugger's developers to add some
features that rely on investigating Node's internal structures.
These changes are first steps towards empowering debug tools to
navigate Node's internal structures. One example of what can be
achieved with this is shown at nodejs/llnode#122 (a command which prints
information about handles and requests on the queue for a core dump
file). Node postmortem metadata are prefixed with nodedbg_.
This also adds tests to validate if all postmortem metadata are
calculated correctly, plus some documentation on what is postmortem
metadata and a few care to be taken to avoid breaking it.
Ref: https://github.com/nodejs/llnode/pull/122
Ref: https://github.com/nodejs/post-mortem/issues/46
Backport-PR-URL: https://github.com/nodejs/node/pull/19176
PR-URL: https://github.com/nodejs/node/pull/14901
Refs: https://github.com/nodejs/post-mortem/issues/46
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
2018-08-16 11:38:47 +10:00
Andreas Madsen
e602726c68
trace_events: add file pattern cli option
...
Allow the user to specify the filepath for the trace_events log file
using a template string.
Backport-PR-URL: https://github.com/nodejs/node/pull/19145
PR-URL: https://github.com/nodejs/node/pull/18480
Reviewed-By: Ali Ijaz Sheikh <ofrobots@google.com >
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
2018-08-16 11:38:47 +10:00
Anna Henningsen
7cf26e5813
src: remove superfluous check in backtrace_posix.cc
...
The error check doesn't matter because a failure would be ignored
as part of the loop condition.
PR-URL: https://github.com/nodejs/node/pull/16950
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michaël Zasso <targos@protonmail.com >
Reviewed-By: Refael Ackermann <refack@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
2018-08-16 11:38:47 +10:00
Refael Ackermann
3857e108ca
tools: speed up lint-md-build
...
by using package-lock.json
PR-URL: https://github.com/nodejs/node/pull/16945
Fixes: https://github.com/nodejs/node/issues/16628
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Daijiro Wachi <daijiro.wachi@gmail.com >
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com >
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Khaidi Chu <i@2333.moe >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-16 11:38:47 +10:00
Daniel Bevenius
955080f7ee
http2: pass session to DEBUG_HTTP2SESSION2
...
When configure with --debug-http2 --debug-nghttp2 the following
compilation error is generated:
DEBUG_HTTP2SESSION2(this, "fatal error receiving data: %d", ret);
^
../src/node_http2.cc:1690:27:
error: invalid use of 'this' outside of a non-static member function
1 errors generated.
OnStreamReadImpl is static and I think the intention was to pass in the
session variable here.
PR-URL: https://github.com/nodejs/node/pull/20815
Refs: https://github.com/nodejs/node/issues/20806
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-08-16 11:38:47 +10:00
Vse Mozhet Byt
52f5829cdb
doc: fix typo in http2.md
...
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/18872
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-08-16 11:38:47 +10:00
Peter Marton
b1b0486049
http2: add req and res options to server creation
...
Add optional Http2ServerRequest and Http2ServerResponse options
to createServer and createSecureServer. Allows custom req & res
classes that extend the default ones to be used without
overriding the prototype.
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15560
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
2018-08-16 11:38:47 +10:00
Peter Marton
3f78847e0e
http2: add http fallback options to .createServer
...
This adds the Http1IncomingMessage and Http1ServerReponse options
to http2.createServer().
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-08-16 11:38:47 +10:00
Peter Marton
01dc646382
http: add options to http.createServer()
...
This adds the optional options argument to `http.createServer()`.
It contains two options: the `IncomingMessage` and `ServerReponse`
option.
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/15752
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-08-16 11:38:47 +10:00
Rod Vagg
0cae3c3fe5
2018-08-15, Version 8.11.4 'Carbon' (LTS)
...
This is a security release. All Node.js users should consult the
security release summary at:
https://nodejs.org/en/blog/vulnerability/august-2018-security-releases/
for details on patched vulnerabilities.
Fixes for the following CVEs are included in this release:
* CVE-2018-0732 (OpenSSL)
* CVE-2018-12115 (Node.js)
Notable changes:
* buffer: Fix out-of-bounds (OOB) write in `Buffer.write()` for UCS-2 encoding
(CVE-2018-12115)
* deps: Upgrade to OpenSSL 1.0.2p, fixing:
* Client DoS due to large DH parameter (CVE-2018-0732)
* ECDSA key extraction via local side-channel (CVE not assigned)
v8.11.4
2018-08-15 19:27:43 +10:00
Rod Vagg
fc14d812b7
buffer: avoid overrun on UCS-2 string write
...
CVE-2018-12115
Discovered by ChALkeR - Сковорода Никита Андреевич
Fix by Anna Henningsen
Writing to the second-to-last byte with UCS-2 encoding will cause a -1
length to be send to String::Write(), writing all of the provided Buffer
from that point and beyond.
Fixes: https://github.com/nodejs-private/security/issues/203
PR-URL: https://github.com/nodejs-private/node-private/pull/138
2018-08-15 17:49:13 +10:00
Shigeki Ohtsu
3139897ff5
test: fix error messages for OpenSSL-1.0.2p
...
After upgradeing OpenSSL-1.0.2p, test-tls-passphrase.js was failed
due to change of error messages.
Ref: https://github.com/openssl/openssl/commit/18026c0215e942f0ad33a6012cb8cad2f51f841b
PR-URL: https://github.com/nodejs/node/pull/22320
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:16:21 +10:00
Shigeki Ohtsu
8f59838ae7
deps: add -no_rand_screen to openssl s_client
...
In openssl s_client on Windows, RAND_screen() is invoked to initialize
random state but it takes several seconds in each connection.
This added -no_rand_screen to openssl s_client on Windows to skip
RAND_screen() and gets a better performance in the unit test of
test-tls-server-verify.
Do not enable this except to use in the unit test.
Fixes: https://github.com/nodejs/io.js/issues/1461
PR-URL: https://github.com/nodejs/io.js/pull/1836
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
131c5ed438
openssl: fix keypress requirement in apps on win32
...
Reapply b910613792 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
97607f8622
deps: fix asm build error of openssl in x86_win32
...
See
https://mta.openssl.org/pipermail/openssl-dev/2015-February/000651.html
iojs needs to stop using masm and move to nasm or yasm on Win32.
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
2018-08-15 16:16:19 +10:00
Fedor Indutny
46e4917d98
deps: fix openssl assembly error on ia32 win32
...
`x86masm.pl` was mistakenly using .486 instruction set, why `cpuid` (and
perhaps others) are requiring .686 .
Fixes: https://github.com/iojs/io.js/issues/589
PR-URL: https://github.com/iojs/io.js/pull/1389
Reviewed-By: Fedor Indutny <fedor@indutny.com >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Shigeki Ohtsu <ohtsu@iij.ad.jp >
2018-08-15 16:16:19 +10:00
Shigeki Ohtsu
1b93677a81
deps: copy all openssl header files to include dir
...
All symlink files in `deps/openssl/openssl/include/openssl/`
are removed and replaced with real header files to avoid
issues on Windows. Two files of opensslconf.h in crypto and
include dir are replaced to refer config/opensslconf.h.
PR-URL: https://github.com/nodejs/node/pull/22320
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:16:14 +10:00
Shigeki Ohtsu
ebf399473b
deps: upgrade openssl sources to 1.0.2p
...
This replaces all sources of openssl-1.0.2p.tar.gz into
deps/openssl/openssl
PR-URL: https://github.com/nodejs/node/pull/22320
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:15:51 +10:00
Fedor Indutny
0c047c4d9a
test: update certificates and private keys
...
The certificates in test fixtures were set to expire in 999 days since
they were generated. That time has passed, and they have to be reissued.
Bump expiration time to 99999 days for all of them to prevent this from
happening again in near future.
PR-URL: https://github.com/nodejs/node/pull/22184
Fixes: https://github.com/nodejs/node/issues/22182
Reviewed-By: Myles Borins <myles.borins@gmail.com >
Reviewed-By: Gus Caplan <me@gus.host >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Rod Vagg <rod@vagg.org >
2018-08-15 16:14:51 +10:00
Daniel Bevenius
7c6d0f604b
test: update keys/Makefile to clean and build all
...
Currently when running make clean, followed by make not all certificates
get genenerated. In addition there are also the following error messages
related to the startdate in agent8-cert.pem, and agent9-cert.pem:
start date is invalid, it should be YYMMDDHHMMSSZ
After this commit it is possible to perform the following commands:
$ make clean
$ make
$ make test
PR-URL: https://github.com/nodejs/node/pull/19975
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-08-15 16:14:48 +10:00
Evan Lucas
241aa14d98
Working on v8.11.4
...
PR-URL: https://github.com/nodejs-private/node-private/pull/126
2018-06-12 18:33:32 -05:00
Evan Lucas
90ada26279
2018-06-12, Version 8.11.3 (LTS)
...
Notable changes:
* **buffer** (CVE-2018-7167): Fixes Denial of Service vulnerability
where calling Buffer.fill() could hang
* **http2**
* (CVE-2018-7161): Fixes Denial of Service vulnerability by
updating the http2 implementation to not crash under
certain circumstances during cleanup
* (CVE-2018-1000168): Fixes Denial of Service vulnerability
by upgrading nghttp2 to 1.32.0
PR-URL: https://github.com/nodejs-private/node-private/pull/126
v8.11.3
2018-06-12 13:42:01 -05:00
Anna Henningsen
10c5adf19b
test: add Realloc() shrink after reading stream data test
...
This would otherwise keep a lot of unused memory lying around,
and in particular add up to a page per chunk of memory overhead
for network reads, potentially opening a DoS vector if the resulting
`Buffer` objects are kept around indefinitely (e.g. stored in a list
and not concatenated until the socket finishes).
This is to prevent v8.x from becoming susceptible to CVE-2018-7164.
Refs: https://github.com/nodejs-private/security/issues/186
Refs: https://github.com/nodejs/node/commit/7c4b09b24bbe7d6a8cbad256f47b30a101a909ea
PR-URL: https://github.com/nodejs-private/node-private/pull/132
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-12 13:41:04 -05:00
Shigeki Ohtsu
bc91220ca2
test: add tls write error regression test
...
Add a mock TLS socket implementation and a regression test for
the previous commit.
This is to prevent v8.x from becoming susceptible to CVE-2018-7162.
Refs: https://github.com/nodejs-private/security/issues/189
PR-URL: https://github.com/nodejs-private/node-private/pull/131
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Evan Lucas <evanlucas@me.com >
2018-06-11 17:59:36 -05:00
James M Snell
acd11b01c4
test: add regression test for nghttp2 CVE-2018-1000168
...
PR-URL: https://github.com/nodejs-private/node-private/pull/125
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-11 17:59:31 -05:00
James M Snell
e1ff7c3cbc
deps: update to nghttp2 1.32.0
...
This fixes CVE-2018-1000168.
PR-URL: https://github.com/nodejs-private/node-private/pull/125
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-11 17:58:03 -05:00
James M Snell
354f2d97ff
http2: fixup http2stream cleanup and other nits
...
This fixes CVE-2018-7161.
PR-URL: https://github.com/nodejs-private/node-private/pull/123
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-11 17:56:00 -05:00
Сковорода Никита Андреевич
c5a2748d8f
doc: buffer.fill() can zero-fill on invalid input
...
Note that buffer.fill() can zero-fill on some input types if no
valid fill data remains, but does nothing on other input types.
PR-URL: https://github.com/nodejs-private/node-private/pull/119
Fixes: https://github.com/nodejs-private/security/issues/193
Refs: https://github.com/nodejs-private/node-private/pull/118
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-11 17:55:53 -05:00
Сковорода Никита Андреевич
25c5111ca4
src: avoid hanging on Buffer#fill 0-length input
...
Previously, zero-length Buffers and TypedArrays passed as fillers hanged
Buffer#fill and Buffer.from.
This changes those cases when it hanged to a zero-fill instead, which
should be backwards compatible.
This fixes CVE-2018-7167.
PR-URL: https://github.com/nodejs-private/node-private/pull/119
Fixes: https://github.com/nodejs-private/security/issues/193
Refs: https://github.com/nodejs-private/node-private/pull/118
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Evan Lucas <evanlucas@me.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
2018-06-11 17:52:46 -05:00
Myles Borins
e00e36f957
Working on v8.11.3
...
PR-URL: https://github.com/nodejs/node/pull/20478
2018-05-15 17:25:27 -04:00
Myles Borins
faf417ba12
2018-05-15, Version 8.11.2 'Carbon' (LTS)
...
Notable Changes:
deps:
- update node-inspect to 1.11.3 (Jan Krems)
https://github.com/nodejs/node/pull/18354
- update nghttp2 to 1.29.0 (James M Snell)
https://github.com/nodejs/node/pull/17908
http2:
- Sync with current release stream
n-api:
- Sync with current release stream
PR-URL: https://github.com/nodejs/node/pull/20478
v8.11.2
2018-05-15 14:47:56 -04:00
Rod Vagg
ab4809f195
build,win: restore vcbuild TAG functionality
...
--tag needs to be set after `getnodeversion` because TAG is defined in
there when DISTTYPE is not "release", setting it before `getnodeversion`
leads to --tag not being passed down in to `configure` and
src/node_version.h setting it as `-pre` by default. This change restores
the functionality that properly sets the TAG for nightlies, rc builds
and other custom build types.
Ref: https://github.com/nodejs/node/pull/17299
Ref: https://github.com/nodejs/abi-stable-node/issues/289
PR-URL: https://github.com/nodejs/node/pull/18031
Ref: https://github.com/nodejs/node/pull/17299
Ref: https://github.com/nodejs/abi-stable-node/issues/289
Reviewed-By: Richard Lau <riclau@uk.ibm.com >
Reviewed-By: JoãReis <reis@janeasystems.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Gibson Fahnestock <gibfahn@gmail.com >
Reviewed-By: Michael Dawson <michael_dawson@ca.ibm.com >
Reviewed-By: Kyle Farnung <kfarnung@microsoft.com >
2018-05-15 14:01:37 -04:00
Anatoli Papirovski
a52f15efae
timers: fix a bug in error handling
...
When a timeout within a list of timeouts (that consists of only
that specific timeout) throws during its execution, it's possible
for the TimerWrap handle to become shared between both that list
and an unref'd timeout created in the future. This fixes the bug
by extending error handling in timeout execution to check for
whether the current list is empty and if so do cleanup on it.
PR-URL: https://github.com/nodejs/node/pull/20497
Fixes: https://github.com/nodejs/node/issues/19970
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
2018-05-15 14:01:37 -04:00
Pieter Mees
1455b1dec2
http2: emit session connect on next tick
...
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19842
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-05-15 14:01:37 -04:00
Pieter Mees
165d214a54
doc: add Http2Session.connecting property
...
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19842
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Anna Henningsen <anna@addaleax.net >
Reviewed-By: Anatoli Papirovski <apapirovski@mac.com >
2018-05-15 14:01:37 -04:00
Chris Miller
84fa6eb173
doc, http2: add sections for server.close()
...
Clarify current behavior of http2server.close() and
http2secureServer.close() w.r.t. perceived differences
when compared with httpServer.close().
Fixes: https://github.com/nodejs/node/issues/19711
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19802
Reviewed-By: Vse Mozhet Byt <vsemozhetbyt@gmail.com >
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
2018-05-15 14:01:37 -04:00
Trivikram
6d6e2e2454
http2: callback valid check before closing request
...
Do not close the request if callback is not a function, and
throw ERR_INVALID_CALLBACK TypeError
Backport-PR-URL: https://github.com/nodejs/node/pull/19229
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19061
Fixes: https://github.com/nodejs/node/issues/18855
Reviewed-By: Matteo Collina <matteo.collina@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de >
Reviewed-By: Shingo Inoue <leko.noor@gmail.com >
Reviewed-By: Tobias Nießen <tniessen@tnie.de >
2018-05-15 14:01:37 -04:00
Trivikram
4dbdb8ae4e
test: http2 errors on req.close()
...
Backport-PR-URL: https://github.com/nodejs/node/pull/19579
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/18854
Reviewed-By: James M Snell <jasnell@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
2018-05-15 14:01:37 -04:00
Vse Mozhet Byt
1ff3544a4b
doc: guard against md list parsing edge case
...
Backport-PR-URL: https://github.com/nodejs/node/pull/20456
PR-URL: https://github.com/nodejs/node/pull/19647
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com >
Reviewed-By: Rich Trott <rtrott@gmail.com >
Reviewed-By: Chen Gang <gangc.cxy@foxmail.com >
Reviewed-By: Tiancheng "Timothy" Gu <timothygu99@gmail.com >
Reviewed-By: Luigi Pinca <luigipinca@gmail.com >
Reviewed-By: Colin Ihrig <cjihrig@gmail.com >
Reviewed-By: James M Snell <jasnell@gmail.com >
2018-05-15 14:01:37 -04:00