GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — net: fail closed when BlockList peer address is unavailable by mcollina · Pull Request #66640 · nodejs/node

Conversation

@mcollina

@mcollina mcollina commented Oct 10, 2026

Copy link
Copy Markdown
Member

When a net.Server is configured with a blockList, the peer address is looked up with getpeername() and checked before the connection is accepted. If the peer address cannot be obtained (for example, the connection was reset before getpeername(), causing uv_tcp_getpeername() to return ENOTCONN), the access-control check was silently skipped and the connection proceeded, allowing a blocked peer to reach the application's 'connection' handler (fail open).

Fail closed: when a BlockList is configured but the peer address cannot be determined, close the connection instead of bypassing the check. A connection whose peer address cannot be obtained cannot be proven to be allowed, so it must be refused.

Ref: #66422
Ref: libuv/libuv#5337

Assisted-by: pi

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bobnil reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@nodejs-github-bot

nodejs-github-bot commented Oct 10, 2026

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/net
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem. labels Oct 10, 2026
@mcollina
mcollina force-pushed the net-blocklist-fail-closed branch from fce951a to 06c4567 Compare October 10, 2026 09:54
@codecov

codecov Bot commented Oct 10, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.47%. Comparing base (96ee81c) to head (2841c91).
⚠️ Report is 419 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #66640      +/-   ##
==========================================
+ Coverage   90.35%   90.47%   +0.11%     
==========================================
  Files         790      791       +1     
  Lines      273814   277248    +3434     
  Branches    52382    53311     +929     
==========================================
+ Hits       247409   250835    +3426     
+ Misses      16906    16813      -93     
- Partials     9499     9600     +101     
Files with missing lines Coverage Δ
lib/net.js 94.78% <100.00%> (+0.35%) ⬆️

... and 182 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.
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina
net: fail closed when BlockList peer address is unavailable
2841c91
When a net.Server is configured with a `blockList`, the peer address is
looked up with getpeername() and checked before the connection is
accepted. If the peer address cannot be obtained (for example, the
connection was reset before getpeername(), causing
uv_tcp_getpeername() to return ENOTCONN), the access-control check was
silently skipped and the connection proceeded, allowing a blocked peer
to reach the application's 'connection' handler (fail open).

Fail closed: when a BlockList is configured but the peer address cannot
be determined, close the connection instead of bypassing the check. A
connection whose peer address cannot be obtained cannot be proven to be
allowed, so it must be refused.

Ref: nodejs#66422
Ref: libuv/libuv#5337

Signed-off-by: Matteo Collina <[email protected]>
Assisted-by: pi
@mcollina
mcollina force-pushed the net-blocklist-fail-closed branch from 06c4567 to 2841c91 Compare October 13, 2026 10:22
pimterry
pimterry approved these changes Oct 13, 2026
View reviewed changes
@pimterry pimterry 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 Oct 13, 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 Oct 13, 2026
@nodejs-github-bot

nodejs-github-bot commented Oct 13, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78368/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina mcollina added the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Oct 16, 2026
@github-actions github-actions Bot added resume-ci-failed Resuming CI with the resume-ci label failed and requires manual intervention. and removed resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. labels Oct 16, 2026
@github-actions

github-actions Bot commented Oct 16, 2026

Copy link
Copy Markdown
Contributor

Failed to resume CI

✖ CI job 78368 is in status RUNNING, skipping resume

Full Auto Start CI output
�[36m⠋�[39m Validating Jenkins credentials
�[36m⠋�[39m Validating Jenkins credentials
✔  Jenkins credentials valid
�[36m⠙�[39m Looking for CI runs for pull request 66640
�[36m⠙�[39m Looking for CI runs for pull request 66640
�[36m⠙�[39m Getting PR from nodejs/node/pull/66640
�[36m⠙�[39m Getting reviews from nodejs/node/pull/66640
�[36m⠙�[39m Getting comments from nodejs/node/pull/66640
✔  Found PR CI job 78368
�[36m⠹�[39m Querying data for job/node-test-pull-request/78368/
�[36m⠹�[39m Querying data for job/node-test-pull-request/78368/
�[36m⠹�[39m Querying API for job/node-test-pull-request/78368/
✔  Build data downloaded
   ✖  CI job 78368 is in status RUNNING, skipping resume

View workflow run

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@panva panva added resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. and removed resume-ci-failed Resuming CI with the resume-ci label failed and requires manual intervention. labels Oct 16, 2026
@github-actions github-actions Bot removed the resume-ci Add this label to resume the latest eligible Jenkins CI run on a PR with an approving review. label Oct 16, 2026
@nodejs-github-bot

nodejs-github-bot commented Oct 16, 2026

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/78432/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mcollina mcollina added the commit-queue PRs queued for automated landing through the Commit Queue. label Oct 16, 2026
@nodejs-github-bot nodejs-github-bot added the lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. label Oct 16, 2026
@nodejs-github-bot
nodejs-github-bot merged commit 269cab6 into nodejs:main Oct 17, 2026
81 checks passed

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot

nodejs-github-bot commented Oct 17, 2026

Copy link
Copy Markdown
Collaborator

Landed in 269cab6

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot removed commit-queue PRs queued for automated landing through the Commit Queue. lacks-second-approval Commit Queue PRs awaiting a second collaborator approval or completion of the required wait. labels Oct 17, 2026
@aduh95 aduh95 mentioned this pull request Oct 27, 2026
2026-10-28, Version 27.0.0-alpha.0.0.0 (Alpha) #67062
Merged
aduh95 pushed a commit that referenced this pull request Nov 12, 2026
@mcollina @aduh95
net: fail closed when BlockList peer address is unavailable
a12ec11
When a net.Server is configured with a `blockList`, the peer address is
looked up with getpeername() and checked before the connection is
accepted. If the peer address cannot be obtained (for example, the
connection was reset before getpeername(), causing
uv_tcp_getpeername() to return ENOTCONN), the access-control check was
silently skipped and the connection proceeded, allowing a blocked peer
to reach the application's 'connection' handler (fail open).

Fail closed: when a BlockList is configured but the peer address cannot
be determined, close the connection instead of bypassing the check. A
connection whose peer address cannot be obtained cannot be proven to be
allowed, so it must be refused.

Ref: #66422
Ref: libuv/libuv#5337

Signed-off-by: Matteo Collina <[email protected]>
Assisted-by: pi
PR-URL: #66640
Refs: #66422
Refs: libuv/libuv#5337
Reviewed-By: Tim Perry <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 13, 2026
@mcollina @aduh95
net: fail closed when BlockList peer address is unavailable
fbe987c
When a net.Server is configured with a `blockList`, the peer address is
looked up with getpeername() and checked before the connection is
accepted. If the peer address cannot be obtained (for example, the
connection was reset before getpeername(), causing
uv_tcp_getpeername() to return ENOTCONN), the access-control check was
silently skipped and the connection proceeded, allowing a blocked peer
to reach the application's 'connection' handler (fail open).

Fail closed: when a BlockList is configured but the peer address cannot
be determined, close the connection instead of bypassing the check. A
connection whose peer address cannot be obtained cannot be proven to be
allowed, so it must be refused.

Ref: #66422
Ref: libuv/libuv#5337

Signed-off-by: Matteo Collina <[email protected]>
Assisted-by: pi
PR-URL: #66640
Refs: #66422
Refs: libuv/libuv#5337
Reviewed-By: Tim Perry <[email protected]>
This was referenced Nov 20, 2026
2026-11-30, Version 24.23.0 'Krypton' (LTS) #67663
Open
2026-11-30, Version 26.14.0 'Lithium' (LTS) #67664
Open
gabylb pushed a commit to gabylb/node that referenced this pull request Nov 27, 2026
@mcollina @gabylb
net: fail closed when BlockList peer address is unavailable
5152a17
When a net.Server is configured with a `blockList`, the peer address is
looked up with getpeername() and checked before the connection is
accepted. If the peer address cannot be obtained (for example, the
connection was reset before getpeername(), causing
uv_tcp_getpeername() to return ENOTCONN), the access-control check was
silently skipped and the connection proceeded, allowing a blocked peer
to reach the application's 'connection' handler (fail open).

Fail closed: when a BlockList is configured but the peer address cannot
be determined, close the connection instead of bypassing the check. A
connection whose peer address cannot be obtained cannot be proven to be
allowed, so it must be refused.

Ref: nodejs#66422
Ref: libuv/libuv#5337

Signed-off-by: Matteo Collina <[email protected]>
Assisted-by: pi
PR-URL: nodejs#66640
Refs: nodejs#66422
Refs: libuv/libuv#5337
Reviewed-By: Tim Perry <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@pimterry pimterry pimterry approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

needs-ci PRs that need a full CI run. net Issues and PRs related to the net subsystem.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mcollina @nodejs-github-bot @pimterry @panva
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.