Commit Graph
47618 Commits
Author SHA1 Message Date
Filip Skokan 50ffed1979 crypto: decode PKCS#1 keys through providers
Import RSA public keys through OSSL_DECODER on OpenSSL 3 so the
resulting keys stay provider-backed. Preserve the PKCS#1 input structure
and the ASN.1 encodings accepted by the legacy decoder.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66108
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:08 +02:00
Filip Skokan 56c16b2fd6 crypto: derive keys through EVP_KDF
Use one owning KDF interface for HKDF expansion, PBKDF2 and scrypt,
sharing provider setup with Argon2.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66108
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:07 +02:00
Filip Skokan 612db6d5b2 test: deflake user timing WPT assertions
The fixed 20 ms tolerance in mark.any.js can fail when execution pauses
between creating a mark and reading the clock. Adapt the test in memory
to check the mark timestamp against readings before and after mark().
Keep the vendored fixture and subtest names unchanged.

Apply script modifiers to worker entry scripts as well so the check
covers both WPT globals, and remove the suite-wide flaky expectation.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66036
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Fixes: https://github.com/nodejs/node/issues/40449
Refs: https://github.com/nodejs/node/pull/41203
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:06 +02:00
Filip Skokan a4effe6809 crypto: use names for asymmetric key algorithms
Provider-backed keys can have no numeric OpenSSL ID. Identify and
construct asymmetric keys by algorithm name, replacing the custom PQC
name-to-NID substitution with provider-aware matching in ncrypto.

Centralize known algorithm names, public key-type names, capabilities,
and backend compatibility in ncrypto. Use named key generation jobs and
remove asymmetric EVP_PKEY constants from the internal JavaScript
binding.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65966
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:05 +02:00
Brian MuenzenmeyerandFilip Skokan ddbf974b47 crypto: add crypto.parsePKCS12()
Return the private key, end-entity certificate, and any other
non-matching certificates from a PKCS#12 (.p12/.pfx) bundle as a
KeyObject and X509Certificate instances.

Node.js already parses PKCS#12 in SecureContext::LoadPKCS12, which backs
tls's `pfx` option, but the results are consumed directly into an
SSL_CTX and never reach JavaScript. Callers who need the key or the
certificates for anything other than an immediate TLS connection have to
shell out to `openssl pkcs12` or take a userland dependency.
SecureContext::LoadPKCS12 now uses this same parsing logic.

The binding wraps d2i_PKCS12_bio() and PKCS12_parse() and follows their
semantics, matching the existing TLS path: the first private key is
returned, the end-entity certificate is the one associated with that
key, and any remaining certificates are returned through
`additionalCertificates`. A bundle containing no private key reports
`certificate` as null and returns its certificates through
`additionalCertificates`.

Absent and empty passphrases are kept distinct, since OpenSSL treats
them differently. Bundles that require OpenSSL's legacy provider throw
ERR_CRYPTO_UNSUPPORTED_OPERATION, reusing the error added for the TLS
path.

Signed-off-by: bmuenzenmeyer <brian.muenzenmeyer@gmail.com>
Co-authored-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65627
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:04 +02:00
Filip Skokan e7ed4361d6 doc,test: account for OpenSSL 4.1 behaviours
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65956
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Refs: https://openssl-library.org/post/2026-09-09-openssl-4.1-alpha/
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:03 +02:00
Filip Skokan cb93d40549 test,benchmark: use OpenSSL feature helpers
Add isBoringSSL to the test crypto helpers and use it in tests and
benchmarks. Replace hasOpenSSL3 call sites with hasOpenSSL(3).

Assisted-by: Codex
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65762
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:02 +02:00
Filip Skokan 8e631aa48f crypto: add Hybrid KEMs to Web Cryptography
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65759
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:48:01 +02:00
Filip Skokan 61a73d31eb test: fix RSA/DSA wrong-passphrase flake
Re-encrypting keys on each FIPS test run can produce ciphertext that
decrypts with valid padding under the wrong password, causing a decoder
error instead of the expected bad decrypt.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65983
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Refs: https://github.com/nodejs/node/actions/runs/34595689099/job/103251404626?pr=65980
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:59 +02:00
Filip Skokan d9f4a3ee3e test: reuse fixed primes in DH tests
Use the modp14 prime instead of generating fresh parameters for tests
of constructors, key setters, and memory retention. Keep generic
DiffieHellman instances and the existing setter and leak assertions.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65980
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:58 +02:00
Filip Skokan a0fd0a8bd6 test: use named parameters in DH stress test
Named modp14 parameters avoid generating and repeatedly validating a
custom prime. Keep the existing exchange counts and FIPS rejection
assertion. The separate deterministic padding test continues to cover
imported prime parameters.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/65980
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:57 +02:00
Filip Skokan 5c51129e16 crypto: optimize private EC JWK import
Avoid creating temporary EVP objects and repeating key validation while
retaining the private scalar range and public/private consistency
checks.

Assisted-by: GitHub Copilot
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65908
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:56 +02:00
Filip Skokan 3f0b6d3308 lib: avoid repeat internal receiver checks
Let internal helpers access the private cache directly to avoid
repeating receiver checks.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65910
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Refs: https://github.com/nodejs/node/pull/65846
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:55 +02:00
Filip Skokan 0039479b4a lib: fix shared buffer growability validation
Use the intrinsic growable getter instead of buffer.growable so
shadowed properties cannot bypass validation or reject fixed buffers.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: GitHub Copilot
PR-URL: https://github.com/nodejs/node/pull/65845
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:54 +02:00
Filip Skokan e7907130ae lib: use Web IDL interface brand checks
Use explicit brand predicates for interface conversion instead of
prototype ancestry. Update CryptoKey and AbortSignal together with the
shared converter contract.

Read internal AbortSignal state during composition. Preserve genuine
signals after prototype changes without invoking shadowed getters.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: GitHub Copilot
PR-URL: https://github.com/nodejs/node/pull/65846
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:53 +02:00
Filip Skokan c2ec40c2d7 crypto: disable non-FIPS WebCrypto paths in FIPS mode
Hide TurboSHAKE and KangarooTwelve when FIPS is enabled. Reject cSHAKE
and KMAC parameters that require implementations outside the OpenSSL
provider, while keeping provider-backed paths available.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65172
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:51 +02:00
Filip Skokan 810a6b00ee test: update tests to run with OpenSSL >= 3.0 FIPS mode
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64960
Backport-PR-URL: https://github.com/nodejs/node/pull/66233
Fixes: https://github.com/nodejs/node/issues/48379
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:47:46 +02:00
Richard Lau c555ba0aeb tools: update tools/v8 for Python 3.13
The `pipes` module was removed in Python 3.13 after being deprecated in
Python 3.11.

Also remove Python 2 compatibility shim as scripts require Python 3.

Assisted-by: IBM Bob
Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/66109
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-25 18:01:55 +02:00
Filip Skokan e198aa0f79 crypto: read RSA-PSS restrictions from provider
Query salt length and digest restrictions instead of serializing the key
to SPKI and parsing its algorithm identifier. A readable salt length
distinguishes restricted keys, including empty parameter sequences, from
unrestricted keys.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66108
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-09-25 18:01:55 +02:00
dependabot[bot] aafff27ebe tools: bump eslint-plugin-jsdoc in /tools/eslint in the eslint group
Bumps the eslint group in /tools/eslint with 1 update: [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc).

Updates `eslint-plugin-jsdoc` from 64.3.9 to 64.3.10
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v64.3.9...v64.3.10)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 64.3.10
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66102
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-25 18:01:55 +02:00
Shelley Vohr ebc028d75d trace_events: fix abort when Node.js does not own the V8 platform
Requiring `node:trace_events` and calling `createTracing()` aborted
the process, and `getEnabledCategories()` dereferenced a null pointer,
when Node.js runs on an embedder's own platform
(`kNoInitializeNodeV8Platform`): no `tracing::Agent` exists then, and
`lib/trace_events.js` only checked the compile-time `hasTracing` flag
and `ownsProcessState` before handing the null agent to the binding.

Have the binding report whether an agent exists and throw the existing
`ERR_TRACE_EVENTS_UNAVAILABLE` when it does not, as for a
`--without-v8-platform` build.

Refs: https://github.com/nodejs/node/pull/19803
Signed-off-by: Shelley Vohr <shelley.vohr@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65954
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2026-09-25 18:01:55 +02:00
Antoine du Hamel dc6b9ba5b2 test: deflake test-run-watch-cwd-isolation-none-*
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66035
Refs: https://github.com/nodejs/node/issues/66056
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-25 18:01:54 +02:00
Guilherme Araújo d11c65d2f2 doc: add araujogui to collaborators
Fixes: https://github.com/nodejs/node/issues/65585
Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66090
Reviewed-By: Ruy Adorno <ruy@vlt.sh>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
Reviewed-By: Richard Lau <richard.lau@ibm.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-09-25 18:01:54 +02:00
dependabot[bot] b351ac9cd4 meta: bump step-security/harden-runner from 2.21.0 to 2.21.1
Bumps [step-security/harden-runner](https://github.com/step-security/harden-runner) from 2.21.0 to 2.21.1.
- [Release notes](https://github.com/step-security/harden-runner/releases)
- [Commits](https://github.com/step-security/harden-runner/compare/05e31511f85b41b11d1cf0ef85d0992719546e2c...e14015d583714f6e62063499dc959a02595150a1)

---
updated-dependencies:
- dependency-name: step-security/harden-runner
  dependency-version: 2.21.1
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66044
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-25 18:01:54 +02:00
dependabot[bot] 693e890fec meta: bump github/codeql-action/upload-sarif from 4.37.9 to 4.38.0
Bumps [github/codeql-action/upload-sarif](https://github.com/github/codeql-action) from 4.37.9 to 4.38.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63)

---
updated-dependencies:
- dependency-name: github/codeql-action/upload-sarif
  dependency-version: 4.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66046
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-25 18:01:54 +02:00
Muhammad Al-Muzahid 0a4a8d602a doc: fix duplicate 'the' typo in node_platform.cc
PR-URL: https://github.com/nodejs/node/pull/66058
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-09-25 18:01:54 +02:00
Antoine du Hamel 7a481ebd2c tools: group CodeQL GHA updates
Having separate PRs is noisy and do not really make sense, it makes more
sense to keep them aligned.

Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66057
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
2026-09-25 18:01:54 +02:00
Filip Skokan b2252b4074 tools: summarize auto-start-ci failures
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65979
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:01:54 +02:00
Tim Perry fa9188bd63 quic: fix two small bugs in HTTP/3 stream internals
Signed-off-by: Tim Perry <pimterry@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65970
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-25 18:01:54 +02:00
Richard Lau a6bd0c1413 build: suppress OpenSSL asm warnings with clang
Unlike gcc, clang warns when arguments are passed that are not
used. For OpenSSL, this includes passing C preprocessor
directives when compiling `.s` files.

Suppress the warning (`-Wno-unused-command-line-argument`) when
using clang.

Signed-off-by: Richard Lau <richard.lau@ibm.com>
PR-URL: https://github.com/nodejs/node/pull/66023
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: René <contact.9a5d6388@renegade334.me.uk>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-25 18:01:53 +02:00
Haram Jeong b6538138ef doc: clarify sub-1000ms behavior in socket.setKeepAlive
The current documentation states that `initialDelay` and `interval`
are divided by 1000 and rounded down, but does not explicitly mention
that values less than 1000ms will result in 0 seconds. This can lead
to confusion when users pass values like 400ms expecting sub-second
keepalive delays.

Add a concrete example showing that 400ms rounds down to 0 seconds.

Refs: https://github.com/nodejs/node/issues/57712

Signed-off-by: haramjeong <04harams77@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65869
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
2026-09-25 18:01:53 +02:00
kishore280 146f00f64b child_process: clear timeout timer on spawn-time error too
When spawn() fails at the OS level (ENOENT, EACCES, EAGAIN, EMFILE,
ENFILE), the resulting ChildProcess only ever emits 'error', never
'exit'. The `timeout` option's cleanup only listened for 'exit', so
the timer stayed armed for the full `timeout` duration on any
spawn-time failure, holding the event loop open well after the
promise/callback had already settled via 'error'.

Clear the timer on 'error' as well as 'exit'.

Fixes: https://github.com/nodejs/node/issues/65504
Signed-off-by: kishore280 <maheshwarankishore@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65506
Reviewed-By: Aviv Keller <me@aviv.sh>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:01:53 +02:00
Xia Chao a27db42c3e fs: coerce FileHandle.read length like fs.read
Non-number length values reached node::fs::Read, which CHECKs
IsInt32() and aborts the process. Apply length |= 0 after defaulting,
matching fs.read and fs.readSync.

Signed-off-by: Xia Chao <236466140+bun-unsafe@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65521
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: LiviaMedeiros <livia@cirno.name>
2026-09-25 18:01:53 +02:00
Aman Chadha(IVIXMMI) 1260642ace stream: destroy Duplex.from async function on early return
When an AsyncFunction passed to Duplex.from() resolves without
consuming its input, tear down the duplex so pipeline() can finish
and destroy the upstream readable.

Fixes: https://github.com/nodejs/node/issues/55077
Assisted-by: Cursor
Signed-off-by: Aman Chadha <79802170+ac-mmi@users.noreply.github.com>
PR-URL: https://github.com/nodejs/node/pull/65963
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-09-25 18:01:53 +02:00
Guilherme Araújo a794e36970 sqlite: throw on invalid URL path instead of abort
ValidateDatabasePath() treats any object exposing a string `href` as a
URL, then asserts the parse result with CHECK(ada::can_parse(location)).
Whether that string parses depends on user input rather than on an
invariant the code guarantees, so a value such as { href: 'not a url' }
aborted the process instead of throwing.

Replace the CHECK with an ERR_INVALID_URL exception, matching how
node_file.cc reports an unparsable URL. Both DatabaseSync() and backup()
validate their path through this function, so both paths are covered.

Signed-off-by: Guilherme Araújo <arauujogui@gmail.com>
Assisted-by: Claude Code
PR-URL: https://github.com/nodejs/node/pull/66026
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Edy Silva <edigleyssonsilva@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
2026-09-25 18:01:53 +02:00
dependabot[bot] 499fe73da7 tools: bump the eslint group in /tools/eslint with 6 updates
Bumps the eslint group in /tools/eslint with 6 updates:

| Package | From | To |
| --- | --- | --- |
| [@babel/core](https://github.com/babel/babel/tree/HEAD/packages/babel-core) | `8.0.1` | `8.0.5` |
| [@babel/eslint-parser](https://github.com/babel/babel/tree/HEAD/eslint/babel-eslint-parser) | `8.0.1` | `8.0.5` |
| [eslint](https://github.com/eslint/eslint) | `10.9.1` | `10.10.0` |
| [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) | `64.2.1` | `64.3.9` |
| [eslint-plugin-regexp](https://github.com/ota-meshi/eslint-plugin-regexp) | `3.2.0` | `3.3.0` |
| [globals](https://github.com/sindresorhus/globals) | `17.11.0` | `17.12.0` |

Updates `@babel/core` from 8.0.1 to 8.0.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v8.0.5/packages/babel-core)

Updates `@babel/eslint-parser` from 8.0.1 to 8.0.5
- [Release notes](https://github.com/babel/babel/releases)
- [Changelog](https://github.com/babel/babel/blob/main/CHANGELOG.md)
- [Commits](https://github.com/babel/babel/commits/v8.0.5/eslint/babel-eslint-parser)

Updates `eslint` from 10.9.1 to 10.10.0
- [Release notes](https://github.com/eslint/eslint/releases)
- [Commits](https://github.com/eslint/eslint/compare/v10.9.1...v10.10.0)

Updates `eslint-plugin-jsdoc` from 64.2.1 to 64.3.9
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v64.2.1...v64.3.9)

Updates `eslint-plugin-regexp` from 3.2.0 to 3.3.0
- [Release notes](https://github.com/ota-meshi/eslint-plugin-regexp/releases)
- [Changelog](https://github.com/ota-meshi/eslint-plugin-regexp/blob/master/CHANGELOG.md)
- [Commits](https://github.com/ota-meshi/eslint-plugin-regexp/compare/v3.2.0...v3.3.0)

Updates `globals` from 17.11.0 to 17.12.0
- [Release notes](https://github.com/sindresorhus/globals/releases)
- [Commits](https://github.com/sindresorhus/globals/compare/v17.11.0...v17.12.0)

---
updated-dependencies:
- dependency-name: "@babel/core"
  dependency-version: 8.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: "@babel/eslint-parser"
  dependency-version: 8.0.5
  dependency-type: direct:production
  update-type: version-update:semver-patch
  dependency-group: eslint
- dependency-name: eslint
  dependency-version: 10.10.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-jsdoc
  dependency-version: 64.3.9
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: eslint-plugin-regexp
  dependency-version: 3.3.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
- dependency-name: globals
  dependency-version: 17.12.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
  dependency-group: eslint
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66045
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-25 18:01:53 +02:00
dependabot[bot] 9c2abc13c2 meta: bump github/codeql-action/init from 4.37.9 to 4.38.0
Bumps [github/codeql-action/init](https://github.com/github/codeql-action) from 4.37.9 to 4.38.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63)

---
updated-dependencies:
- dependency-name: github/codeql-action/init
  dependency-version: 4.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66048
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-25 18:01:53 +02:00
dependabot[bot] b3c5c2b91d meta: bump github/codeql-action/analyze from 4.37.9 to 4.38.0
Bumps [github/codeql-action/analyze](https://github.com/github/codeql-action) from 4.37.9 to 4.38.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63)

---
updated-dependencies:
- dependency-name: github/codeql-action/analyze
  dependency-version: 4.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66049
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-25 18:01:53 +02:00
dependabot[bot] 2428b13b02 meta: bump github/codeql-action/autobuild from 4.37.9 to 4.38.0
Bumps [github/codeql-action/autobuild](https://github.com/github/codeql-action) from 4.37.9 to 4.38.0.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/cdf488f595d80d6e07e03d4674febd5ab45fa938...b96794f015dfd88f77b49b1c93e0fa7110f94c63)

---
updated-dependencies:
- dependency-name: github/codeql-action/autobuild
  dependency-version: 4.38.0
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
PR-URL: https://github.com/nodejs/node/pull/66050
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2026-09-25 18:01:52 +02:00
Chengzhong Wu d004d957ae tools: update pgo build doc for linux
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/66024
Refs: https://github.com/nodejs/node/pull/63696
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-25 18:01:52 +02:00
Antoine du Hamel 0f27bd2459 test: unskip test-watch-create-isolation-none
Signed-off-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66041
Reviewed-By: Pietro Marchini <pietro.marchini94@gmail.com>
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
2026-09-25 18:01:52 +02:00
Joyee Cheung 94e12139ee build: derive V8_LOGGING_LEVEL from dcheck_always_on
Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65744
Refs: https://chromium-review.googlesource.com/c/v8/v8/+/7705483
Reviewed-By: Richard Lau <richard.lau@ibm.com>
2026-09-25 18:01:52 +02:00
Chengzhong Wu d319fa7de4 doc: remove obsolete mentioning of cl.exe on windows
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
PR-URL: https://github.com/nodejs/node/pull/66038
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Ulises Gascón <ulisesgascongonzalez@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
2026-09-25 18:01:52 +02:00
James M Snell 5f06defdbd stream: make share budget failures detach before throwing
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66028
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-09-25 18:01:52 +02:00
James M Snell d1c60d898d stream: update broadcast to retain buffered data with zero consumers
While the Broadcast is still open, maintain buffered data when
consumer count reaches zero

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Opencode
PR-URL: https://github.com/nodejs/node/pull/66028
Reviewed-By: Filip Skokan <panva.ip@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-09-25 18:01:52 +02:00
Carlos Vinicius ec37f934db tls: propagate singleUse to the secure context
tls.connect() sets options.singleUse, and both TLSWrap.prototype.close()
and TLSSocket.prototype._destroySSL() check _secureContext.singleUse
before closing the context. Nothing ever assigned the flag to the
context, so the check never fired and each connection's SSL_CTX stayed
alive until the JS wrapper was garbage collected. The assignment was
lost when the context configuration was extracted into
configSecureContext().

Restore it in createSecureContext(), which owns the JS wrapper the flag
is read from, and make the close idempotent: a socket that swaps its
handle, as autoSelectFamily retries do, shares a single context between
the successive TLSWraps and each of them reaches the same teardown.

Signed-off-by: Carlos Vinicius <viniciusdev.26@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/66025
Fixes: https://github.com/nodejs/node/issues/66002
Refs: https://github.com/nodejs/node/pull/38116
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Tim Perry <pimterry@gmail.com>
2026-09-25 18:01:52 +02:00
Joyee Cheung 0f62f2b2df src: print exception thrown during primordial initialization
Otherwise there's little information for debugging if the
initialization fails due to a bug in local development.
This should generally only happen during the build process,
when the snapshot is built.

Signed-off-by: Joyee Cheung <joyeec9h3@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65991
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
2026-09-25 18:01:51 +02:00
Filip Skokan 253784f0e9 crypto: optimize and benchmark key preparation
Optimize asymmetric key preparation with benchmark and regression
coverage for the supported input paths.

Assisted-by: GitHub Copilot, Codex
Signed-off-by: Filip Skokan <panva.ip@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/65892
Backport-PR-URL: https://github.com/nodejs/node/pull/66092
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
2026-09-25 18:01:51 +02:00
Matteo Collina 8921108175 http2: settle pending write callbacks on destroy
When a stream is destroyed while a write is still in flight, nghttp2 may
have handed the data to the socket and never report the write completion
once the stream or session tears down. That leaves the write callback
unresolved, the Writable stuck, and the event loop never drains, which
times out test-http2-close-while-writing on macOS.

Settle the in-flight write in Http2Stream._destroy by invoking its
callback with the destroy error and resetting writePending. A later
native completion callback is then a no-op because writeCb is null and
writePending is 0, so the settle is idempotent. Passing the error rather
than null also drains any buffered writes.

Fixes: https://github.com/nodejs/node/issues/58252

Signed-off-by: Matteo Collina <hello@matteocollina.com>
Assisted-by: pi-coding-agent
PR-URL: https://github.com/nodejs/node/pull/66016
Fixes: https://github.com/nodejs/node/issues/58252
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Xuguang Mei <meixuguang@gmail.com>
2026-09-25 18:01:51 +02:00
Filip Skokan 1019f624f3 test: deflake util.throttle tests
Short throttle windows can expire between synchronous calls when the
process is descheduled. Delayed timer dispatch can also release two
queued calls together, invalidating the strict test's spacing assertion.

Move timing checks to a separate test with mocked timers and a matching
libuv clock. Cover both punctual and delayed dispatch, and keep real
async_hooks timer-allocation checks with windows canceled before expiry.

Signed-off-by: Filip Skokan <panva.ip@gmail.com>
Assisted-by: Codex
PR-URL: https://github.com/nodejs/node/pull/66034
Refs: https://github.com/nodejs/node/pull/65899
Refs: https://ci.nodejs.org/job/node-test-commit-linux-containered/nodes=ubuntu2404_sharedlibs_openssl111_x64/59189/
Refs: https://ci.nodejs.org/job/node-test-commit-linuxone/nodes=rhel8-s390x/58602/
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Stefan Stojanovic <stefan.stojanovic@janeasystems.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
2026-09-25 18:01:51 +02:00