Skip to content

fix(minvmd): drop proxy opening TCP packets toward published ports - #2079

Merged
norrietaylor merged 4 commits into
mainfrom
inbox-patch/fix/drop-proxy-syn-published-port-1ab8dbd4ba7842c3
Oct 8, 2026
Merged

norrietaylor merged 4 commits into
mainfrom
inbox-patch/fix/drop-proxy-syn-published-port-1ab8dbd4ba7842c3

Conversation

@gominimal-aw-bot

@gominimal-aw-bot gominimal-aw-bot Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVu145A

In relay_switch_frames_to_guest, the recorded-IP block delivered every
proxy-sourced packet toward a published inside port. Drop a Box Egress
Proxy-sourced bare-SYN TCP packet there at the top of the block, before
observe_delivered runs, so the proxy's address cannot plant an inbound
flow record or reach the box. SYN-ACKs and ACKs it sends back are not
opening packets and still pass. Adds a unit test proving the bare SYN is
dropped without a reply-flow record while the proxy's SYN-ACK answer
still reaches the guest.

Verification

  • cargo fmt --all --check --manifest-path Cargo.toml — pass
  • cargo clippy --workspace --all-targets --locked --manifest-path Cargo.toml -- -D warnings — pass
  • cargo test --locked --manifest-path Cargo.toml -p minvmd net::egress_gate::tests — 87 passed

Note: full -p minvmd lib run shows 3 pre-existing failures in
net::answerer.rs/sock.rs (SetGlobalDefaultError tracing isolation);
each passes in isolation and none is touched by this change.

Summary by CodeRabbit

  • Bug Fixes
    • Prevented TCP connection-opening packets (SYN without ACK) from the Box Egress Proxy from reaching guests on published inside ports. These packets are dropped before reply-flow processing. SYN-ACK replies and other proxy-sourced traffic continue through the relay path and remain eligible for delivery. Rate-limited warnings identify the destination box and port for these drops.

In relay_switch_frames_to_guest, drop Box Egress Proxy-sourced
bare-SYN TCP packets addressed to a box's published inside port at
ingress, before any observation or delivery. The proxy only answers
(NET-134) and never opens toward a box, so a bare SYN from its
address has no legitimate origin; dropping it keeps the proxy from
planting an inbound flow record or reaching the box. SYN-ACKs and
ACKs it sends back are not opening packets and still pass.

Adds a unit test proving the bare SYN is dropped without opening a
reply-flow record, while the proxy's SYN-ACK answer still reaches
the guest.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@gominimal-aw-bot
gominimal-aw-bot Bot requested a review from a team as a code owner October 8, 2026 00:24
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. label Oct 8, 2026
@coderabbitai

coderabbitai Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: 5975943f-5f13-4a85-ae89-1d996a604312
📥 Commits

Reviewing files that changed from the base of the PR and between b7cd61b and da44ae0.

📒 Files selected for processing (1)
  • crates/minvmd/src/net/egress_gate.rs

Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review.


📝 Walkthrough

Walkthrough

The ingress relay drops proxy-sourced TCP packets with SYN set and ACK clear before flow observation or guest delivery. Other proxy-sourced packets, including SYN-ACKs, continue through. A rate-limited warning identifies each destination box and port.

Changes

Proxy SYN Relay Gate

Layer / File(s) Summary
Filter proxy opening packets and verify relay behavior
crates/minvmd/src/net/egress_gate.rs
The ingress relay drops proxy-sourced TCP packets with SYN set and ACK clear before flow observation or delivery. A new rule and per-box warning limiter identify these drops. Documentation and tests cover the filter, warning limits, and continued delivery of a SYN-ACK and a marker frame.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to da44a

The change stops proxy-originated connection openings from reaching boxes while leaving established and reply traffic alone. No merge-blocking risk is evident.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title is concise, specific, and follows the required Conventional Commit format. It clearly describes the main change.
Description check ✅ Passed The description explains the change, expected behavior, testing performed, and known pre-existing test failures. It omits the template's Summary and Checklist headings, and uses Verification instead o…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autopilot · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the packets at the gate
Bare SYNs pause before they reach the crate
The SYN-ACK and marker carry through
A warning keeps each box in view
Then hops away, its checklist complete

Comment @coderabbitai help to get the list of available commands.

@norrietaylor
norrietaylor enabled auto-merge October 8, 2026 00:28
Rate-limit and name the ingress drop of a proxy-sourced opening TCP
packet under its own rule, egress-proxy-opening-toward-box, keyed per
box. Correct observe_delivered's doc, which said every proxy-sourced
frame is still delivered. Cover a SYN carrying other flags without ACK.
@norrietaylor norrietaylor changed the title fix: fix(minvmd): drop proxy opening TCP packets toward published ports fix(minvmd): drop proxy opening TCP packets toward published ports Oct 8, 2026
@norrietaylor

Copy link
Copy Markdown
Member

/review

@minimal-foundry

minimal-foundry Bot commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Approved: no findings at da44ae01bb52.

Nothing to do.

Clobber: none: git log on the file shows the last commits before the three PR commits are the prior proxy-source decline (#2073) and unrelated fixes; nothing reverted.

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

@minimal-foundry minimal-foundry Bot added the review:approved minimal-review approved the current head label Oct 8, 2026
@gominimal-aw-bot gominimal-aw-bot Bot added the agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch label Oct 8, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 8, 2026
@norrietaylor

Copy link
Copy Markdown
Member

/review

@minimal-foundry minimal-foundry Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

minimal-review — approved

Verdict APPROVE — No findings.

Merged via the queue into main with commit e05b294 Oct 8, 2026
36 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/drop-proxy-syn-published-port-1ab8dbd4ba7842c3 branch October 8, 2026 01:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent:fix Agentic fix PR eligible for review iteration; min-aw's worker-iterate gates on it. agent:resolve Consent gate: pr-conflict-resolver may rewrite this branch review:approved minimal-review approved the current head

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant