Skip to content

quic: do not register locally issued reset tokens - #67835

Open
jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:pr-67000
Open

jasnell wants to merge 2 commits into
nodejs:mainfrom
jasnell:pr-67000

Conversation

@jasnell

@jasnell jasnell commented Nov 27, 2026

Copy link
Copy Markdown
Member

Takes over #67000 with a commit for the failing test. Original commit author is preserved

woolfi182 and others added 2 commits November 27, 2026 20:40
The stateless reset tokens that a session generates for its own
connection IDs (in NEW_CONNECTION_ID frames and for the preferred
address) were added to the token map that the endpoint consults for
incoming stateless resets. That map is meant to hold only the tokens
issued by the peer, and session teardown only removes those, so the
locally issued entries outlived the session as dangling pointers.

A short header packet for an unknown connection ID that ended in one
of these tokens was then dispatched to the destroyed session instead
of being answered with a stateless reset, and once the session had
been garbage collected the lookup read freed memory.

Assisted-by: Claude Code
Signed-off-by: woolfi182 <maksymmosiura@gmail.com>
The static import of node:crypto threw ERR_NO_CRYPTO in builds
without OpenSSL before the hasQuic check could skip the test.
Import it dynamically after the check, as the other QUIC tests do.

Refs: nodejs#67000
Assisted-by: Claude Code
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/quic

@nodejs-github-bot nodejs-github-bot added c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation. labels Nov 27, 2026
@jasnell jasnell changed the title Pr 67000 quic: do not register locally issued reset tokens Nov 27, 2026
@jasnell jasnell moved this to Ready for Review in QUIC Team Nov 27, 2026
@codecov

codecov Bot commented Nov 27, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.51%. Comparing base (7ed1ca0) to head (bc9aa90).
⚠️ Report is 15 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main   #67835   +/-   ##
=======================================
  Coverage   90.51%   90.51%           
=======================================
  Files         805      805           
  Lines      285878   285878           
  Branches    55200    55188   -12     
=======================================
  Hits       258756   258756           
+ Misses      17214    17212    -2     
- Partials     9908     9910    +2     

see 28 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.

@jasnell jasnell added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 27, 2026
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 27, 2026
@nodejs-github-bot

Copy link
Copy Markdown
Collaborator

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

Labels

c++ Issues and PRs that require attention from people who are familiar with C++. needs-ci PRs that need a full CI run. quic Issues and PRs related to the QUIC transport implementation.

Projects

Status: Ready for Review

Development

Successfully merging this pull request may close these issues.

3 participants