tls: route callback exceptions through error handlers · nodejs/node@c357a39 · GitHub
Skip to content

Commit c357a39

Browse files
mcollinaRafaelGSS
authored andcommitted
tls: route callback exceptions through error handlers
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 PR-URL: nodejs-private/node-private#790 CVE-ID: CVE-2026-21637
1 parent bdf5873 commit c357a39

3 files changed

Lines changed: 443 additions & 81 deletions

File tree

lib/internal/tls/wrap.js

Lines changed: 87 additions & 70 deletions

test/parallel/test-tls-alpn-server-client.js

Lines changed: 21 additions & 11 deletions

0 commit comments

Comments
 (0)