Skip to content

net: multiple dtls improvements - #64314

Merged
nodejs-github-bot merged 12 commits into
nodejs:mainfrom
jasnell:jasnell/dtls-fixes
Aug 1, 2026
Merged

net: multiple dtls improvements#64314
nodejs-github-bot merged 12 commits into
nodejs:mainfrom
jasnell:jasnell/dtls-fixes

Conversation

@jasnell

@jasnell jasnell commented Jul 6, 2026

Copy link
Copy Markdown
Member

Multiple DTLS improvements.

Signed-off-by: James M Snell jasnell@gmail.com
Assisted-by: Claude/Opus

@jasnell
jasnell requested a review from mcollina July 6, 2026 03:40
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/security-wg

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Jul 6, 2026
@jasnell
jasnell requested a review from Qard July 7, 2026 04:10
@nodejs-github-bot

This comment was marked as outdated.

@jasnell jasnell changed the title net: improve dtls cert verification net: multiple dtls improvements Jul 7, 2026
@jasnell
jasnell force-pushed the jasnell/dtls-fixes branch from 7d55980 to fe3087b Compare July 7, 2026 05:17
jasnell added 11 commits July 6, 2026 22:21
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
@jasnell
jasnell force-pushed the jasnell/dtls-fixes branch from fe3087b to 9953529 Compare July 7, 2026 05:21
@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

This comment was marked as duplicate.

Signed-off-by: James M Snell <jasnell@gmail.com>
@codecov

codecov Bot commented Jul 7, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.25%. Comparing base (d7aca7e) to head (d7ecfc4).
⚠️ Report is 260 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #64314      +/-   ##
==========================================
- Coverage   92.05%   90.25%   -1.80%     
==========================================
  Files         381      741     +360     
  Lines      169394   240795   +71401     
  Branches    25970    45350   +19380     
==========================================
+ Hits       155935   217340   +61405     
- Misses      13169    15045    +1876     
- Partials      290     8410    +8120     
Files with missing lines Coverage Δ
lib/internal/dtls/dtls.js 100.00% <100.00%> (ø)

... and 486 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@mcollina mcollina left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@nodejs-github-bot

This comment was marked as outdated.

@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

@jasnell jasnell added the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 1, 2026
@jasnell jasnell added the author ready PRs that have at least one approval, no pending requests for changes, and a CI started. label Aug 1, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 1, 2026
@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. labels Aug 1, 2026
@nodejs-github-bot nodejs-github-bot added the commit-queue-failed An error occurred while landing this pull request using GitHub Actions. label Aug 1, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/64314
✔  Done loading data for nodejs/node/pull/64314
----------------------------------- PR info ------------------------------------
Title      net: multiple dtls improvements (#64314)
Author     James M Snell <jasnell@gmail.com> (@jasnell)
Branch     jasnell:jasnell/dtls-fixes -> nodejs:main
Labels     c++, lib / src, author ready, needs-ci
Commits    12
 - net: improve dtls cert verification
 - net: fixing up dtls details
 - net: fixup UAF in dtls
 - net: fix session leak in dtls
 - net: fixup failed-connect hang in dtls
 - net: fix dtls unhandled rejections
 - net: add missing dtls permission check
 - net: fix multiple minor dtls issues
 - net: improve dtls buffer handling
 - net: additional dtls fixups and tests
 - test: dtls test improvements
 - net: fixup dtls c++ formatting
Committers 1
 - James M Snell <jasnell@gmail.com>
PR-URL: https://github.com/nodejs/node/pull/64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 06 Jul 2026 03:40:57 GMT
   ✔  Approvals: 1
   ✔  - Matteo Collina (@mcollina) (TSC): https://github.com/nodejs/node/pull/64314#pullrequestreview-4678903069
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2026-07-13T19:26:23Z: https://ci.nodejs.org/job/node-test-pull-request/74792/
- Querying data for job/node-test-pull-request/74792/
✔  Build data downloaded
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 64314
From https://github.com/nodejs/node
 * branch                  refs/pull/64314/merge -> FETCH_HEAD
✔  Fetched commits as a6a1bd4de0b6..d7ecfc44ee1a
--------------------------------------------------------------------------------
[main 4f0604f0ed] net: improve dtls cert verification
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 18:30:17 2026 -0700
 7 files changed, 201 insertions(+), 16 deletions(-)
 create mode 100644 test/parallel/test-dtls-verify-identity.mjs
[main ef23197f9e] net: fixing up dtls details
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 18:44:05 2026 -0700
 4 files changed, 32 insertions(+), 44 deletions(-)
[main 22c0803c2b] net: fixup UAF in dtls
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 18:59:05 2026 -0700
 2 files changed, 97 insertions(+)
 create mode 100644 test/parallel/test-dtls-destroy-in-callback.mjs
[main 3b5ecf075d] net: fix session leak in dtls
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 19:33:57 2026 -0700
 3 files changed, 99 insertions(+), 2 deletions(-)
 create mode 100644 test/parallel/test-dtls-session-table-cleanup.mjs
[main d845c95614] net: fixup failed-connect hang in dtls
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 19:48:12 2026 -0700
 2 files changed, 64 insertions(+)
 create mode 100644 test/parallel/test-dtls-connect-error-cleanup.mjs
[main d358cce96c] net: fix dtls unhandled rejections
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 20:00:23 2026 -0700
 2 files changed, 59 insertions(+)
 create mode 100644 test/parallel/test-dtls-unhandled-rejection.mjs
[main a3256d49ac] net: add missing dtls permission check
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 20:06:59 2026 -0700
 2 files changed, 12 insertions(+), 2 deletions(-)
[main 918877c3be] net: fix multiple minor dtls issues
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 20:21:29 2026 -0700
 4 files changed, 100 insertions(+), 33 deletions(-)
 create mode 100644 test/parallel/test-dtls-servername-invalid.mjs
[main 6aefef8f27] net: improve dtls buffer handling
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 20:31:03 2026 -0700
 3 files changed, 21 insertions(+), 9 deletions(-)
Auto-merging test/parallel/test-dtls-alpn.mjs
[main b5654297b1] net: additional dtls fixups and tests
 Author: James M Snell <jasnell@gmail.com>
 Date: Sun Jul 5 21:13:30 2026 -0700
 8 files changed, 98 insertions(+), 29 deletions(-)
 create mode 100644 test/parallel/test-dtls-srtp.mjs
Auto-merging test/parallel/test-dtls-alpn.mjs
Auto-merging test/parallel/test-dtls-options.mjs
[main 35314dccdf] test: dtls test improvements
 Author: James M Snell <jasnell@gmail.com>
 Date: Mon Jul 6 07:26:27 2026 -0700
 14 files changed, 697 insertions(+), 7 deletions(-)
 create mode 100644 test/parallel/test-dtls-accessors.mjs
 create mode 100644 test/parallel/test-dtls-ciphers.mjs
 create mode 100644 test/parallel/test-dtls-client-cert.mjs
 create mode 100644 test/parallel/test-dtls-errors.mjs
 create mode 100644 test/parallel/test-dtls-keylog.mjs
 create mode 100644 test/parallel/test-dtls-mtu.mjs
 create mode 100644 test/parallel/test-dtls-reject-unauthorized.mjs
 create mode 100644 test/parallel/test-dtls-robustness.mjs
 create mode 100644 test/parallel/test-dtls-send.mjs
[main 78e4aece2a] net: fixup dtls c++ formatting
 Author: James M Snell <jasnell@gmail.com>
 Date: Tue Jul 7 06:53:01 2026 -0700
 1 file changed, 1 insertion(+), 2 deletions(-)
   ✔  Patches applied
There are 12 commits in the PR. Attempting autorebase.
(node:357) [DEP0190] DeprecationWarning: Passing args to a child process with shell option true can lead to security vulnerabilities, as the arguments are not escaped, only concatenated.
(Use `node --trace-deprecation ...` to show where the warning was created)
Rebasing (2/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: improve dtls cert verification

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD b80eb09f00] net: improve dtls cert verification
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 18:30:17 2026 -0700
7 files changed, 201 insertions(+), 16 deletions(-)
create mode 100644 test/parallel/test-dtls-verify-identity.mjs
Rebasing (3/24)
Rebasing (4/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fixing up dtls details

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 2f056d8b67] net: fixing up dtls details
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 18:44:05 2026 -0700
4 files changed, 32 insertions(+), 44 deletions(-)
Rebasing (5/24)
Rebasing (6/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fixup UAF in dtls

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 6aedfcd037] net: fixup UAF in dtls
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 18:59:05 2026 -0700
2 files changed, 97 insertions(+)
create mode 100644 test/parallel/test-dtls-destroy-in-callback.mjs
Rebasing (7/24)
Rebasing (8/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fix session leak in dtls

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 8a51829444] net: fix session leak in dtls
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 19:33:57 2026 -0700
3 files changed, 99 insertions(+), 2 deletions(-)
create mode 100644 test/parallel/test-dtls-session-table-cleanup.mjs
Rebasing (9/24)
Rebasing (10/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fixup failed-connect hang in dtls

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 394185784f] net: fixup failed-connect hang in dtls
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 19:48:12 2026 -0700
2 files changed, 64 insertions(+)
create mode 100644 test/parallel/test-dtls-connect-error-cleanup.mjs
Rebasing (11/24)
Rebasing (12/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fix dtls unhandled rejections

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 984cbb57d6] net: fix dtls unhandled rejections
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 20:00:23 2026 -0700
2 files changed, 59 insertions(+)
create mode 100644 test/parallel/test-dtls-unhandled-rejection.mjs
Rebasing (13/24)
Rebasing (14/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: add missing dtls permission check

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 8c4cea0337] net: add missing dtls permission check
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 20:06:59 2026 -0700
2 files changed, 12 insertions(+), 2 deletions(-)
Rebasing (15/24)
Rebasing (16/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fix multiple minor dtls issues

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 50aa4e46d7] net: fix multiple minor dtls issues
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 20:21:29 2026 -0700
4 files changed, 100 insertions(+), 33 deletions(-)
create mode 100644 test/parallel/test-dtls-servername-invalid.mjs
Rebasing (17/24)
Rebasing (18/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: improve dtls buffer handling

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 469499b6e3] net: improve dtls buffer handling
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 20:31:03 2026 -0700
3 files changed, 21 insertions(+), 9 deletions(-)
Rebasing (19/24)
Rebasing (20/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: additional dtls fixups and tests

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 0863484a5d] net: additional dtls fixups and tests
Author: James M Snell <jasnell@gmail.com>
Date: Sun Jul 5 21:13:30 2026 -0700
8 files changed, 98 insertions(+), 29 deletions(-)
create mode 100644 test/parallel/test-dtls-srtp.mjs
Rebasing (21/24)
Rebasing (22/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
test: dtls test improvements

Signed-off-by: James M Snell <jasnell@gmail.com>
Assisted-by: Claude/Opus
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 065a23185d] test: dtls test improvements
Author: James M Snell <jasnell@gmail.com>
Date: Mon Jul 6 07:26:27 2026 -0700
14 files changed, 697 insertions(+), 7 deletions(-)
create mode 100644 test/parallel/test-dtls-accessors.mjs
create mode 100644 test/parallel/test-dtls-ciphers.mjs
create mode 100644 test/parallel/test-dtls-client-cert.mjs
create mode 100644 test/parallel/test-dtls-errors.mjs
create mode 100644 test/parallel/test-dtls-keylog.mjs
create mode 100644 test/parallel/test-dtls-mtu.mjs
create mode 100644 test/parallel/test-dtls-reject-unauthorized.mjs
create mode 100644 test/parallel/test-dtls-robustness.mjs
create mode 100644 test/parallel/test-dtls-send.mjs
Rebasing (23/24)
Rebasing (24/24)
Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
net: fixup dtls c++ formatting

Signed-off-by: James M Snell <jasnell@gmail.com>
PR-URL: #64314
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>

[detached HEAD 17f1194cf3] net: fixup dtls c++ formatting
Author: James M Snell <jasnell@gmail.com>
Date: Tue Jul 7 06:53:01 2026 -0700
1 file changed, 1 insertion(+), 2 deletions(-)
Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/30685262905

@jasnell jasnell added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. commit-queue-failed An error occurred while landing this pull request using GitHub Actions. labels Aug 1, 2026
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Aug 1, 2026
@nodejs-github-bot
nodejs-github-bot merged commit a7d16a8 into nodejs:main Aug 1, 2026
87 checks passed
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Landed in a7d16a8

@MikeMcC399

MikeMcC399 commented Aug 1, 2026

Copy link
Copy Markdown
Contributor

@jasnell

When this PR landed, it showed linting errors running make lint-js

https://github.com/nodejs/node/actions/runs/30687387385/job/91335821935

This is affecting other commits landing in main

Edit: #64902 is targeted to fix the linting

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author ready PRs that have at least one approval, no pending requests for changes, and a CI started. c++ Issues and PRs that require attention from people who are familiar with C++. commit-queue-squash Add this label to instruct the Commit Queue to squash all the PR commits into the first one. lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants