GeezerVisonThe World Wide Web, restored to 800 pixels of glory. | |||||||||||||||||||||||||||||||||||
| Home|About|Gaming cabinet|Archives|How it works|Starter sites | |||||||||||||||||||||||||||||||||||
GeezerVison is showing github.com — http: forward-port pending-read fix (CVE-2026-105481) to lib/internal/http/agent.js by emyei · Pull Request #67073 · nodejs/node Conversation
Contributor
Summary
Why now, in the openNo information here is under embargo: the original fix and its CVE have been public since 2026-10-20, and no supported/published Node.js version is affected — only Test plan
🤖 Generated with Claude Code
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page. All reactions
Collaborator
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Contributor
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
Member
All reactions
Sorry, something went wrong. Uh oh!
There was an error while loading. Please reload this page.
|
There was an error while loading. Please reload this page.
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@ ## main #67073 +/- ## ========================================== + Coverage 90.65% 90.70% +0.05% ========================================== Files 797 801 +4 Lines 278482 281924 +3442 Branches 53559 54329 +770 ========================================== + Hits 252445 255717 +3272 + Misses 16393 16345 -48 - Partials 9644 9862 +218
🚀 New features to boost your workflow:
|
Sorry, something went wrong.
There was an error while loading. Please reload this page.
|
I'd like to get this merged sooner rather than later. @emyei do you mind updating the commit message? If not, in a few days I'll patch up the commit message and finish this myself. |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The Agent data guard only runs once the event loop polls for I/O. Data that reaches an idle kept-alive socket's OS buffer right before that poll can be handed to the next request as if it were that request's own response (response-queue poisoning). Commit 0683ee5 ("http: ensure agent data guard works without I/O", CVE-2026-105481) fixed this by checking the OS directly via a new LibuvStreamWrap::HasPendingRead before reusing a free socket. It landed in lib/_http_agent.js on the release branches (shipped in v26.12.1) but was never forward-ported after PR nodejs#58535 moved the Agent implementation to lib/internal/http/agent.js on main five days earlier. As a result, main (and any v27 nightly built from it) lost the protection even though every supported release line (22.x/24.x/ 26.x) still has it. This restores the complete fix on main: - lib/internal/http/agent.js: re-add the hasPendingRead() helper and its two call sites (the free socket handed to a queued request, and the free-pool socket selected in addRequest), ported 1:1 to the current structure of the file. - lib/internal/tls/wrap.js, src/stream_wrap.cc/.h: unchanged from the original fix, which already applies cleanly on main. - test/parallel/test-http-agent-free-socket-pending-read.js: restore the regression test covering both assignment paths, so the fix cannot be silently dropped again by a future refactor. Fixes: https://hackerone.com/reports/4038361 CVE-ID: CVE-2026-105481 Co-authored-by: Tim Perry <[email protected]> Signed-off-by: Tim Perry <[email protected]>
85e07cd to
f60d783
Compare
There was a problem hiding this comment.
The reason will be displayed to describe this comment to others. Learn more.
I've force pushed to sign this myself to fix the commit message (under 'b' from the DCO, I think I can sign this off as closely based on existing code we've already merged).
I'll land once CI etc passes.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Failed to resume CI
Full Auto Start CI output |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
Sorry, something went wrong.
There was an error while loading. Please reload this page.
There was an error while loading. Please reload this page.
|
Landed in bf07bea |
Sorry, something went wrong.
There was an error while loading. Please reload this page.
The Agent data guard only runs once the event loop polls for I/O. Data that reaches an idle kept-alive socket's OS buffer right before that poll can be handed to the next request as if it were that request's own response (response-queue poisoning). Commit 0683ee5 ("http: ensure agent data guard works without I/O", CVE-2026-105481) fixed this by checking the OS directly via a new LibuvStreamWrap::HasPendingRead before reusing a free socket. It landed in lib/_http_agent.js on the release branches (shipped in v26.12.1) but was never forward-ported after PR #58535 moved the Agent implementation to lib/internal/http/agent.js on main five days earlier. As a result, main (and any v27 nightly built from it) lost the protection even though every supported release line (22.x/24.x/ 26.x) still has it. This restores the complete fix on main: - lib/internal/http/agent.js: re-add the hasPendingRead() helper and its two call sites (the free socket handed to a queued request, and the free-pool socket selected in addRequest), ported 1:1 to the current structure of the file. - lib/internal/tls/wrap.js, src/stream_wrap.cc/.h: unchanged from the original fix, which already applies cleanly on main. - test/parallel/test-http-agent-free-socket-pending-read.js: restore the regression test covering both assignment paths, so the fix cannot be silently dropped again by a future refactor. Fixes: https://hackerone.com/reports/4038361 CVE-ID: CVE-2026-105481 Co-authored-by: Tim Perry <[email protected]> Signed-off-by: Tim Perry <[email protected]> PR-URL: #67073 Reviewed-By: Tim Perry <[email protected]> Reviewed-By: James M Snell <[email protected]>
The Agent data guard only runs once the event loop polls for I/O. Data that reaches an idle kept-alive socket's OS buffer right before that poll can be handed to the next request as if it were that request's own response (response-queue poisoning). Commit 0683ee5 ("http: ensure agent data guard works without I/O", CVE-2026-105481) fixed this by checking the OS directly via a new LibuvStreamWrap::HasPendingRead before reusing a free socket. It landed in lib/_http_agent.js on the release branches (shipped in v26.12.1) but was never forward-ported after PR nodejs#58535 moved the Agent implementation to lib/internal/http/agent.js on main five days earlier. As a result, main (and any v27 nightly built from it) lost the protection even though every supported release line (22.x/24.x/ 26.x) still has it. This restores the complete fix on main: - lib/internal/http/agent.js: re-add the hasPendingRead() helper and its two call sites (the free socket handed to a queued request, and the free-pool socket selected in addRequest), ported 1:1 to the current structure of the file. - lib/internal/tls/wrap.js, src/stream_wrap.cc/.h: unchanged from the original fix, which already applies cleanly on main. - test/parallel/test-http-agent-free-socket-pending-read.js: restore the regression test covering both assignment paths, so the fix cannot be silently dropped again by a future refactor. Fixes: https://hackerone.com/reports/4038361 CVE-ID: CVE-2026-105481 Co-authored-by: Tim Perry <[email protected]> Signed-off-by: Tim Perry <[email protected]> PR-URL: nodejs#67073 Reviewed-By: Tim Perry <[email protected]> Reviewed-By: James M Snell <[email protected]>
There was an error while loading. Please reload this page.
Successfully merging this pull request may close these issues.
There was an error while loading. Please reload this page.