Commit Graph
44843 Commits
Author SHA1 Message Date
Thibaud Michaud eae2c27a40 deps: V8: cherry-pick 8e214ec3ec8c
Original commit message:

    [wasm][exnref] Fix catchless try_table

    If the try_table does not have a catch handler, we don't update the
    {current_catch_} index or set the {previous_catch} field of the block
    when we enter it. Therefore also skip the reverse operation when the
    block ends.

    R=clemensb@chromium.org

    Fixed: 372261626
    Change-Id: Ib3a23e32f9d0ec153d6a00733d96b52cf040e8bd
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5920086
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96481}

Refs: https://github.com/v8/v8/commit/8e214ec3ec8cdbdb7f34433a48a52420dee19ba6
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:13 +02:00
Thibaud Michaud a1799a49bb deps: V8: backport 63b8849d73ae
Original commit message:

    [wasm][exnref] Reject non-nullable exnref in JS import/export

    R=jkummerow@chromium.org

    Change-Id: I0ba2deb1a9671d87e76fea7bfe76df9eee56442a
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5920338
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96489}

Refs: https://github.com/v8/v8/commit/63b8849d73ae
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:12 +02:00
Thibaud Michaud a2df2d8731 deps: V8: backport 323942700cfe
Original commit message:

    [wasm][exnref] Accept exnref subtypes for throw_ref

    Only accepting a strict exnref type was incorrect in two cases:
    - the stack-polymorphic case, with the bottom type
    - a noexn param

    R=jkummerow@chromium.org

    Fixed: 332931390
    Change-Id: I80c96a7026f2469e6a3ce54344c2d5e617b78be7
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5904414
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#96387}

Refs: https://github.com/v8/v8/commit/323942700cfe
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:11 +02:00
Thibaud Michaud e3d65c7dca deps: V8: backport 89dc6eab605c
Original commit message:

    [wasm] Add missing type canonicalization for exceptions JS API

    When we encode a JS value in a wasm exception, canonicalize the type
    stored in the tag's signature first. Canonicalize it using the tag's
    original module by storing the instance on the tag object.

    R=jkummerow@chromium.org

    Bug: 346197738
    Change-Id: I7575fd79c792d98e4a11c00b466700f0ab82d164
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5613375
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#94335}

Refs: https://github.com/v8/v8/commit/89dc6eab605c
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:09 +02:00
Jakob Kummerow 5e7db133de deps: V8: backport 910cb91733dc
Original commit message:

    [wasm][liftoff][arm64] Fix DropExceptionValueAtOffset

    We cannot exit the iteration early, we must update all entries
    in the cache state.

    Fixed: 343748812
    Change-Id: I8353acb7bd0edc4b979db92e44d24cb9028fd92b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5596273
    Reviewed-by: Clemens Backes <clemensb@chromium.org>
    Commit-Queue: Clemens Backes <clemensb@chromium.org>
    Auto-Submit: Jakob Kummerow <jkummerow@chromium.org>
    Commit-Queue: Jakob Kummerow <jkummerow@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#94244}

Refs: https://github.com/v8/v8/commit/910cb91733dc
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:08 +02:00
Thibaud Michaud d0c24a28af deps: V8: cherry-pick b8f91e510e0f
Original commit message:

    [wasm][exnref] Update WA.JSTag semantics

    According to the last spec updates:
    - Passing WebAssembly.JSTag to the WebAssembly.Exception constructor is
      not allowed in JS,
    - Throwing an exception with the JSTag in wasm is allowed, but the
      exception should conceptually be "unwrapped" when it exits wasm, and
      JS should observe the raw externref. Instead, we simply throw the
      externref in this case, which has the same observable behavior and is
      consistent with how JSTag has been implemented so far.

    R=ahaas@chromium.org

    Bug: 333067164
    Change-Id: I6f43df8d254dd7450137d99ff7cc9cbffb697663
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5454404
    Reviewed-by: Andreas Haas <ahaas@chromium.org>
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#93398}

Refs: https://github.com/v8/v8/commit/b8f91e510e0f46985b72c7f9afcb0e7fc0659112
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:07 +02:00
Thibaud Michaud d358687824 deps: V8: cherry-pick cf03d55db2a0
Original commit message:

    [wasm][exnref] Fix default value for null exnref

    R=manoskouk@chromium.org

    Bug: 332081797
    Change-Id: Ied777935946c880a78e2011040a4d9ab19a4ddd2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5444544
    Reviewed-by: Manos Koukoutos <manoskouk@chromium.org>
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#93310}

Refs: https://github.com/v8/v8/commit/cf03d55db2a0b7c5ff62e08ff5ad52312f6da0b4
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:05 +02:00
Sébastien Doeraene 67c8b2c349 deps: V8: cherry-pick 692f3d526a38
Original commit message:

    [wasm][exnref] Implement special behavior of WA.JSTag in try_table.

    This commit ports the changes from 4e79015dc28659a8a031f06580e902720b35674c
    to `CatchCase`, i.e., the `try_table` instruction. In addition, it
    implements the same changes in Turboshaft, for which the implementation
    of exceptions initially came from 2c1c14d30c61fa4fa19184369e587cb663bd8580
    and already contained the `JSTag` handling for `CatchException`.

    This commit addresses part of https://issues.chromium.org/issues/333067164
    but not all. Only catching with `try_table` is fixed. `throw` remains
    unchanged.

    Change-Id: I7bad031e28eaf609fb12e7706d0b6a7cc63fa09d
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5435077
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#93303}

Refs: https://github.com/v8/v8/commit/692f3d526a382b3c2f1d979105e777df16855e84
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:04 +02:00
Manos Koukoutos 71e5a59ffd deps: V8: cherry-pick c734674e03f9
Original commit message:

    [wasm][exnref] Fix null value for constant expressions

    Bug: v8:14398
    Change-Id: Ia00d2de97a897d608d6c043b6e267c7d6313a18b
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5402583
    Auto-Submit: Manos Koukoutos <manoskouk@chromium.org>
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#93107}

Refs: https://github.com/v8/v8/commit/c734674e03f9d065312c77016dc61bf046692429
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:02 +02:00
Thibaud Michaud f0dbe81c7b deps: V8: cherry-pick b2f3aea23a01
Original commit message:

    [wasm][exnref] Do not allow exnref at the wasm/JS boundary

    R=mliedtke@chromium.org

    Bug: v8:14398
    Change-Id: I5bb75a83e9de9f838d8e530c77c89aa031f473f9
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5381603
    Reviewed-by: Matthias Liedtke <mliedtke@chromium.org>
    Commit-Queue: Thibaud Michaud <thibaudm@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92944}

Refs: https://github.com/v8/v8/commit/b2f3aea23a015430f02b5241fa9897f8088d9aa7
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:43:01 +02:00
Matthias Liedtke d333f480c3 deps: V8: cherry-pick 5f1342c20b59
Original commit message:

    [wasm][exnref] Fix broken abstract casts

    ref.test, ref.cast, br_on_cast, br_on_cast_fail allow arbitrary heap
    types, so they also allow exnref and noexnref.

    This CL also fixes the missing type checks in the js to wasm wrapper.

    Bug: v8:14398
    Change-Id: Ieefb9a8e99d3d7a4b175db60f55b7fa9a96c5203
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/5372489
    Reviewed-by: Thibaud Michaud <thibaudm@chromium.org>
    Commit-Queue: Matthias Liedtke <mliedtke@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#92867}

Refs: https://github.com/v8/v8/commit/5f1342c20b5932c170c4c113dd4e78f6e25fdad3
PR-URL: https://github.com/nodejs/node/pull/62783
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-05-11 14:42:59 +02:00
Mike McCready 005508d509 doc: remove obsolete Boxstarter automated install
PR-URL: https://github.com/nodejs/node/pull/61785
Backport-PR-URL: https://github.com/nodejs/node/pull/63190
Fixes: https://github.com/nodejs/node/issues/61690
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Tierney Cyren <hello@bnb.im>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Signed-off-by: Mike McCready <66998419+MikeMcC399@users.noreply.github.com>
2026-05-11 14:37:17 +02:00
Richard Lau 5f9bb8ef0c tools: revert tools GHA workflow to ubuntu-latest
The update script for undici requires Docker, which is not available
on `ubuntu-slim`.

PR-URL: https://github.com/nodejs/node/pull/62024
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
2026-05-04 09:46:41 +02:00
Matteo Collina db722725bb deps: use npm undici@six tag in update-undici.sh
Node.js 22 is using Undici 6 rather than the latest version.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/63012
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Сковорода Никита Андреевич <chalkerx@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
2026-05-04 09:42:33 +02:00
Joyee Cheung 5065a0acb3 module: do not invoke resolve hooks twice for imported cjs
Previously the resolve hook can be invoked twice from the
synthetic module evaluation step of imported CJS in the extra
module._load() call that's invoked on the resolved full path.
Add an option to avoid it, since the resolution and loading
has already been done before.

PR-URL: https://github.com/nodejs/node/pull/61529
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Fixes: https://github.com/nodejs/node/issues/57125
Refs: https://github.com/nodejs/node/issues/55808
Refs: https://github.com/nodejs/node/issues/56241
Reviewed-By: Jacob Smith <jacob@frende.me>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:26 +02:00
Joyee Cheung 9a2e21305d module: do not wrap module._load when tracing is not enabled
This prevents clobbering the stack traces with another internal
frame and removes the unnecessary hoops from step-debugging.

PR-URL: https://github.com/nodejs/node/pull/61479
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Stephen Belanger <admin@stephenbelanger.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:23 +02:00
Joyee Cheung b9240bc063 module: fix sync resolve hooks for require with node: prefixes
Previously, when require()-ing builtins with the node: prefix,
the sync resolve hooks were not properly invoked, and load hooks
could not override the builtin's format. This fixes the
handling and enables redirecting prefixed built-ins to on-disk
files and overriding them with other module types via hooks.

PR-URL: https://github.com/nodejs/node/pull/61088
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Fixes: https://github.com/nodejs/node/issues/60005
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:21 +02:00
Joyee Cheung 2e91b28aaf module: handle null source from async loader hooks in sync hooks
This relaxes the validation in sync hooks so that it accepts
the quirky nullish source returned by the default step of the
async loader when the module being loaded is CommonJS.
When there are no customization hooks registered, a saner
synchronous default load step is used to use a property
instead of a reset nullish source to signify that the module
should go through the CJS monkey patching routes and reduce
excessive reloading from disk.

PR-URL: https://github.com/nodejs/node/pull/59929
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Fixes: https://github.com/nodejs/node/issues/59384
Fixes: https://github.com/nodejs/node/issues/57327
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/dygabo/load_module_test
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:19 +02:00
Marco Ippolito 39147c154e module: use sync cjs when importing cts
PR-URL: https://github.com/nodejs/node/pull/60072
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Fixes: https://github.com/nodejs/node/issues/59963
Reviewed-By: Yongsheng Zhang <zyszys98@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:16 +02:00
Joyee Cheung 12a2462b2c module: only put directly require-d ESM into require.cache
This reduces the impact of
https://redirect.github.com/nodejs/node/pull/59679
by delaying the require.cache population of ESM until they
are directly required. After that, it's necessary for them
to be in the cache to maintain correctness.

PR-URL: https://github.com/nodejs/node/pull/59874
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Refs: https://github.com/nodejs/node/issues/59868
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:12 +02:00
Joyee Cheung 1769d74613 esm: populate separate cache for require(esm) in imported CJS
Otherwise if the ESM happens to be cached separately by the ESM loader
before it gets loaded with `require(esm)` from within an imported
CJS file (which uses a re-invented require() with a couple of quirks,
including a separate cache), it won't be able to load the esm properly
from the cache.

PR-URL: https://github.com/nodejs/node/pull/59679
Backport-PR-URL: https://github.com/nodejs/node/pull/62029
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/nodejs/node/issues/52697
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Fixes: https://github.com/nodejs/node/issues/61801
2026-04-27 18:03:09 +02:00
RafaelGSS dbabdf751c Working on v22.22.3
PR-URL: https://github.com/nodejs-private/node-private/pull/844
2026-03-24 17:05:48 -03:00
Antoine du Hamel 2645dc7372 2026-03-24, Version 22.22.2 'Jod' (LTS)
This is a security release.

Notable changes:

build,test,deps:
  * (CVE-2026-21717) test array index hash collision
crypto:
  * (CVE-2026-21713) use timing-safe comparison in Web Cryptography HMAC
http:
  * (CVE-2026-21710) use null prototype for headersDistinct/trailersDistinct
permission:
  * (CVE-2026-21716) include permission check on lib/fs/promises
  * (CVE-2026-21715) add permission check to realpath.native
src:
  * (CVE-2026-21714) handle NGHTTP2_ERR_FLOW_CONTROL error code
tls:
  * (CVE-2026-21637) wrap SNICallback invocation in try/catch

PR-URL: https://github.com/nodejs-private/node-private/pull/844
v22.22.2
2026-03-23 20:13:40 +01:00
Joyee Cheung 30a3ab11e2 deps: V8: cherry-pick aac14dd95e5b
Original commit message:

    [string] add 3rd round to seeded array index hash

    Since we already have 3 derived secrets, and arithmetics are
    relatively cheap, add a 3rd round to the xorshift-multiply
    seeding scheme. This brings the bias from ~3.4 to ~0.4.

    Bug: 477515021
    Change-Id: I1ef48954bcee8768d8c90db06ac8adb02f06cebf
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7655117
    Reviewed-by: Chengzhong Wu <cwu631@bloomberg.net>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105824}

Refs: https://github.com/v8/v8/commit/aac14dd95e5be0d487eba6bcdaf9cef4f8bd806c
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/833
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/809
CVE-ID: CVE-2026-21717
2026-03-23 20:06:35 +01:00
Joyee Cheung 6f14ee5101 build,test: test array index hash collision
This enables v8_enable_seeded_array_index_hash and add a test for it.

Fixes: https://hackerone.com/reports/3511792
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/833
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/809
CVE-ID: CVE-2026-21717
2026-03-23 20:06:35 +01:00
Joyee CheungandJoyee Cheung e3f4d6a42e deps: V8: backport 1361b2a49d02
Original commit message:

    [strings] improve array index hash distribution

    Previously, the hashes stored in a Name's raw_hash_field for decimal
    numeric strings (potential array indices) consist of the literal
    integer value along with the length of the string. This means
    consecutive numeric strings can have consecutive hash values, which
    can lead to O(n^2) probing for insertion in the worst case when e.g.
    a non-numeric string happen to land in the these buckets.

    This patch adds a build-time flag v8_enable_seeded_array_index_hash that
    scrambles the 24-bit array-index value stored in a Name's raw_hash_field
    to improve the distribution.

    x ^= x >> kShift; x = (x * m1) & kMask;    // round 1
    x ^= x >> kShift; x = (x * m2) & kMask;    // round 2
    x ^= x >> kShift;                          // finalize

    To decode, apply the same steps with the modular inverses of m1 and m2
    in reverse order.

    x ^= x >> kShift; x = (x * m2_inv) & kMask;    // round 1
    x ^= x >> kShift; x = (x * m1_inv) & kMask;    // round 2
    x ^= x >> kShift;                              // finalize

    where kShift = kArrayIndexValueBits / 2, kMask = kArrayIndexValueMask,
    m1, m2 (both odd) are the lower bits of the rapidhash secrets, m1_inv,
    m2_inv (modular inverses) are precomputed modular inverse of m1 and m2.
    The pre-computed values are appended to the hash_seed ByteArray in
    ReadOnlyRoots and accessed in generated code to reduce overhead.
    In call sites that don't already have access to the seeds, we read them
    from the current isolate group/isolate's read only roots.

    To consolidate the code that encode/decode these hashes, this patch
    adds MakeArrayIndexHash/DecodeArrayIndexFromHashField in C++ and CSA
    that perform seeding/unseeding if enabled, and updates places where
    encoding/decoding of array index is needed to use them.

    Bug: 477515021
    Change-Id: I350afe511951a54c4378396538152cc56565fd55
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7564330
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#105596}

Refs: https://github.com/v8/v8/commit/1361b2a49d020a718dc5495713eae0fa67d697b9
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/833
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/809
CVE-ID: CVE-2026-21717
2026-03-22 17:04:57 +01:00
Joyee CheungandJoyee Cheung 7dc00fa5f4 deps: V8: backport 185f0fe09b72
Original commit message:

    [numbers] Refactor HashSeed as a lightweight view over ByteArray

    Instead of copying the seed and secrets into a struct with value
    fields, HashSeed now stores a pointer pointing either into the
    read-only ByteArray, or the static default seed for off-heap
    HashSeed::Default() calls. The underlying storage is always
    8-byte aligned so we can cast it directly into a struct.

    Change-Id: I5896a7f2ae24296eb4c80b757a5d90ac70a34866
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7609720
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: Joyee Cheung <joyee@igalia.com>
    Cr-Commit-Position: refs/heads/main@{#105531}

Refs: https://github.com/v8/v8/commit/185f0fe09b72fb869fdcf9a89f40ff2295436bca
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/833
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/809
CVE-ID: CVE-2026-21717
2026-03-22 17:04:56 +01:00
snekandJoyee Cheung 076acd052d deps: V8: backport 0a8b1cdcc8b2
Original commit message:

    implement rapidhash secret generation

    Bug: 409717082
    Change-Id: I471f33d66de32002f744aeba534c1d34f71e27d2
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/6733490
    Reviewed-by: Leszek Swirski <leszeks@chromium.org>
    Commit-Queue: snek <snek@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#101499}

Refs: https://github.com/v8/v8/commit/0a8b1cdcc8b243c62cf045fa8beb50600e11758a
Co-authored-by: Joyee Cheung <joyeec9h3@gmail.com>
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/833
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/809
CVE-ID: CVE-2026-21717
2026-03-22 17:04:56 +01:00
RafaelGSS 06fc3436f6 permission: include permission check on lib/fs/promises
PR-URL: https://github.com/nodejs-private/node-private/pull/795
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-21716
2026-03-22 17:04:56 +01:00
RafaelGSS db48d9c675 permission: add permission check to realpath.native
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/794
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
CVE-ID: CVE-2026-21715
2026-03-22 17:04:56 +01:00
RafaelGSS 2a6105a63b src: handle NGHTTP2_ERR_FLOW_CONTROL error code
Refs: https://hackerone.com/reports/3531737
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/832
CVE-ID: CVE-2026-21714
2026-03-22 17:04:56 +01:00
Filip Skokan 52a52ef619 crypto: use timing-safe comparison in Web Cryptography HMAC
Use `CRYPTO_memcmp` instead of `memcmp` in `HMAC`
Web Cryptography algorithm implementations.

Ref: https://hackerone.com/reports/3533945
Backport-PR-URL: https://github.com/nodejs-private/node-private/pull/830
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/822
CVE-ID: CVE-2026-21713
2026-03-22 17:04:56 +01:00
Matteo Collina 91b970886f tls: wrap SNICallback invocation in try/catch
Wrap the owner._SNICallback() invocation in loadSNI() with try/catch
to route exceptions through owner.destroy() instead of letting them
become uncaught exceptions. This completes the fix from CVE-2026-21637
which added try/catch protection to callALPNCallback,
onPskServerCallback, and onPskClientCallback but missed loadSNI().

Without this fix, a remote unauthenticated attacker can crash any
Node.js TLS server whose SNICallback may throw on unexpected input
by sending a single TLS ClientHello with a crafted server_name value.

Fixes: https://hackerone.com/reports/3556769
Refs: https://hackerone.com/reports/3473882
CVE-ID: CVE-2026-21637

PR-URL: https://github.com/nodejs-private/node-private/pull/819
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2026-21637
2026-03-22 17:04:52 +01:00
Matteo Collina a2fe9fd81a http: use null prototype for headersDistinct/trailersDistinct
Use { __proto__: null } instead of {} when initializing the
headersDistinct and trailersDistinct destination objects.

A plain {} inherits from Object.prototype, so when a __proto__
header is received, dest["__proto__"] resolves to Object.prototype
(truthy), causing _addHeaderLineDistinct to call .push() on it,
which throws an uncaught TypeError and crashes the process.

Ref: https://hackerone.com/reports/3560402
PR-URL: https://github.com/nodejs-private/node-private/pull/821
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
CVE-ID: CVE-2026-21710
2026-03-22 16:28:36 +01:00
Richard Lau 963c60a951 deps: V8: override depot_tools version
For compatibility with Python >= 3.12 we need a newer version of
`depot_tools` than is used for the older versions of V8.

PR-URL: https://github.com/nodejs/node/pull/62344
Refs: https://github.com/nodejs/build/pull/4278
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-03-22 13:05:19 +01:00
npm CLI robot a688117d5d deps: upgrade npm to 10.9.7
PR-URL: https://github.com/nodejs/node/pull/62330
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-03-20 18:27:07 +01:00
Matteo Collina 859c8c761b deps: update undici to v6.24.1
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/62285
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-03-18 13:22:28 +01:00
npm CLI robot d5ed384a2f deps: upgrade npm to 10.9.6
PR-URL: https://github.com/nodejs/node/pull/62215
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Jordan Harband <ljharb@gmail.com>
2026-03-16 20:46:59 +01:00
73deff77c1 lib: backport _tls_common and _tls_wrap refactors
This is the same as the original change, minus the `process.emitWarning`
calls and unit tests that expect the deprecation warnings.

Original commit message:
    lib: deprecate _tls_common and _tls_wrap

    runtime deprecate the _tls_common and _tls_wrap
    modules, users should use nust node:tls insteal
    and internally internal/tls/commond and
    internal/tls/wrap should be used instead

PR-URL: https://github.com/nodejs/node/pull/57643
Backport-PR-URL: https://github.com/nodejs/node/pull/62231
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Co-authored-by: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <targos@protonmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Juan José Arboleda <soyjuanarbol@gmail.com>
2026-03-16 17:29:52 +01:00
Marco Ippolito bb73c10b32 Working on v22.22.2
PR-URL: https://github.com/nodejs/node/pull/61947
2026-03-05 15:08:44 +01:00
Antoine du Hamel b4acf0c939 2026-03-05, Version 22.22.1 'Jod' (LTS)
build:
  * test on Python 3.14 (Christian Clauss) https://github.com/nodejs/node/pull/59983
cli:
  * mark `--heapsnapshot-near-heap-limit` as stable (Joyee Cheung) https://github.com/nodejs/node/pull/60956
crypto:
  * update root certificates to NSS 3.119 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/61419
  * update root certificates to NSS 3.117 (Node.js GitHub Bot) https://github.com/nodejs/node/pull/60741
doc:
  * add avivkeller to collaborators (Aviv Keller) https://github.com/nodejs/node/pull/61115
  * add gurgunday to collaborators (Gürgün Dayıoğlu) https://github.com/nodejs/node/pull/61094
meta:
  * add Renegade334 to collaborators (Renegade334) https://github.com/nodejs/node/pull/60714

PR-URL: https://github.com/nodejs/node/pull/61947
v22.22.1
2026-03-04 10:24:57 +01:00
Node.js GitHub Bot bfc2b55c5a deps: update minimatch to 10.2.4
PR-URL: https://github.com/nodejs/node/pull/62016
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-03-04 10:19:21 +01:00
Node.js GitHub Bot 7d318a0ba8 deps: update minimatch to 10.2.2
PR-URL: https://github.com/nodejs/node/pull/61830
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-03-04 10:19:11 +01:00
Node.js GitHub Bot 87351a42b5 deps: update minimatch to 10.1.2
PR-URL: https://github.com/nodejs/node/pull/61732
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
2026-03-04 10:18:52 +01:00
Richard Lau 46d12d826f test: skip strace test with shared openssl
`parallel/test-strace-openat-openssl` was added to check explicitly
for a list of known files that would be opened for a set workload
(`require("crypto")`). This is not reliable when Node.js is linked
to an external/shared OpenSSL library (e.g. it might be configured
to load configuration files from a different default location and/or
load more than one configuration file) so skip this test when Node.js
is built in that way.

PR-URL: https://github.com/nodejs/node/pull/61987
Fixes: https://github.com/nodejs/node/issues/61966
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-28 12:17:18 +01:00
Vivian Wangandkxxt 0781bd3764 deps: V8: backport 6a0a25abaed3
Original commit message:

    [riscv] Fix sp handling in MacroAssembler::LeaveFrame

    Keep sp <= fp to ensure that data right above fp doesn't get clobbered
    by an inopportune signal and its handler.

    Such clobbering can happen in e.g. Node.js when JIT-compiled code is
    interrupted by a SIGCHLD handler.

    Bug: None
    Change-Id: Ief0836032ada7942e89f081f7605f61632c4d414
    Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/7540554
    Reviewed-by: Ji Qiu <qiuji@iscas.ac.cn>
    Commit-Queue: Yahan Lu (LuYahan) <yahan@iscas.ac.cn>
    Reviewed-by: Rezvan Mahdavi Hezaveh <rezvan@chromium.org>
    Cr-Commit-Position: refs/heads/main@{#105069}

Refs: https://github.com/v8/v8/commit/6a0a25abaed397f83eb0d92e4b33a5e18204f8bc
Co-authored-by: kxxt <rsworktech@outlook.com>
PR-URL: https://github.com/nodejs/node/pull/61688
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-02-24 08:39:04 +01:00
Rebroad 35a12fb996 src: replace ranges::sort for libc++13 compatibility on armhf
PR-URL: https://github.com/nodejs/node/pull/61789
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-02-24 08:39:04 +01:00
Mike McCready 642f518198 doc: supported toolchain with Visual Studio 2022 only
PR-URL: https://github.com/nodejs/node/pull/61451
Refs: https://github.com/nodejs/node/issues/60869
Refs: https://github.com/nodejs/node/issues/61449
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-02-24 08:39:04 +01:00
Antoine du Hamel 52e6b01a44 test: mark test-strace-openat-openssl as flaky
PR-URL: https://github.com/nodejs/node/pull/61921
Reviewed-By: Stewart X Addison <sxa@redhat.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-02-24 08:39:03 +01:00
Antoine du Hamel a253b7b6dc tools: switch to ARM runners on GHA jobs
PR-URL: https://github.com/nodejs/node/pull/61903
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-02-24 08:39:03 +01:00