Repository navigation
fix(minvmd): record no reply flow sourced from the egress proxy's address - #2073
Conversation
observe_delivered records a reply flow for every delivered frame the forwarder opens, and mints an entry before any verdict is consulted. A frame sourced from the switch subnet's Box Egress Proxy address is host-side infrastructure no box ever dials through, yet it would otherwise record a flow, letting the box reverse-answer a stream the proxy originated. Refuse such frames before consulting or minting any record. This is defense in depth: gate_verdict already refuses a box's frames *to* the proxy, but a proxy-sourced frame wearing the box's lease would still record and open an admit. Returning None keeps delivery and records nothing, matching the existing Untracked behaviour. Thread the SwitchSubnet into observe_delivered so the caller supplies the subnet already held on the table, and cover it with proxy_sourced_dial_records_no_reply_flow.
|
Warning Review limit reached
This review includes 1 billable file and costs up to $0.25. Or wait 15 minutes for your next included review. View limit detailsLimit details: You’ve used all 2 included reviews currently available. Review configuration: ⚙️ Run configuration
📒 Files selected for processing (1)
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configuration
📒 Files selected for processing (1)
🚧 Files skipped from review as they are similar to previous changes (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. 📝 WalkthroughWalkthrough
ChangesProxy-Sourced Reply-Flow Exclusion
Priority: ⬇️ Low Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix · Severity of issue fixed: Low Suggested reviewers: Merge Risk: ⚪ Minimal · up to No actionable issue remains from the supplied evidence; the change is mergeable after normal checks. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
A rabbit guards the proxy lane, Comment |
|
/review |
|
Approved: no findings at Nothing to do. Clobber: none: |
|
/review |
…s proxy gate_verdict's reply-flow admit now skips any frame whose destination is the subnet's Box Egress Proxy address, so no record, however minted, admits a box frame to the proxy; such frames go on to the proxy lane arm, which decides by the row's lane declaration (NET-134). The observe_delivered decline stays as a second layer. Correct the premise in the observe_delivered and test docs: a credentialed lane's box does dial the proxy's listener (NET-134); the proxy only answers and never opens a connection toward a box, so a proxy-sourced opening packet at a published port has no legitimate origin. Add reply_flow_record_never_admits_a_frame_to_the_proxy, which mints the record directly on the entry's flow table, bypassing the decline.
|
/review |
|
/review |
Routing-Key: inbox-route/I_kwDOSUhdos8AAAABVrwbJQ
Fixes gominimal/inbox#1002.
ReplyTables::observe_deliveredrecords a reply flow from any deliveredopening packet at a published inside port. As defense in depth, it now
declines to record a flow whose source is the switch subnet's
Box Egress Proxy address: the proxy is host-side infrastructure no box
ever dials through, so a flow claiming that source earns no reply record.
The decline precedes the record itself —
Noneis returned before anyentry is consulted or minted, so a proxy-sourced dial mints no entry
(
record_count_ofisNone, notSome(0)), and the production callertreats it identically to an untracked frame: deliver, record nothing.
This is not the primary control. A lane-less box's direct connection to
the proxy listener is already refused by minvmd's gate, and by the relay
leg per #1885. This change only closes off the reply
path so it can never grant the proxy address anything either.
Changes
SwitchSubnetintoobserve_deliveredand refuse frames whosesource equals
box_egress_proxy_address()before consulting the table.proxy_sourced_dial_records_no_reply_flow, asserting theproxy-sourced dial mints no record and the box's answer is refused as
the proxy-lane drop.
Verification
cargo fmt --all --check— clean.cargo clippy --workspace --all-targets --locked -- -D warnings— clean.cargo test --locked -p minvmd --lib net::egress_gate::tests— 85 passed,including the new test.
The full
-p minvmdsuite reports 402 passed / 3 failed; the three failures(
net::answerer::tests::*tracing subscriber double-install, andsock::tests::resolve_uds_path_lives_in_provider_dirpath assumption) arepre-existing and unrelated to this change, which touches only
crates/minvmd/src/net/egress_gate.rs.Summary by CodeRabbit