-
-
Notifications
You must be signed in to change notification settings - Fork 80.7k
isPortBusy preflight misses IPv4-only occupant (same address-family flaw as #94379) #94426
Copy link
Copy link
Closed
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Description
Metadata
Metadata
Assignees
Labels
P2Normal backlog priority with limited blast radius.Normal backlog priority with limited blast radius.clawsweeper:linked-pr-openClawSweeper found an open linked pull request for this issue.ClawSweeper found an open linked pull request for this issue.clawsweeper:no-new-fix-prClawSweeper does not recommend queueing a new automated fix PR for this issue.ClawSweeper does not recommend queueing a new automated fix PR for this issue.clawsweeper:source-reproClawSweeper found a high-confidence source-level issue reproduction.ClawSweeper found a high-confidence source-level issue reproduction.impact:otherThis issue has meaningful maintainer-visible impact outside the owned taxonomy.This issue has meaningful maintainer-visible impact outside the owned taxonomy.issue-rating: 🦞 diamond lobsterVery strong issue quality with high-confidence source-level or clear reproduction.Very strong issue quality with high-confidence source-level or clear reproduction.
Type
Fields
Priority
None yet
Summary
isPortBusyinsrc/cli/ports.ts:132(thegateway --forcekill-port guard) shares the same address-family flaw fixed for the CDP preflight in #94379 / #94415.A bare
tryListenOnPortbinds the IPv6 wildcard (::) on a dual-stack host. An occupant listening only on127.0.0.1(IPv4-only) does not conflict with that bind, soisPortBusyreturnsfalseand reports the port as free when it is actually taken.Impact
Different surface and lower harm than #94379: this guards the
gateway --forceflow (used to detect/kill a stale process holding the port). A false "not busy" here means the force-kill path may conclude there is nothing to reclaim while an IPv4-only listener is in fact occupying the port. It does not silently let Chrome bind a busy port (that was the #94379 symptom), so it was deliberately left out of scope of #94415 to keep that PR focused.Suggested fix
Route
isPortBusythroughcheckPortInUse(exported fromsrc/infra/ports-inspect.tsas of #94415), which probes all four endpoints —127.0.0.1,0.0.0.0,::1,::— instead of a single bare listen. Map its"busy"result totrue. Add a regression test mirroring the IPv4-only guard added insrc/infra/ports.test.ts.References