[v24.x] lib: backport _tls_common and _tls_wrap refactors#61044
Merged
aduh95 merged 3 commits intonodejs:v24.x-stagingfrom Feb 4, 2026
Merged
[v24.x] lib: backport _tls_common and _tls_wrap refactors#61044aduh95 merged 3 commits intonodejs:v24.x-stagingfrom
aduh95 merged 3 commits intonodejs:v24.x-stagingfrom
Conversation
Collaborator
|
Review requested:
|
Member
Author
avivkeller
approved these changes
Jan 1, 2026
Collaborator
d4dceb9 to
2358296
Compare
b885b3a to
2ea4e1a
Compare
Member
Author
|
To be transparent: I rebased, ignored the conflict in |
Collaborator
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## v24.x-staging #61044 +/- ##
=================================================
+ Coverage 90.07% 90.10% +0.03%
=================================================
Files 665 667 +2
Lines 199008 199019 +11
Branches 38909 38911 +2
=================================================
+ Hits 179247 179335 +88
+ Misses 12133 12040 -93
- Partials 7628 7644 +16
🚀 New features to boost your workflow:
|
Collaborator
2ea4e1a to
c6215d7
Compare
aduh95
pushed a commit
to targos/node
that referenced
this pull request
Feb 4, 2026
This is the same as the original change, minus the `process.emitWarning` calls and unit tests that expect the deprecation warnings, plus re-application of the fixes for CVE-2025-59465 and CVE-2026-21637. 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: nodejs#57643 Backport-PR-URL: nodejs#61044 Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
aduh95
pushed a commit
to targos/node
that referenced
this pull request
Feb 4, 2026
This prevents the server from crashing due to an unhandled rejection
when a TLSSocket connection is abruptly destroyed during initialization
and the user has not attached an error handler to the socket.
e.g:
```js
const server = http2.createSecureServer({ ... })
server.on('secureConnection', socket => {
socket.on('error', err => {
console.log(err)
})
})
```
PR-URL: nodejs-private/node-private#750
Backport-PR-URL: nodejs#61044
Fixes: nodejs#44751
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=3262404
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
CVE-ID: CVE-2025-59465
Refs: nodejs#57643
aduh95
pushed a commit
to targos/node
that referenced
this pull request
Feb 4, 2026
Wrap pskCallback and ALPNCallback invocations in try-catch blocks to route exceptions through owner.destroy() instead of letting them become uncaught exceptions. This prevents remote attackers from crashing TLS servers or causing resource exhaustion. Fixes: https://hackerone.com/reports/3473882 PR-URL: nodejs-private/node-private#782 Backport-PR-URL: nodejs#61044 CVE-ID: CVE-2026-21637 Refs: nodejs#57643
This is the same as the original change, minus the `process.emitWarning` calls and unit tests that expect the deprecation warnings, plus re-application of the fixes for CVE-2025-59465 and CVE-2026-21637. 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: nodejs#57643 Backport-PR-URL: nodejs#61044 Co-authored-by: =?UTF-8?q?Micha=C3=ABl=20Zasso?= <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]>
This prevents the server from crashing due to an unhandled rejection
when a TLSSocket connection is abruptly destroyed during initialization
and the user has not attached an error handler to the socket.
e.g:
```js
const server = http2.createSecureServer({ ... })
server.on('secureConnection', socket => {
socket.on('error', err => {
console.log(err)
})
})
```
PR-URL: nodejs-private/node-private#750
Backport-PR-URL: nodejs#61044
Fixes: nodejs#44751
Refs: https://hackerone.com/bugs?subject=nodejs&report_id=3262404
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Anna Henningsen <[email protected]>
CVE-ID: CVE-2025-59465
Refs: nodejs#57643
Wrap pskCallback and ALPNCallback invocations in try-catch blocks to route exceptions through owner.destroy() instead of letting them become uncaught exceptions. This prevents remote attackers from crashing TLS servers or causing resource exhaustion. Fixes: https://hackerone.com/reports/3473882 PR-URL: nodejs-private/node-private#782 Backport-PR-URL: nodejs#61044 CVE-ID: CVE-2026-21637 Refs: nodejs#57643
c6215d7 to
065c9b0
Compare
Contributor
|
Landed in 736dce3...065c9b0 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This is the same as the original change, minus the
process.emitWarningcalls and unit tests that expect the deprecation warnings.Refs: #57643