Commit Graph
49166 Commits
Author SHA1 Message Date
Matteo Collina 9ccbc81ece tls: reject non-canonical IP addresses
TLS identity checks normalized non-canonical numeric hosts before
matching certificates. Platform resolvers can interpret the original
host as a different address.

Reject hosts that become IP addresses only after domainToASCII()
normalization.

Assisted-by: Pi
Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/982
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-106069
CVE-ID: CVE-2026-106072
2026-10-21 12:57:43 +02:00
James M Snell 9731991b3c tls: fix ip normalization regression
The regression is a low-severity bug that's not easy to
exploit. Basically it just means the hostname check can
be bypassed.

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs-private/node-private/pull/985
Fixes: https://hackerone.com/reports/4038287
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
CVE-ID: CVE-2026-105483
2026-10-21 12:57:42 +02:00
James M Snell a370966282 dns: validate resolve inputs for null bytes
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs-private/node-private/pull/984
Fixes: https://hackerone.com/reports/4038342
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
CVE-ID: CVE-2026-105482
2026-10-21 12:57:35 +02:00
Antoine du Hamel b85dd8021c 2026-10-21, Version 22.23.4 'Jod' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-105481) http: ensure agent data guard works without I/O (James M Snell)
* (CVE-2026-105482) dns: validate resolve inputs for null bytes (James M Snell)
* (CVE-2026-106069) tls: reject non-canonical IP addresses (Matteo Collina)
* (CVE-2026-106073) permission: check permission model in realpathSync (RafaelGSS)
* (CVE-2026-106074) crypto: reset random caches across snapshots (Filip Skokan)
* (CVE-2026-111497) src: expose `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (Antoine du Hamel)
* (CVE-2026-111497) deps: brotli: cherry-pick 0ed4268a4401abcb44720963 (Evgenii Kliuchnikov)
* crypto: update root certificates to NSS 3.131.1 (Antoine du Hamel)
* deps: update c-ares to 1.34.9 (Node.js GitHub Bot)
* deps: update timezone to 2026e (Node.js GitHub Bot)
* deps: upgrade openssl sources to openssl-3.5.9 (Node.js GitHub Bot)
* deps: update sqlite to 3.53.4 (Node.js GitHub Bot)
* deps: update undici to 6.29.1 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1010
2026-10-21 12:04:28 +02:00
Antoine du Hamel b29989dda4 2026-10-21, Version 24.22.1 'Krypton' (LTS)
This is a security release.

Notable changes:

* (CVE-2026-105481) http: ensure agent data guard works without I/O (James M Snell)
* (CVE-2026-105482) dns: validate resolve inputs for null bytes (James M Snell)
* (CVE-2026-105483) tls: fix ip normalization regression (James M Snell)
* (CVE-2026-106069) tls: reject non-canonical IP addresses (Matteo Collina)
* (CVE-2026-106073) permission: check permission model in realpathSync (RafaelGSS)
* (CVE-2026-106074) crypto: reset random caches across snapshots (Filip Skokan)
* (CVE-2026-111497) src: expose `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (Antoine du Hamel)
* (CVE-2026-111497) deps: brotli: cherry-pick 0ed4268a4401abcb44720963 (Evgenii Kliuchnikov)
* crypto: update root certificates to NSS 3.131.1 (Antoine du Hamel)
* deps: update c-ares to 1.34.9 (Node.js GitHub Bot)
* deps: update timezone to 2026e (Node.js GitHub Bot)
* deps: upgrade openssl sources to openssl-3.5.9 (Node.js GitHub Bot)
* deps: update undici to 7.30.1 (Node.js GitHub Bot)

PR-URL: https://github.com/nodejs-private/node-private/pull/1012
2026-10-21 12:03:11 +02:00
RafaelGSS 18aaee07d6 2026-10-21, Version 26.12.1 (Current)
This is a security release.

Notable changes:

* (CVE-2026-106069, CVE-2026-106072) tls: reject non-canonical IP addresses (Matteo Collina) – High
* (CVE-2026-105482) dns: validate resolve inputs for null bytes (James M Snell) – High
* (CVE-2026-105483) tls: fix ip normalization regression (James M Snell) – High
* (CVE-2026-111497) src: expose `BROTLI_DECODER_ERROR_FORMAT_BLOCK_SWITCH` (Antoine du Hamel) – High
* (CVE-2026-111497) deps: brotli: cherry-pick 0ed4268a4401abcb44720963 (Evgenii Kliuchnikov) – High
* (CVE-2026-105481) http: ensure agent data guard works without I/O (James M Snell) – Medium
* (CVE-2026-106074) crypto: reset random caches across snapshots (Filip Skokan) – Medium
* (CVE-2026-106070) zlib: avoid caching invalid ZIP local headers (Matteo Collina) – Low
* (CVE-2026-106071) src: fix the fs permission tree node on wildcard nodes (James M Snell) – Low
* (CVE-2026-106073) permission: check permission model in realpathSync (RafaelGSS) – Low
* deps: V8: backport 93cd21e8254b (Joyee Cheung)
* crypto: update root certificates to NSS 3.131.1 (Antoine du Hamel)
* tls: reject chains containing blocked public keys (Ulises Gascon)
* deps: update c-ares to 1.34.9 (Node.js GitHub Bot)
* tools: retry Gatekeeper check and stapling after notarization (Ryan Aslett)
* crypto: harden X.509 conversion and formatting (Filip Skokan)

PR-URL: https://github.com/nodejs-private/node-private/pull/1013
2026-10-21 12:02:46 +02:00
Antoine du Hamel 796a83a7ce build: do not pass vendored headers when building against shared libs
And setup `test-shared.yml` so we can detect regressions.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66844
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-10-21 09:59:53 +02:00
Yuya Inoue d15ccb7e97 meta: label top-level GN build files
Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66808
Refs: https://github.com/nodejs/node/pull/66805
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-10-21 05:21:50 +00:00
Marco Ippolito 221b47d556 test: run test-config-json-schema in default builds
The test was skipped unless Node.js was built with QUIC, but the JSON
schema is generated from a build with the default configuration
options, where QUIC is disabled. As a result the test never ran in CI
and the schema was no longer checked.

Skip the test instead when QUIC, DTLS or the V8 sandbox are enabled,
or when FFI is disabled, since each of these changes the set of
available options. Also remove the check for the `node_quic` variable,
which no longer exists.

Compare the schemas with assert.deepStrictEqual() so that a failure
shows which options differ instead of two long strings.

Assisted-by: claude:opus-5.5
Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66827
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-21 04:58:23 +00:00
Marco Ippolito 67d0e5faca doc: update node-config-schema.json
Regenerate the schema with tools/doc/generate-json-schema.mjs. It had
fallen out of date because test-config-json-schema was not running in
CI.

Assisted-by: claude:opus-5.5
Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66827
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-21 04:58:22 +00:00
Chengzhong Wu ef632266e5 build: include v8_debug_helper sources in the tarball
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/66763
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-21 03:50:50 +00:00
Antoine du Hamel 678c5551b2 tools: reenable openssl 1.1.x and 3.0.x on test-shared.yml
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66711
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-10-20 18:59:14 +00:00
Node.js GitHub Bot 3e5c8afba6 deps: update c-ares to 1.34.9
PR-URL: https://github.com/nodejs/node/pull/66868
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-20 19:07:12 +02:00
Antoine du Hamel ae223417d9 crypto: update root certificates to NSS 3.131.1
This is the certdata.txt[0] from NSS 3.131.1.

Certificates removed:
- emSign ECC Root CA - G3
- emSign Root CA - C1
- emSign ECC Root CA - C3

[0] https://raw.githubusercontent.com/nss-dev/nss/refs/tags/NSS_3_131_1_RTM/lib/ckfw/builtins/certdata.txt
a749e413-a6b5-45ca-827d-a943355e84c8

PR-URL: https://github.com/nodejs/node/pull/66877
Refs: https://groups.google.com/a/mozilla.org/g/dev-tech-crypto/c/vSxZxnOMMvs
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
2026-10-20 18:57:03 +02:00
Ulises Gascón d9a3f3d150 tls: reject chains containing blocked public keys
Node.js embeds the Mozilla root store but has no equivalent of the
browsers' CRLSet/OneCRL and no default online revocation checking, so a
certificate chain through a compromised intermediate still verifies as
long as it reaches a trusted root. Removing the affected roots would
over-block, since other legitimate intermediates chain to them.

Add a small compiled-in blocklist of SubjectPublicKeyInfo SHA-256 hashes
and check every verified chain against it from a single
SSL_CTX_set_cert_verify_callback hook. A hit is reported as
X509_V_ERR_CERT_REVOKED through the normal verification path, so it
honours rejectUnauthorized and surfaces as authorizationError on both
client and server sockets. The hook is installed for every SSL_CTX
Node.js creates: SecureContext, QUIC and DTLS. The OpenSSL 4.1 CN name
constraint handling previously registered from crypto_tls.cc moves into
the same hook, since OpenSSL allows only one.

The initial entries are the eight eMudhra/emSign intermediates whose
private keys were reported compromised in October 2026. The same list is
shipped by Go (CVE-2026-111943) and Electron.

Sessions resumed from before this change are not re-verified, as is
standard for TLS resumption; the exposure ends with the session timeout.

Test-only hooks on the crypto binding, reachable with
--expose-internals, allow the test to block a fixture key and exercise
the full handshake.

Refs: https://github.com/electron/electron/pull/55126
Refs: https://github.com/golang/go/issues/82345
Assisted-by: Claude, Codex
Signed-off-by: Ulises Gascon <ulisesgascongonzalez@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66871
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Bryan English <bryan@bryanenglish.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-20 16:43:42 +00:00
Rafael Gonzaga 967f0a7061 src,permission: do not grant cwd read access without entrypoint
Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/66645
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-10-20 16:26:16 +00:00
Nigro Simone 5a566ac6b9 src: cut small costs in node::MakeCallback
Enter the Environment's context only when it is not already the
entered and current one, set the async context frame only when it
changes, pass the resource variant to push_async_context() by const
reference, and grow and shrink the native resource stack with
push_back() and pop_back() instead of resize().

Refs: https://github.com/nodejs/performance/issues/24
Signed-off-by: Nigro Simone <nigro.simone@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66395
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-10-20 14:24:33 +00:00
Matteo Collina 6698675526 test_runner: use AsyncLocalStorage instead of async_hooks
Track the test that owns the current async context with an
AsyncLocalStorage instead of a createHook() init/destroy map.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
PR-URL: https://github.com/nodejs/node/pull/66795
Refs: https://github.com/nodejs/node/pull/61030
Reviewed-By: Chemi Atlow <chemi@atlow.co.il>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-10-20 14:00:22 +00:00
Ryan Aslett 1b5fc1479a tools: retry Gatekeeper check and stapling after notarization
Apple's ticket service can lag behind notarytool reporting
"Accepted", which makes the spctl assessment fail with
"source=Unnotarized Developer ID" even though the package was
notarized. Retry spctl and stapler with exponential backoff
(up to ~7.5 minutes) before failing, and fail the script if
stapling does not succeed instead of ignoring its exit status.

Refs: https://github.com/nodejs/build/issues/4527
Signed-off-by: Ryan Aslett <raslett@linuxfoundation.org>
PR-URL: https://github.com/nodejs/node/pull/66855
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-20 13:48:24 +00:00
Philipp Dunkel df2ea49e00 zlib: add crc32c
Add zlib.crc32c(data[, value]), which computes the CRC-32C checksum
(Castagnoli polynomial, RFC 3720 section 12.1). CRC-32C has better
error detection properties than the CRC-32 of zlib.crc32() and is the
checksum required by many current protocols, formats and services,
among them:

- iSCSI header and data digests (RFC 7143)
- SCTP packet checksums (RFC 9260)
- iWARP MPA framing (RFC 5044)
- NVMe/TCP header and data digests
- ext4, Btrfs and XFS metadata checksums
- the Snappy framing format
- Apache Kafka record batches
- LevelDB and RocksDB block checksums
- TensorFlow TFRecord files
- Google Cloud Storage and Amazon S3 object checksums

Implementing any of these in JavaScript currently needs a userland
CRC-32C, which is far slower than native code.

The function mirrors zlib.crc32(): it accepts a string (encoded as
UTF-8) or an ArrayBufferView, takes an optional 32-bit unsigned
starting value so a checksum can be continued across chunks, and has a
V8 fast API path.

The checksum is computed by absl::ExtendCrc32c() from the bundled
Abseil, which is already built and linked into node, so this adds no
new dependency and no new checksum implementation. absl_crc32c is
added to the libraries linked with --shared-abseil.

Abseil selects its hardware-accelerated CRC-32C path (SSE4.2 and
PCLMULQDQ on x64, the CRC32 and PMULL extensions on arm64) at compile
time, so with node's default compiler flags the portable table-driven
implementation is used. It runs at about the same speed as zlib.crc32()
(about 6.5 GB/s on a recent x64 machine), while the hardware path
reaches about 38 GB/s. Builds whose target CPU baseline already
includes those instructions get the hardware path without changes.
Enabling it for generic builds is left out on purpose: on x64, Abseil
uses the accelerated code for unrecognized CPUs without a runtime
feature check, so compiling it in unconditionally would fault on CPUs
without SSE4.2.

Signed-off-by: Philipp Dunkel <pip@pipobscure.com>
PR-URL: https://github.com/nodejs/node/pull/66828
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-10-20 12:33:08 +00:00
Antoine du Hamel 754325cd2f build: warn on incompatible quic configure flags
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66754
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-20 14:13:35 +02:00
Efe Karasakal 1a54c4fe8c quic: truncate CONNECTION_CLOSE frame reason field
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66644
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-10-20 11:01:08 +00:00
Donghoon Kang 531d28fc36 util: fix inspecting URL subclass prototypes
Check the URL private field brand before accessing href to avoid
throwing when inspecting URL subclass prototypes.

Assisted-by: Codex:6.1SolHigh
Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/66822
Fixes: https://github.com/nodejs/node/issues/66821
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
2026-10-20 04:54:54 +00:00
Donghoon Kang 4c14b9f58a ffi: add getFunction cache-miss benchmark
The existing get-function benchmark reuses the callable cached during
warmup, so it no longer measures trampoline creation.

Add a cache-miss benchmark that resolves a function once per library
instance. Construct the instances before timing to exclude library
loading while including symbol resolution, signature preparation,
and callable creation.

Update the existing benchmark comments to describe cache-hit lookups.

Signed-off-by: HoonDongKang <d159123@naver.com>
Assisted-by: Codex:Astra-medium
PR-URL: https://github.com/nodejs/node/pull/66456
Refs: https://github.com/nodejs/node/pull/64969
Refs: https://github.com/nodejs/node/pull/64971
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-20 02:50:14 +00:00
Donghoon Kang 8fbb315a4d ffi: add binary parameter to internal binding type
Add the optional binary parameter to the DynamicLibrary constructor
declaration to match the native binding introduced in #65909.

Signed-off-by: HoonDongKang <d159123@naver.com>
PR-URL: https://github.com/nodejs/node/pull/66502
Refs: https://github.com/nodejs/node/pull/65909
Refs: https://github.com/nodejs/node/pull/65734
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-10-20 02:50:02 +00:00
Node.js GitHub Bot 00d716d323 deps: update sqlite to 3.54.1
PR-URL: https://github.com/nodejs/node/pull/66816
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Guilherme Araújo <arauujogui@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
2026-10-20 01:58:19 +00:00
Node.js GitHub Bot ce3f25de37 deps: update simdjson to 5.0.5
PR-URL: https://github.com/nodejs/node/pull/66817
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-10-20 01:15:47 +00:00
Node.js GitHub Bot d7b6fee8cc tools: update nixpkgs-unstable to f20cd90e28fe0403873f473b29e42662cd8
PR-URL: https://github.com/nodejs/node/pull/66819
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-10-20 01:15:33 +00:00
Node.js GitHub Bot 56da329c76 test: update WPT for WebCryptoAPI to e15690d276
PR-URL: https://github.com/nodejs/node/pull/66813
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Matthew Aitken <maitken033380023@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-20 00:46:45 +00:00
Efe Karasakal 107133ceb8 quic: allow null body when opening streams
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66690
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-10-19 21:16:23 +00:00
Guy Bedford 8ae0ad0683 module: add "worker" condition for Web Worker threads
Adds a "worker" package condition that is applied within Web Worker
threads created via the `Worker` global, for the worker entry point,
its dependencies, `import()`, `require()` and `import.meta.resolve()`.
Threads created via `worker_threads`, including from within a Web
Worker, do not apply the condition. Other conditions are unaffected.

Assisted-by: OpenCode
Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66635
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-10-19 17:09:42 +00:00
Guy Bedford 1d5f8e6cba wasi: accept wasm i32 pointers with high bit set
Wasm i32 arguments with the high bit set are passed to JS as negative
Int32 numbers, so WASI functions taking uint32_t pointers rejected
them with EINVAL. Accept Int32 in CheckType<uint32_t> and reinterpret
as uint32_t on conversion, fixing all WASI functions at once.

Fixes: https://github.com/nodejs/node/issues/62671
Refs: https://github.com/nodejs/node/pull/62822
Assisted-by: OpenCode
Signed-off-by: Guy Bedford <guybedford@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66636
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-10-19 16:56:07 +00:00
Rafael Gonzaga 8df2dd89d0 doc: update V8 ABI release policy
Document the V8-related native addon ABI policy discussed in
nodejs/TSC#1852.

Starting with Node.js 27, V8 updates may land during Alpha and
Current even when they require a `NODE_MODULE_VERSION` bump, as
long as the ABI change is documented in release notes.

Refs: https://github.com/nodejs/TSC/issues/1852#issuecomment-4566968175

Signed-off-by: RafaelGSS <rafael.nunu@hotmail.com>
PR-URL: https://github.com/nodejs/node/pull/64196
Refs: https://github.com/nodejs/TSC/issues/1852
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Robert Nagy <ronagy@icloud.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-10-19 16:27:15 +00:00
Murat Kirazkaya 8175dc3c05 tools: add lint rule for unread benchmark n
If a benchmark declares `n` in its configs, main() must read it.
nodejs/node#59872 renamed a config key from `num` to `n` but left
`{ num: n }` in main(), so `n` resolved to undefined and the
benchmark silently reported near-zero results until #62084 fixed
it.

The rule also found `async_hooks/async-resource-vs-destroy.js`,
which has declared `n: [1e6]` since it was added but never read
it. Remove the unused key.

Refs: https://github.com/nodejs/node/pull/59872
Refs: https://github.com/nodejs/node/pull/62084
Signed-off-by: Murat Kirazkaya <groophylifefor@gmail.com>
Assisted-by: Claude Code
PR-URL: https://github.com/nodejs/node/pull/66807
Refs: https://github.com/nodejs/performance/issues/187
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2026-10-19 15:51:08 +00:00
Roberto Bianchi bb3f9176ca fs: reduce glob section allocations
Store prefix counts in section records to avoid a separate vector
and its allocations during multi-globstar matching.

Signed-off-by: Roberto Bianchi <roberto.bianchi@spendesk.com>
PR-URL: https://github.com/nodejs/node/pull/66716
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-19 14:53:43 +00:00
Marco Ippolito 2052d0dcdf module: add --experimental-strip-private-modules
Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/63869
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
2026-10-19 13:03:51 +00:00
Tim Perry 135b70e670 tls: add tlsSocket.socket, to access the raw stream beneath TLS
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66598
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-19 12:35:59 +00:00
Matteo Collina 3ab2db8cb5 meta: ignore AGENTS.override.md
Add AGENTS.override.md to the .gitignore AI assistants rules section
so that per-operating-user agent override files stay untracked.

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Assisted-by: pi
PR-URL: https://github.com/nodejs/node/pull/66629
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
2026-10-19 12:35:45 +00:00
Efe Karasakal 6678d6f71d quic: reuse header support assertion
Signed-off-by: Efe Karasakal <hi@efe.dev>
PR-URL: https://github.com/nodejs/node/pull/66777
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-10-19 12:35:33 +00:00
Antoine du Hamel cd192cd442 build: load gtest_main using pkg-config
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66675
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-10-19 08:58:24 +00:00
dependabot[bot] 1bc3cdae37 tools: bump the doc group in /tools/doc with 4 updates
Bumps the doc group in /tools/doc with 4 updates: [@doc-kit/cli](https://github.com/nodejs/doc-kit/tree/HEAD/packages/cli), [@doc-kit/generator-react](https://github.com/nodejs/doc-kit/tree/HEAD/packages/react), [@node-core/doc-kit](https://github.com/nodejs/doc-kit/tree/HEAD/packages/node) and [@node-core/doc-kit-legacy](https://github.com/nodejs/doc-kit/tree/HEAD/packages/node-legacy).

Updates `@doc-kit/cli` from 1.0.4 to 1.0.5
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/cli/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@doc-kit/cli@1.0.5/packages/cli)

Updates `@doc-kit/generator-react` from 0.4.2 to 0.5.0
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/react/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@doc-kit/generator-react@0.5.0/packages/react)

Updates `@node-core/doc-kit` from 2.0.5 to 2.0.6
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/node/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@node-core/doc-kit@2.0.6/packages/node)

Updates `@node-core/doc-kit-legacy` from 1.0.4 to 1.1.0
- [Release notes](https://github.com/nodejs/doc-kit/releases)
- [Changelog](https://github.com/nodejs/doc-kit/blob/main/packages/node-legacy/CHANGELOG.md)
- [Commits](https://github.com/nodejs/doc-kit/commits/@node-core/doc-kit-legacy@1.1.0/packages/node-legacy)

---
updated-dependencies:
- dependency-name: "@doc-kit/cli"
  dependency-version: 1.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
- dependency-name: "@doc-kit/generator-react"
  dependency-version: 0.5.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: doc
- dependency-name: "@node-core/doc-kit"
  dependency-version: 2.0.6
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: doc
- dependency-name: "@node-core/doc-kit-legacy"
  dependency-version: 1.1.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: doc
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66798
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Aviv Keller <me@aviv.sh>
2026-10-19 08:36:58 +00:00
Lazizbek Ergashev fccdbc8b99 crypto: do not leak scrypt param check errors
Signed-off-by: lazerg <lazerg2@gmail.com>
Assisted-by: Claude Code
PR-URL: https://github.com/nodejs/node/pull/66671
Fixes: https://github.com/nodejs/node/issues/66668
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-10-19 04:04:58 +00:00
Marco 1a885caa6e fs: add mkstemp()
Add fs.mkstemp(), fs.mkstempSync() and fsPromises.mkstemp(), which
create and open a unique temporary file in one operation. They expose
uv_fs_mkstemp(), the file counterpart of the function behind
fs.mkdtemp().

The callback and sync versions return the path and a file descriptor,
the promise version returns the path and a FileHandle.

libuv clears the path of the request when mkstemp() fails, so the
template is saved in the request and used for the path of the error.

The functions are also supported on mounted virtual file systems.

Refs: https://github.com/nodejs/node/pull/33549
Refs: https://github.com/nodejs/node/issues/33890
Refs: https://github.com/nodejs/node/issues/5332
Signed-off-by: marcopiraccini <marco.piraccini@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66484
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Gürgün Dayıoğlu <hey@gurgun.day>
2026-10-19 02:34:09 +00:00
Harjoth Khara 06550c777f vfs: enforce readonly state on open handles
Signed-off-by: harjoth <harjoth.khara@gmail.com>
Fixes: https://github.com/nodejs/node/issues/64401
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/64403
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-10-19 01:41:35 +00:00
Yuya Inoue 06c0e46c81 build: align rustc version warning with minimum requirement
Raise the rustc warning threshold to 1.88 to match BUILDING.md and
deps/crates/Cargo.toml. Keep the cargo threshold at 1.86.

Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66794
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-10-19 00:58:58 +00:00
Yuya Inoue e463b487c6 build: fail Windows CI on missing GYP sources
Enable the existing GYP missing-source check in the Windows coverage
workflow so stale references fail project generation instead of
only producing warnings.

Assisted-by: Codex
Signed-off-by: inoway46 <inoueyuya416@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66787
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-10-18 13:32:15 +00:00
Marco Ippolito 947b9a3aba tools: skip dependency update if PR has non-bot commits
When the tools-deps-update workflow finds a new version of a
dependency, peter-evans/create-pull-request force-pushes the
Action's branch, discarding any commits a collaborator pushed to
the existing PR to fix the update.

On scheduled runs and on manual runs for all dependencies, check
whether the open PR for the Action's branch contains commits not
authored by the bot before running the updater, and if so skip the
update for that dependency instead of overwriting them. A manual run
for a single dependency still updates the PR, as it is assumed to be
an intentional override.

Signed-off-by: Marco Ippolito <marcoippolito54@gmail.com>
Assisted-by: claude:opus-5.5
PR-URL: https://github.com/nodejs/node/pull/66503
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-10-18 12:30:44 +00:00
Filip Skokan e2d5522773 tools: tolerate non-UTF-8 test output
Non-UTF-8 bytes in captured test output cause Execute() to raise
UnicodeDecodeError. CI reports can then attribute the failure to an
earlier, expected "Error: uncaught" message from a passing cctest.

Replace malformed UTF-8 in stdout and stderr so the runner reports test
results while preserving the child process exit status.

Refs: https://github.com/nodejs/reliability/blob/main/reports/2026-10-16.md
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66783
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-10-18 07:18:16 +00:00
Matteo Collina 9a9f7e87b8 process: return unregister fn from finalization
process.finalization.register() and registerBeforeExit() now return
a function that removes only that registration, leaving other
registrations for the same object in place. The function does not
hold a strong reference to the object.

Each registration now uses its WeakRef as the unregister token, which
also makes process.finalization.unregister() remove the entries from
the FinalizationRegistry; previously it passed the object as the
token, which was never registered, so the call had no effect.

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

Signed-off-by: Matteo Collina <matteo.collina@gmail.com>
Assisted-by: pi
PR-URL: https://github.com/nodejs/node/pull/66482
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Paolo Insogna <paolo@cowtech.it>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-10-18 06:36:43 +00:00
David Babenko-Sanders 4737802218 test: skip openssl config test under BoringSSL
Signed-off-by: David Babenko-Sanders <dsanders11@ucsbalum.com>
PR-URL: https://github.com/nodejs/node/pull/66780
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-10-18 06:08:16 +00:00