Repository navigation
fix(minvmd): drop proxy opening TCP packets toward published ports - #2079
norrietaylor merged 4 commits into
Conversation
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>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
Included review availability: This review used your included allowance. Your plan provides up to 5 included reviews per hour; 0 remain after this review. 📝 WalkthroughWalkthroughThe 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. ChangesProxy SYN Relay Gate
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to 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)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit checks the packets at the gate Comment |
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.
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
|
/review |
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVu145A
In
relay_switch_frames_to_guest, the recorded-IP block delivered everyproxy-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_deliveredruns, so the proxy's address cannot plant an inboundflow 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— passcargo clippy --workspace --all-targets --locked --manifest-path Cargo.toml -- -D warnings— passcargo test --locked --manifest-path Cargo.toml -p minvmd net::egress_gate::tests— 87 passedNote: full
-p minvmdlib run shows 3 pre-existing failures innet::answerer.rs/sock.rs(SetGlobalDefaultErrortracing isolation);each passes in isolation and none is touched by this change.
Summary by CodeRabbit