30990 Commits
Author SHA1 Message Date
Beth Griggs 151261efb8 2021-08-11, Version 12.22.5 'Erbium' (LTS)
This is a security release.

Notable Changes:

- CVE-2021-3672/CVE-2021-22931:
    Improper handling of untypical characters in domain names (High)
- CVE-2021-22930:
    Use after free on close http2 on stream canceling (High)
- CVE-2021-22939:
    Incomplete validation of rejectUnauthorized parameter (Low)

PR-URL: https://github.com/nodejs-private/node-private/pull/278
v12.22.5
2021-08-11 02:07:01 +01:00
Beth Griggs 5f947db68c deps: update c-ares to 1.17.2
Refs: https://github.com/c-ares/c-ares/releases/tag/cares-1_17_2

CVE-ID: CVE-2021-3672, CVE-2021-22931
Refs: https://nvd.nist.gov/vuln/detail/CVE-2021-3672
Refs: https://nvd.nist.gov/vuln/detail/CVE-2021-22931
PR-URL: https://github.com/nodejs/node/pull/39724
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-08-11 01:00:08 +01:00
Beth Griggs 42695ea34b deps: reflect c-ares source tree
c-ares refactored their source tree in 1.17.0 which we did not apply in
our update to 1.17.1. This commit syncs our source with their new
structure for easier maintenance going forward. cares.gyp is updated
accordingly.

Refs: https://github.com/c-ares/c-ares/pull/349
Refs: https://github.com/nodejs/node/pull/36207

PR-URL: https://github.com/nodejs/node/pull/39653
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 17:19:20 +01:00
Beth Griggs e4c9156b32 deps: apply missed updates from c-ares 1.17.1
PR-URL: https://github.com/nodejs/node/pull/39653
Refs: https://github.com/c-ares/c-ares/pull/349
Refs: https://github.com/nodejs/node/pull/36207
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-08-09 17:19:15 +01:00
Matteo Collina 1780bbc329 tls: validate "rejectUnauthorized: undefined"
Incomplete validation of rejectUnauthorized parameter (Low)

If the Node.js https API was used incorrectly and "undefined" was passed
in for the "rejectUnauthorized" parameter, no error was returned and
connections to servers with an expired certificate would have been
accepted.

CVE-ID: CVE-2021-22939
Refs: https://nvd.nist.gov/vuln/detail/CVE-2021-22939
Refs: https://hackerone.com/reports/1278254
PR-URL: https://github.com/nodejs-private/node-private/pull/276
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Akshay K <iit.akshay@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-08-09 17:19:09 +01:00
Akshay K 9cd1f53103 http2: add tests for cancel event while client is paused reading
Backport-PR-URL: https://github.com/nodejs/node/pull/39659
PR-URL: https://github.com/nodejs/node/pull/39622
Refs: https://github.com/nodejs/node/pull/39423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-08-09 17:17:36 +01:00
Akshay K 2008c9722f http2: update handling of rst_stream with error code NGHTTP2_CANCEL
The PR updates the handling of rst_stream frames and adds all streams
to the pending list on receiving rst frames with the error code
NGHTTP2_CANCEL.

The changes will remove dependency on the stream state that may allow
bypassing the checks in certain cases. I think a better solution is to
delay streams in all cases if rst_stream is received for the cancel
events.

The rst_stream frames can be received for protocol/connection error as
well it should be handled immediately. Adding streams to the pending
list in such cases may cause errors.

CVE-ID: CVE-2021-22930
Refs: https://nvd.nist.gov/vuln/detail/CVE-2021-22930
Backport-PR-URL: https://github.com/nodejs/node/pull/39659
PR-URL: https://github.com/nodejs/node/pull/39622
Refs: https://github.com/nodejs/node/pull/39423
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-08-09 17:16:32 +01:00
Richard Lau f2f7a454cc Working on v12.22.5
PR-URL: https://github.com/nodejs/node/pull/39500
2021-07-29 15:28:36 +01:00
Richard Lau 2fdf98954d 2021-07-29, Version 12.22.4 'Erbium' (LTS)
This is a security release.

Notable changes:

- CVE-2021-22930: Use after free on close http2 on stream canceling (High)

PR-URL: https://github.com/nodejs/node/pull/39500
v12.22.4
2021-07-29 10:53:19 +01:00
Antoine du Hamel 3e4bc1b0d3 module: fix legacy node specifier resolution to resolve "main" field
PR-URL: https://github.com/nodejs/node/pull/38979
Backport-PR-URL: https://github.com/nodejs/node/pull/39497
Fixes: https://github.com/nodejs/node/issues/32103
Fixes: https://github.com/nodejs/node/issues/38739
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
2021-07-28 23:25:49 +01:00
Darcy Clarke ddc8dde150 deps: upgrade npm to 6.14.14
PR-URL: https://github.com/nodejs/node/pull/39553
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-07-28 19:37:20 +01:00
Akshay K b263f2585a http2: on receiving rst_stream with cancel code add it to pending list
PR-URL: https://github.com/nodejs/node/pull/39423
Backport-PR-URL: https://github.com/nodejs/node/pull/39527
Fixes: https://github.com/nodejs/node/issues/38964
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2021-07-27 19:41:45 +01:00
Danny Sonnenschein e11a862eed deps: update to c-ares 1.17.1
PR-URL: https://github.com/nodejs/node/pull/36207
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-26 17:29:35 +01:00
Richard Lau 39e9cd540f deps: restore minimum ICU version to 65
This modifies 40df0dc so that the changes it applies are only used
if ICU 67 or greater is used, and restores the previous code path for
versions of ICU below 67.

The minimum ICU version was bumped to 67 in Node.js 14.6.0 by
https://github.com/nodejs/node/pull/34356 but the referenced V8
commit[1] isn't on `v14.x-staging` and appears to have been reverted
on V8 8.4[2] so this PR also restores the minimum ICU version to 65.

[1] https://github.com/v8/v8/commit/611e412768a7bc87a20d0315635b0bf76a5bab46
[2] https://github.com/v8/v8/commit/eeccedee1882f1f870b37d12978cd818934b375d

PR-URL: https://github.com/nodejs/node/pull/39068
Backport-PR-URL: https://github.com/nodejs/node/pull/39451
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-07-26 16:30:46 +01:00
Michaël Zasso e459c79b02 deps: V8: cherry-pick 035c305ce776
Original commit message:

    [Intl] call new ListFormatter::createInstance

    The one we currently using is now marked as internal and to be removed
    for 68. Migrating to the style which already avaiable in ICU 67-1.

    Bug: v8:11031
    Change-Id: I668382a2e1b8602ddca02bf231c5008a6c92bf2d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2477751
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Frank Tang <ftang@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70638}

Refs: https://github.com/v8/v8/commit/035c305ce7761f51328b45f1bd83e26aef267c9d

PR-URL: https://github.com/nodejs/node/pull/38497
Backport-PR-URL: https://github.com/nodejs/node/pull/39451
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-07-26 16:30:46 +01:00
Fedor Indutny f552c45676 src: move CHECK in AddIsolateFinishedCallback
`CHECK(it->second)` asserts that we have `PerIsolatePlatformData`
in the `per_isolate_` map, and not just a key with empty value. When
`it == per_isolate_.end()`, however, it means that we don't have the
isolate and the `CHECK(it->second)` is guaranteed to fail then!

PR-URL: https://github.com/nodejs/node/pull/38010
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-07-26 16:30:46 +01:00
Anna Henningsen 30ce0e66ae src: update cares_wrap OpenBSD defines
Move the `#define`s back into `cares_wrap.cc`, as they are part of
the implementation, not the declarations used in `cares_wrap.h`,
and apply the suggestion from
https://github.com/nodejs/node/pull/38572#discussion_r627809407
to make the defines a bit more generic and not check for OpenBSD
specifically.

Refs: https://github.com/nodejs/node/pull/38572

PR-URL: https://github.com/nodejs/node/pull/38670
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-26 16:30:43 +01:00
Guy Bedford b3c698a5d8 deps: update to cjs-module-lexer@1.2.1
PR-URL: https://github.com/nodejs/node/pull/38450
Backport-PR-URL: https://github.com/nodejs/node/pull/39422
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-23 11:42:39 +01:00
Guy Bedford 7d5a2f9588 deps: update to cjs-module-lexer@1.1.1
PR-URL: https://github.com/nodejs/node/pull/37992
Backport-PR-URL: https://github.com/nodejs/node/pull/38003
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
2021-07-23 11:41:16 +01:00
Michaël Zasso 906b43e586 deps: V8: update build dependencies
These updates are necessary to build V8 with recent GN versions.

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:16 +01:00
Michaël Zasso 15b91fa3fa deps: V8: backport 895949419186
Original commit message:

    Add -Wno-string-concatenation to test/cctest:cctest_sources

    v8/test/cctest/interpreter/test-bytecode-generator.cc contains lots of string arrays with intentional concatenation.

    Bug: chromium:1114873
    Change-Id: Ie9d35c3849b5b0a6d1d01b6ce21fb80a320d8736
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2366829
    Commit-Queue: Arthur Eubanks <aeubanks@google.com>
    Reviewed-by: Sathya Gunasekaran  <gsathya@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69625}

Refs: https://github.com/v8/v8/commit/8959494191869ff483927916f9f46eb419784f07

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:16 +01:00
Michaël Zasso 8046daf09f deps: V8: cherry-pick 0b3a4ecf7083
Original commit message:

    Fix implicit conversion loses integer precision warning

    The type of m is long in 64 bits build, and results implicit conversion
    loses integer precision, which was found by improved clang warning
    (-Wshorten-64-to-32)

    Bug: chromium:1124085
    Change-Id: Ic9f22508bd817a06d5c90162b1ac3554a7171529
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2391323
    Commit-Queue: Zequan Wu <zequanwu@google.com>
    Auto-Submit: Zequan Wu <zequanwu@google.com>
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Reviewed-by: Igor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69686}

Refs: https://github.com/v8/v8/commit/0b3a4ecf708334ff20dd5a978c3765e75675b40b

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:16 +01:00
Michaël Zasso f4377b13a6 deps: V8: cherry-pick 7c182bd65f42
Original commit message:

    Fix visiblity rules for configs enforced by the latest GN version.

    Prior versions of GN had a bug (gn:22) where visibility rules
    for configs weren't being enforced properly.

    This CL tweaks the visibility settings of some configs to
    conform to the latest version.

    Change-Id: Ic5d827a1f2774278d3894f67fe52bfca836c0409
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2360909
    Commit-Queue: Dirk Pranke <dpranke@google.com>
    Reviewed-by: Adam Klein <adamk@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#69463}

Refs: https://github.com/v8/v8/commit/7c182bd65f424db19dc3e3d9aca601030af30d7e

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:15 +01:00
Michaël Zasso add7b5b4c2 deps: V8: cherry-pick cc641f6be756
Original commit message:

    Add a simple gclient_args.gni file to V8

    Bug: v8:9914
    Change-Id: I0bae9aadd89876e8505e1388903c86777694ee09
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890100
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Commit-Queue: Maya Lekova <mslekova@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64680}

Refs: https://github.com/v8/v8/commit/cc641f6be7561c166409a04c75199746f8a43ddd

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:15 +01:00
Michaël Zasso a73275f056 deps: V8: cherry-pick 7b3332844212
Original commit message:

    [build] Move split_static_library.gni from Chromium repo

    We'll remove the file from Chromium in a follow up after V8 has rolled
    + 2 days.

    Bug: v8:9911
    Change-Id: I69fe56855f1ba83bec0d39e0fb6acb7e4182c6b7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1897826
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64742}

Refs: https://github.com/v8/v8/commit/7b3332844212d78ee87a9426f3a6f7f781a8fbfa

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:15 +01:00
Michaël Zasso 492b0d6b37 deps: V8: cherry-pick e6f62a41f5ee
Original commit message:

    [build] Remove jumbo build configs

    Bug: chromium:994387
    Change-Id: I7b37a416ce6cc79903fe04923e86af1d0065ac37
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1890090
    Reviewed-by: Maya Lekova <mslekova@chromium.org>
    Reviewed-by: Yang Guo <yangguo@chromium.org>
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#64669}

Refs: https://github.com/v8/v8/commit/e6f62a41f5ee1524eb6fefb4bbb699373f613b1e

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:15 +01:00
Michaël Zasso 2b54156260 deps: V8: cherry-pick 92e6d3317082
Original commit message:

    build: Remove no-op calls to set_sources_assignment_filter

    Chromiun no longer use set_sources_assignment_filter() anywhere in the
    build, so these are no longer needed.

    Bug: chromium:1018739
    Change-Id: I7b33612d925563ebca0d93a7d3c9183d7305b7b0
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2456988
    Reviewed-by: Nico Weber <thakis@chromium.org>
    Commit-Queue: Nico Weber <thakis@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70405}

Refs: https://github.com/v8/v8/commit/92e6d3317082e492ff11fd50a1f3481368f6cafc

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:15 +01:00
Michaël Zasso bbceab4d91 deps: V8: backport 1b1eda0876aa
Original commit message:

    tracing: Update proto library build rule and roll Perfetto

    This patch removes use of the deprecated sources_assignment_filter GN
    feature from gni/proto_library.gni, since the extra descriptor files are
    no longer being generated.

    We also roll Perfetto to match the version used in Chrome and update
    test expectations accordingly.

    Bug: v8:10995
    Change-Id: I65cb3b79feb6e5a7e5c8d99fdb8bf999a6048539
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2454079
    Commit-Queue: Michael Achenbach <machenbach@chromium.org>
    Auto-Submit: Sami Kyöstilä <skyostil@chromium.org>
    Reviewed-by: Peter Marshall <petermarshall@chromium.org>
    Reviewed-by: Michael Achenbach <machenbach@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#70381}

Refs: https://github.com/v8/v8/commit/1b1eda0876aa20bc1dc71caa6baf3a52c0c1540d

PR-URL: https://github.com/nodejs/node/pull/39245
Refs: https://github.com/nodejs/build/issues/2696
Reviewed-By: Richard Lau <rlau@redhat.com>
2021-07-23 11:41:14 +01:00
Milad Fa 93a1a3c5ae deps: V8: cherry-pick 530080c44af2
Original commit message:
```
PPC: Add Power10 to the supported list and enable related features

This CL adds Power10 recognition to Linux, AIX as well as IBMi.

Enabled features include:
MODULO
FPR_GPR_MOV
SIMD
LWSYNC
ISELECT
VSX

Change-Id: Ifc337e6497a3efe9697bcf03063a2b94471f96e9
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2855041
Reviewed-by: Clemens Backes <clemensb@chromium.org>
Reviewed-by: Junliang Yan <junyan@redhat.com>
Reviewed-by: Vasili Skurydzin <vasili.skurydzin@ibm.com>
Commit-Queue: Milad Fa <mfarazma@redhat.com>
Cr-Commit-Position: refs/heads/master@{#74279}
```

Refs: https://github.com/v8/v8/commit/530080c44af254646a3cc3f364aac26b1b5ac10c

PR-URL: https://github.com/nodejs/node/pull/38509
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Ash Cripps <acripps@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-07-23 11:41:14 +01:00
Michaël Zasso 499e56babe build: fix label-pr workflow
PR-URL: https://github.com/nodejs/node/pull/38399
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2021-07-23 11:41:14 +01:00
Phillip Johnsen 98ac3c4108 build: label PRs with GitHub Action instead of nodejs-github-bot
Main goal of using a GitHub Action for labelling PRs has been to move
the mapping between files changed -> label into a configuration file
local to the nodejs/node repository.

Previously any changes to that mapping meant having to grasp the
nodejs/github-bot project, open a PR with the neccessary changes, get
approval from its maintainers before those changes finally got pushed
to production.

The logic involved in using the file paths / label configuration and
resolving the labels to be applied, has been moved into a custom GitHub
Action project: nodejs/node-pr-labeler.

Aside from removing the external dependency the nodejs-github-bot is in
practise, it also reduces the bar for contributors since the resulting
project is a lot smaller and less complex than nodejs/github-bot.

PR-URL: https://github.com/nodejs/node/pull/38301
Fixes: https://github.com/nodejs/github-bot/issues/294
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-07-23 11:41:14 +01:00
Richard Lau 47768f35f4 Working on v12.22.4
PR-URL: https://github.com/nodejs/node/pull/39268
2021-07-05 16:45:11 +01:00
Richard Lau e0a35d7e88 2021-07-05, Version 12.22.3 'Erbium' (LTS)
Notable changes:

Node.js 12.22.2 introduced a regression in the Windows installer on
non-English locales that is being fixed in this release. There is no
need to download this release if you are not using the Windows
installer.

PR-URL: https://github.com/nodejs/node/pull/39268
v12.22.3
2021-07-05 08:16:26 -04:00
Richard Lau 182f86a4d4 win,msi: use localized "Authenticated Users" name
Well known user account names are localized on Windows. Look up the
"Authenticated Users" user by its security identifier to get the
localized name.

PR-URL: https://github.com/nodejs/node/pull/39241
Fixes: https://github.com/nodejs/node/issues/39224
Refs: https://github.com/nodejs/node/commit/e817ba70f56c4bfd5d4a68dce8b165142312e7b6
Refs: https://hackerone.com/reports/1211160
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-07-05 08:00:11 -04:00
Richard Lau d692770fb3 Working on v12.22.3
PR-URL: https://github.com/nodejs-private/node-private/pull/270
2021-07-01 15:32:05 +01:00
Richard Lau 4eb2de9a77 2021-07-01, Version 12.22.2 'Erbium' (LTS)
This is a security release.

Notable changes:

Vulnerabilities fixed:

- **CVE-2021-22918**: libuv upgrade - Out of bounds read (Medium)
- **CVE-2021-22921**: Windows installer - Node Installer Local Privilege Escalation (Medium)
- **CVE-2021-27290**: npm upgrade - ssri Regular Expression Denial of Service (ReDoS) (High)
- **CVE-2021-23362**: npm upgrade - hosted-git-info Regular Expression Denial of Service (ReDoS) (Medium)

PR-URL: https://github.com/nodejs-private/node-private/pull/270
v12.22.2
2021-06-28 16:02:29 +01:00
AkshayK a52790cba0 win,msi: set install directory permission
Explicitly set permission for Windows install directory.

CVE-ID: CVE-2021-22921
Refs: https://hackerone.com/reports/1211160
PR-URL: https://github.com/nodejs-private/node-private/pull/269
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-06-28 11:07:57 +01:00
Ben Noordhuis 623fd1fcb5 deps: uv: cherry-pick 99c29c9c2c9b
Original commit message:

    idna: fix OOB read in punycode decoder

    Reported by Eric Sesterhenn in collaboration with
    Cure53 and ExpressVPN.

    Reported-By: Eric Sesterhenn <eric.sesterhenn@x41-dsec.de>
    PR-URL: https://github.com/libuv/libuv-private/pull/1
    Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
    Reviewed-By: Richard Lau <rlau@redhat.com>

CVE-ID: CVE-2021-22918
Refs: https://hackerone.com/reports/1209681
PR-URL: https://github.com/nodejs-private/node-private/pull/267
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
2021-06-28 11:07:38 +01:00
Ruy Adorno 923b3760f8 deps: upgrade npm to 6.14.13
PR-URL: https://github.com/nodejs/node/pull/38214
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Beth Griggs <bgriggs@redhat.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
2021-06-23 16:18:23 +01:00
Myles Borins 0b7605366d Working on v12.22.2
PR-URL: https://github.com/nodejs/node/pull/38083
2021-04-06 10:41:56 -04:00
Myles Borins fe1c4b45a1 2021-04-06, Version 12.22.1 'Erbium' (LTS)
This is a security release.

Notable changes:

Vulnerabilities fixed:

- **CVE-2021-3450**: OpenSSL - CA certificate check bypass with X509_V_FLAG_X509_STRICT (High)
- **CVE-2021-3449**: OpenSSL - NULL pointer deref in signature_algorithms processing (High)
- **CVE-2020-7774**: npm upgrade - Update y18n to fix Prototype-Pollution (High)

PR-URL: https://github.com/nodejs/node/pull/38083
v12.22.1
2021-04-06 09:28:56 -04:00
Ruy Adorno c947f1a0e1 deps: upgrade npm to 6.14.12
PR-URL: https://github.com/nodejs/node/pull/37918
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
Reviewed-By: Richard Lau <rlau@redhat.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Tobias Nießen <tniessen@tnie.de>
2021-04-04 15:58:04 -04:00
Tobias Nießen 51a753c06f deps: update archs files for OpenSSL-1.1.1k
After an OpenSSL source update, all the config files need to be
regenerated and committed by:
   $ make -C deps/openssl/config
   $ git add deps/openssl/config/archs
   $ git add deps/openssl/openssl/include/crypto/bn_conf.h
   $ git add deps/openssl/openssl/include/crypto/dso_conf.h
   $ git add deps/openssl/openssl/include/openssl/opensslconf.h
   $ git commit

PR-URL: https://github.com/nodejs/node/pull/37939
Refs: https://github.com/nodejs/node/issues/37913
Refs: https://github.com/nodejs/node/pull/37916
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2021-04-04 15:57:37 -04:00
Tobias Nießen c85a519b48 deps: upgrade openssl sources to 1.1.1k
This updates all sources in deps/openssl/openssl by:
    $ cd deps/openssl/
    $ rm -rf openssl
    $ tar zxf ~/tmp/openssl-1.1.1k.tar.gz
    $ mv openssl-1.1.1k openssl
    $ git add --all openssl
    $ git commit openssl

PR-URL: https://github.com/nodejs/node/pull/37939
Refs: https://github.com/nodejs/node/issues/37913
Refs: https://github.com/nodejs/node/pull/37916
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Daniel Bevenius <daniel.bevenius@gmail.com>
2021-04-04 15:57:33 -04:00
Richard Lau 7d488fedca Working on v12.22.1
PR-URL: https://github.com/nodejs/node/pull/37797
2021-03-30 14:50:20 +01:00
Richard Lau 6a5797ba22 2021-03-30, Version 12.22.0 'Erbium' (LTS)
Notable changes

The legacy HTTP parser is runtime deprecated:
- The legacy HTTP parser, selected by the `--http-parser=legacy` command line
option, is deprecated with the pending End-of-Life of Node.js 10.x (where it
is the only HTTP parser implementation provided) at the end of April 2021. It
will now warn on use but otherwise continue to function and may be removed in
a future Node.js 12.x release.
- The default HTTP parser based on llhttp is not affected. By default it is
stricter than the now deprecated legacy HTTP parser. If interoperability with
HTTP implementations that send invalid HTTP headers is required, the HTTP
parser can be started in a less secure mode with the `--insecure-http-parser`
command line option.

ES Modules:
- ES Modules are now considered stable.

node-api:
- Updated to node-api version 8 and added an experimental API to allow
retrieval of the add-on file name.

New API's to control code coverage data collection:
- `v8.stopCoverage()` and `v8.takeCoverage()` have been added.

New API to monitor event loop utilization by Worker threads
- `worker.performance.eventLoopUtilization()` has been added.

PR-URL: https://github.com/nodejs/node/pull/37797
v12.22.0
2021-03-29 14:12:17 +01:00
Gerhard Stoebich 364bf03a68 test: fix races in test-performance-eventlooputil
Fix two races in test-performance-eventlooputil resulting in a flaky
test.

elu1 was capture after start time t from spin look. If OS descides to
reschedule the process after capturing t but before getting elu for
>=50ms the spin loop is actually a nop. elu1 doesn't show this and as
a result elut3 = eventLoopUtilization(elu1) results in
elu3.active === 0.
Moving capturing of t after capturing t, just before the spin look
avoids this.

Similar if OS decides to shedule a different process between getting
the total elu from start and the diff elu showing the spin loop the
check to verify that total active time is long then the spin loop
fails.
Exchanging these statements avoids this race.

PR-URL: https://github.com/nodejs/node/pull/36028
Fixes: https://github.com/nodejs/node/issues/35309
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
2021-03-29 14:10:41 +01:00
Antoine du Hamel 7b0ed4ba92 module: improve support of data: URLs
Add support for loading modules using percent-encoded URLs.

PR-URL: https://github.com/nodejs/node/pull/37392
Backport-PR-URL: https://github.com/nodejs/node/pull/37859
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: Myles Borins <myles.borins@gmail.com>
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
2021-03-29 12:33:56 +01:00
Antoine du Hamel 2da24ac302 lib: add URI handling functions to primordials
PR-URL: https://github.com/nodejs/node/pull/37394
Backport-PR-URL: https://github.com/nodejs/node/pull/37859
Reviewed-By: Zijian Liu <lxxyxzj@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2021-03-29 12:33:50 +01:00
Gabriel Schulhof 93dd799a86 node-api: define version 8
Mark as stable the APIs that define Node-API version 8.

PR-URL: https://github.com/nodejs/node/pull/37652
Backport-PR-URL: https://github.com/nodejs/node/pull/37796
Reviewed-By: Gerhard Stöbich <deb2001-github@yahoo.de>
Reviewed-By: Michael Dawson <midawson@redhat.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2021-03-19 12:08:09 +00:00