-
-
Notifications
You must be signed in to change notification settings - Fork 34.6k
[v24.x] lib: backport _tls_common and _tls_wrap refactors #61044
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Review requested:
|
d4dceb9 to
2358296
Compare
b885b3a to
2ea4e1a
Compare
|
To be transparent: I rebased, ignored the conflict in |
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:
|
2ea4e1a to
c6215d7
Compare
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 <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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 <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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
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?= <targos@protonmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com> Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com> Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
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 <matteo.collina@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
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
|
Landed in 736dce3...065c9b0 |
This is the same as the original change, minus the
process.emitWarningcalls and unit tests that expect the deprecation warnings.Refs: #57643