- Sep 19, 2019
-
-
Sam Roberts authored
These tests seem to trigger failures in the entire CI job (not just the test) on AIX. Skip them to see if that helps alleviate spurious failures in node-test-commit-aix (and the upstream PR and commit test jobs). See: - https://github.com/nodejs/build/issues/1820#issuecomment-505998851 - https://github.com/nodejs/build/issues/1847#issuecomment-504210708 PR-URL: https://github.com/nodejs/node/pull/28469 Backport-PR-URL: https://github.com/nodejs/node/pull/29599 Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Daniel Bevenius <daniel.bevenius@gmail.com> Reviewed-By:
Rich Trott <rtrott@gmail.com>
-
- Aug 16, 2019
-
-
Beth Griggs authored
PR-URL: https://github.com/nodejs/node/pull/29152
-
Beth Griggs authored
This is a security release. Notable changes: Node.js, as well as many other implementations of HTTP/2, have been found vulnerable to Denial of Service attacks. See https://github.com/Netflix/security-bulletins/blob/master/advisories/third-party/2019-002.md for more information. Vulnerabilities fixed: * CVE-2019-9511 “Data Dribble”: The attacker requests a large amount of data from a specified resource over multiple streams. They manipulate window size and stream priority to force the server to queue the data in 1-byte chunks. Depending on how efficiently this data is queued, this can consume excess CPU, memory, or both, potentially leading to a denial of service. * CVE-2019-9512 “Ping Flood”: The attacker sends continual pings to an HTTP/2 peer, causing the peer to build an internal queue of responses. Depending on how efficiently this data is queued, this can consume excess CPU, memory, or both, potentially leading to a denial of service. * CVE-2019-9513 “Resource Loop”: The attacker creates multiple request streams and continually shuffles the priority of the streams in a way that causes substantial churn to the priority tree. This can consume excess CPU, potentially leading to a denial of service. * CVE-2019-9514 “Reset Flood”: The attacker opens a number of streams and sends an invalid request over each stream that should solicit a stream of RST_STREAM frames from the peer. Depending on how the peer queues the RST_STREAM frames, this can consume excess memory, CPU,or both, potentially leading to a denial of service. * CVE-2019-9515 “Settings Flood”: The attacker sends a stream of SETTINGS frames to the peer. Since the RFC requires that the peer reply with one acknowledgement per SETTINGS frame, an empty SETTINGS frame is almost equivalent in behavior to a ping. Depending on how efficiently this data is queued, this can consume excess CPU, memory, or both, potentially leading to a denial of service. * CVE-2019-9516 “0-Length Headers Leak”: The attacker sends a stream of headers with a 0-length header name and 0-length header value, optionally Huffman encoded into 1-byte or greater headers. Some implementations allocate memory for these headers and keep the allocation alive until the session dies. This can consume excess memory, potentially leading to a denial of service. * CVE-2019-9517 “Internal Data Buffering”: The attacker opens the HTTP/2 window so the peer can send without constraint; however, they leave the TCP window closed so the peer cannot actually write (many of) the bytes on the wire. The attacker then sends a stream of requests for a large response object. Depending on how the servers queue the responses, this can consume excess memory, CPU, or both, potentially leading to a denial of service. * CVE-2019-9518 “Empty Frames Flood”: The attacker sends a stream of frames with an empty payload and without the end-of-stream flag. These frames can be DATA, HEADERS, CONTINUATION and/or PUSH_PROMISE. The peer spends time processing each frame disproportionate to attack bandwidth. This can consume excess CPU, potentially leading to a denial of service. (Discovered by Piotr Sikora of Google) PR-URL: https://github.com/nodejs/node/pull/29152
-
Anna Henningsen authored
Refs: https://github.com/nodejs/node/pull/27914 Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
nghttp2 has updated its limit for outstanding Ping/Settings ACKs to 1000. This commit allows reverting to the old default of 10000. The associated CVEs are CVE-2019-9512/CVE-2019-9515. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
If we are waiting for the ability to send more output, we should not process more input. This commit a) makes us send output earlier, during processing of input, if we accumulate a lot and b) allows interrupting the call into nghttp2 that processes input data and resuming it at a later time, if we do find ourselves in a position where we are waiting to be able to send more output. This is part of mitigating CVE-2019-9511/CVE-2019-9517. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
If a write to the underlying socket finishes asynchronously, that means that we cannot write any more data at that point without waiting for it to finish. If this happens, we should also not be producing any more input. This is part of mitigating CVE-2019-9511/CVE-2019-9517. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This is intended to mitigate CVE-2019-9518. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Allocating memory upfront comes with overhead, and in particular, `std::vector` implementations do not necessarily return memory to the system when one might expect that (e.g. after shrinking the vector). Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Ignore headers with 0-length names and track memory for headers the way we track it for other HTTP/2 session memory too. This is intended to mitigate CVE-2019-9516. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Limit the number of invalid input frames, as they may be pointing towards a misbehaving peer. The limit is currently set to 1000 but could be changed or made configurable. This is intended to mitigate CVE-2019-9514. [This commit differs from the v12.x one due to the lack of https://github.com/libuv/libuv/commit/ee24ce900e5714c950b248da2b. See the comment in the test for more details.] Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Limit the number of streams that are rejected upon creation. Since each such rejection is associated with an `NGHTTP2_ENHANCE_YOUR_CALM` error that should tell the peer to not open any more streams, continuing to open streams should be read as a sign of a misbehaving peer. The limit is currently set to 100 but could be changed or made configurable. This is intended to mitigate CVE-2019-9514. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Lazily allocate `ArrayBuffer`s for the contents of DATA frames. Creating `ArrayBuffer`s is, sadly, not a cheap operation with V8. This is part of performance improvements to mitigate CVE-2019-9513. Together with the previous commit, these changes improve throughput in the adversarial case by about 100 %, and there is little more that we can do besides artificially limiting the rate of incoming metadata frames (i.e. after this patch, CPU usage is virtually exclusively in libnghttp2). [This backport also applies changes from 83e1b974 and required some manual work due to the lack of `AllocatedBuffer` on v10.x. More work was necessary for v8.x, including copying utilities for `util.h` from more recent Node.js versions.] Refs: https://github.com/nodejs/node/pull/26201 Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
For some JS events, it only makes sense to call into JS when there are listeners for the event in question. The overhead is noticeable if a lot of these events are emitted during the lifetime of a session. To reduce this overhead, keep track of whether any/how many JS listeners are present, and if there are none, skip calls into JS altogether. This is part of performance improvements to mitigate CVE-2019-9513. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
DRY up the `debug()` calls, and in particular, avoid building template strings before we know whether we need to. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
This includes mitigations for CVE-2019-9512/CVE-2019-9515. Backport-PR-URL: https://github.com/nodejs/node/pull/29124 PR-URL: https://github.com/nodejs/node/pull/29122 Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/28448 Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Rich Trott <rtrott@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/27295 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Yongsheng Zhang <zyszys98@gmail.com> Reviewed-By:
Masashi Hirano <shisama07@gmail.com>
-
gengjiawen authored
PR-URL: https://github.com/nodejs/node/pull/26990 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
James M Snell authored
Key new feature: RFC 8441 `:protocol` support PR-URL: https://github.com/nodejs/node/pull/23284 Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
Gus Caplan <me@gus.host> Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com>
-
James M Snell authored
Multiple general improvements to http2 internals for readability and efficiency [This backport applied to v10.x cleanly but had several merge conflicts on v8.x.] PR-URL: https://github.com/nodejs/node/pull/23984 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Ujjwal Sharma <usharma1998@gmail.com> Reviewed-By:
Matteo Collina <matteo.collina@gmail.com>
-
- Apr 17, 2019
-
-
Myles Borins authored
PR-URL: https://github.com/nodejs/node/pull/26933
-
Myles Borins authored
Notable Changes: * n-api: - add API for asynchronous functions (Gabriel Schulhof) https://github.com/nodejs/node/pull/17887 - mark thread-safe function as stable (Gabriel Schulhof) https://github.com/nodejs/node/pull/25556 PR-URL: https://github.com/nodejs/node/pull/26933
-
- Apr 16, 2019
-
-
Anthony Tuininga authored
Improve performance creating strings using N-API by ensuring that the strings are not internalized. Added test cases for latin-1 and utf-16 strings. PR-URL: https://github.com/nodejs/node/pull/26439 Fixes: https://github.com/nodejs/node/issues/26437 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Ruben Bridgewater authored
This fixes a regression for an error case with `assert.rejects` and `assert.doesNotReject`. Fixes: https://github.com/nodejs/node/issues/27185 PR-URL: https://github.com/nodejs/node/pull/27202 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
- Mar 21, 2019
-
-
Yihong Wang authored
For shared lib build, we leave the signal handling for embedding users. In these two test cases: - `parallel/test-process-external-stdio-close-spawn` - `parallel/test-process-external-stdio-close` The pipe is used for stdout and is destroied before child process uses it for logging. So the node executble that uses shared lib build receives SIGPIPE and the child process ends. This change ignores the SIGPIPE in node_main.cc for shared lib case. Refs: https://github.com/nodejs/node/issues/18535 Signed-off-by:
Yihong Wang <yh.wang@ibm.com> PR-URL: https://github.com/nodejs/node/pull/19211 Refs: https://github.com/nodejs/node/issues/18535 Reviewed-By:
Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Signed-off-by:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
John Barboza authored
On AIX the underlying fsync system call returns EBADF on a file descriptor for an open directory. So avoid running fsync on it. PR-URL: https://github.com/nodejs/node/pull/21298 Reviewed-By:
Gireesh Punathil <gpunathi@in.ibm.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Signed-off-by:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
Farazmand authored
Original commit message: PPC: fix Regex addi overflow using add insetad of addi when Operand is more than 16 bits long Change-Id: I7f9452381ed8b321ec71e68d0d90485508b69885 Reviewed-on: https://chromium-review.googlesource.com/c/1430619 Commit-Queue: Junliang Yan <jyan@ca.ibm.com> Reviewed-by:Junliang Yan <jyan@ca.ibm.com> Cr-Commit-Position: refs/heads/master@{#59049} Refs: https://github.com/v8/v8/commit/3cc69194b5ee967d0386fdd47de7a84141fef8cc PR-URL: https://github.com/nodejs/node/pull/25874 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com> Reviewed-By:
George Adams <george.adams@uk.ibm.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
Ben Noordhuis authored
There is a time window between the first and the last step of processing the clienthello event and the SecurePair may have been destroyed during that interval. Fixes: https://github.com/nodejs/node/issues/26428 PR-URL: https://github.com/nodejs/node/pull/26452 Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
Ben Noordhuis authored
This seems to have been broken ever since its introduction 5 years ago in commit 75ea11fc ("tls: introduce asynchronous `newSession`") and no one complained but that's not going to stop me from fixing it anyway because otherwise I can't write a regression test for issue #26428. Refs: https://github.com/nodejs/node/issues/26428 PR-URL: https://github.com/nodejs/node/pull/26452 Fixes: https://github.com/nodejs/node/issues/26428 Reviewed-By:
Sam Roberts <vieuxtech@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Beth Griggs <Bethany.Griggs@uk.ibm.com>
-
Yihong Wang authored
cctest depends on some internal APIs which don't declare `__declspec(dllexport)` and causes build failure when building node as shared lib on Windows. Since we already have good test coverage in static lib, we decide to skip the cctest in shared lib build on Windows. Signed-off-by:
Yihong Wang <yh.wang@ibm.com> Backport-PR-URL: https://github.com/nodejs/node/pull/25758 PR-URL: https://github.com/nodejs/node/pull/21228 Reviewed-By:
Refael Ackermann <refack@gmail.com>
-
Sam Ruby authored
Building on Mac OS/X as follows: ``` ./configure --shared make -j4 test ``` Results in: ``` dyld: Library not loaded: @rpath/libnode.67.dylib Referenced from: /Users/rubys/git/node-shared/out/Release/cctest Reason: image not found make: *** [cctest] Abort trap: 6 ``` This change adds the loader path to the runtime path for the `cctest` executable. Backport-PR-URL: https://github.com/nodejs/node/pull/25681 PR-URL: https://github.com/nodejs/node/pull/23168 Reviewed-By:
Richard Lau <riclau@uk.ibm.com> Reviewed-By:
Refael Ackermann <refack@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Gabriel Schulhof authored
Calling into the engine from a weak callback is unsafe, however, the engine offers a way to attach a second-pass weak callback which gets called when it is safe to call into JavaScript. This moves the point at which the N-API finalize callback gets called to this latter point. Fixes: https://github.com/nodejs/node/issues/25927 PR-URL: https://github.com/nodejs/node/pull/25992 Backport-PR-URL: https://github.com/nodejs/node/pull/26060 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Brian White authored
`http_parser_execute(..., nullptr, 0)` returns either `0` or `1`. The expectation is that no error must be returned if it is `0`, and if it is `1` - a `Error` object must be returned back to user. The introduction of `llhttp` and the refactor that happened during it accidentally removed the error-returning code. This commit reverts it back to its original state. Backport-PR-URL: https://github.com/nodejs/node/pull/25938 Fix: #24585 PR-URL: #24738 Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Julien Gilli authored
Reused parsers can be attached to the domain that corresponds to the active domain when the underlying socket was created, which is not necessarily correct. Instead, we attach parsers to the active domain if there is one when they're reused from the pool. Refs: https://github.com/nodejs/node/issues/25456 PR-URL: https://github.com/nodejs/node/pull/25459 Reviewed-By:
Anna Henningsen <anna@addaleax.net> Reviewed-By:
Ruben Bridgewater <ruben@bridgewater.de>
-
- Mar 20, 2019
-
-
Gabriel Schulhof authored
Fixes: https://github.com/nodejs/node/issues/24249 PR-URL: https://github.com/nodejs/node/pull/25556 Backport-PR-URL: https://github.com/nodejs/node/pull/25648 Reviewed-By:
James M Snell <jasnell@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Kyle Farnung authored
* Move `napi_get_uv_event_loop` into the `NAPI_VERSION >= 2` section * Move `napi_open_callback_scope`, `napi_close_callback_scope`, `napi_fatal_exception`, `napi_add_env_cleanup_hook`, and `napi_remove_env_cleanup_hook` into the `NAPI_VERSION >= 3` section * Added a missing `added` property to `napi_get_uv_event_loop` in the docs * Added a `napiVersion` property to the docs and updated the parser and generator to use it. * Added usage documentation PR-URL: https://github.com/nodejs/node/pull/19962 Backport-PR-URL: https://github.com/nodejs/node/pull/25648 Reviewed-By:
Gabriel Schulhof <gabriel.schulhof@intel.com> Reviewed-By:
Michael Dawson <michael_dawson@ca.ibm.com>
-
Matteo Collina authored
Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23051 Fixes: https://github.com/nodejs/node/issues/22814 Reviewed-By:
Matteo Collina <matteo.collina@gmail.com> Reviewed-By:
Colin Ihrig <cjihrig@gmail.com> Reviewed-By:
Trivikram Kamat <trivikr.dev@gmail.com> Reviewed-By:
Luigi Pinca <luigipinca@gmail.com> Reviewed-By:
George Adams <george.adams@uk.ibm.com> Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Make sure that `process.stdin.write()`, and in particular ending the stream, works. Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By:
James M Snell <jasnell@gmail.com>
-
Anna Henningsen authored
Allow reading from stdio streams that are conventionally associated with process output, since this is only convention. This involves disabling the oddness around closing stdio streams. Its purpose is to prevent the file descriptors 0 through 2 from being closed, since doing so can lead to information leaks when new file descriptors are being opened; instead, not doing anything seems like a more reasonable choice. Fixes: https://github.com/nodejs/node/issues/21203 Backport-PR-URL: https://github.com/nodejs/node/pull/25351 PR-URL: https://github.com/nodejs/node/pull/23053 Reviewed-By:
James M Snell <jasnell@gmail.com>
-