Skip to content

test(e2e): aim the escape-union cross arms at public halves of 198.18.0.0/15 - #2350

Merged
norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/e2e-escape-union-public-halves-74686e4a0c5f1acb
Oct 20, 2026
Merged

norrietaylor merged 3 commits into
mainfrom
inbox-patch/fix/e2e-escape-union-public-halves-74686e4a0c5f1acb

Conversation

@gominimal-aw-bot

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

Copy link
Copy Markdown
Contributor

Routing-Key: inbox-route/I_kwDOSUhdos8AAAABU7fGdg

The cross-box spoof arms of the escape-union e2e proof
(proof_escape_reaches_only_declared_union in scripts/session-e2e.sh)
aimed at RFC 1918 addresses (192.168.77.7, 10.0.0.7). The gate's
infrastructure rule therefore took those frames before the row's own
rules could, and the refusals landed on egress-infrastructure-destination
instead of egress-undeclared-subnet — so a union-bound regression would
have stayed green: the verdict the case rides on never fired.

The two boxes now declare the disjoint public halves of 198.18.0.0/15
(box A 198.18.0.0/16, box B 198.19.0.0/16) — RFC 2544 benchmark space,
outside every infrastructure range — so a cross-box frame falls through
to the row's own rules and is refused under egress-undeclared-subnet,
the verdict that actually proves the union bound. Raised in the design
review of #1943.

Because both of box A's undeclared-subnet arms (cross and far-side) wear
the same address under the same rule, they share one 60s rate-limit
window (DropLimiter, keyed by source and rule only, never destination).
The made-up arms dodge the limiter by wearing a fresh source address;
these two cannot — the address each wears is box A's own, which is the
bound they prove — so the window is waited out between them (sleep 60).

The in-crate twin needs no change: its cross arms were removed upstream
(T89) and the bound is pinned by the unit case
spoofed_source_bounded_to_resident_union, already on TEST-NET-1.

Verification

  • cargo fmt --all --check --manifest-path target/Cargo.toml — clean
  • cargo clippy --workspace --all-targets --locked --manifest-path target/Cargo.toml -- -D warnings — clean
  • cargo test --locked -p minvmd --manifest-path target/Cargo.toml — 575 passed; 3 failures are pre-existing sandbox flakes (tracing-subscriber global-state collisions and a /state/minimal path this sandbox lacks), reproduced on the pristine baseline and passing in isolation
  • cargo test -p minvmd egress_gate (with the change in place) — 123 passed, 0 failed
  • live-session: test-kvm (ci-linux-kvm.yml) and native-daemon-e2e (ci-linux-native.yml) — both trigger on scripts/** and run on this PR; not runnable in the fixer sandbox (no /dev/kvm)

Summary by CodeRabbit

  • Tests
    • Updated security validation scenarios to use distinct public address ranges and verify that traffic outside a source’s declared range is reported as an undeclared-subnet violation.
    • Adjusted probe timing to account for rate limiting based on source and rule, and updated related expectations and diagnostic messages.

The cross-box spoof arms of proof_escape_reaches_only_declared_union
aimed at RFC 1918 addresses (192.168.77.7, 10.0.0.7), so the gate's
infrastructure rule took them before the row's own rules could and
the refusals landed on egress-infrastructure-destination. A union-
bound regression would have stayed green: the verdict the case rides
on never fired.

Give the two boxes disjoint public halves of 198.18.0.0/15 instead
(box A 198.18.0.0/16, box B 198.19.0.0/16) — RFC 2544 benchmark
space, outside every infrastructure range — so a cross-box frame
falls through to the row's own rules and is refused under
egress-undeclared-subnet, the verdict that actually proves the union
bound.

Both of box A's undeclared-subnet arms (cross and far-side) wear the
same address under the same rule, sharing one 60s rate-limit window
(DropLimiter, keyed by source and rule only). The made-up arms dodge
the limiter with a fresh source address; these two cannot, so the
window is waited out between them instead.

The in-crate twin needs no change: its cross arms were removed in
T89 and the bound is pinned by the unit case on TEST-NET-1.

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 19, 2026 09:31
@gominimal-aw-bot gominimal-aw-bot Bot added 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 labels Oct 19, 2026
@coderabbitai

coderabbitai Bot commented Oct 19, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Important

Review skipped

Review was skipped as selected files did not have any reviewable changes.

⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c032a013-9c0d-4bc9-8a2f-3ec61e1de30a
📥 Commits

Reviewing files that changed from the base of the PR and between 2baebea and 3c787d8.

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review

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: 09c24544-6d09-4a66-b48a-2144c60f627e
📥 Commits

Reviewing files that changed from the base of the PR and between d67d78e and 119a6f5.

📒 Files selected for processing: 1
  • scripts/session-e2e.sh

Included review availability: This review used your included allowance. 2 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 4 reviews per hour.

📝 Walkthrough

The session end-to-end fixture now uses disjoint benchmark ranges for boxes A and B. Its cross-range probes expect egress-undeclared-subnet, and a 60-second delay separates two rate-limited box A probes.

Changes: Session egress fixture

Layer / File(s) Summary
Declare benchmark ranges
scripts/session-e2e.sh
The fixture documentation, box declarations, printed summaries, and expected policy rows use 198.18.0.0/16 and 198.19.0.0/16.
Check cross-range refusals
scripts/session-e2e.sh
Reciprocal cross-range probes expect egress-undeclared-subnet. A 60-second delay separates box A probes that share a source and rule for rate limiting.

Priority: ⬇️ Low

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

Change: Bug fix

Suggested reviewers: norrietaylor

Merge Risk: ⚪ Minimal · up to 119a6

The updated probes check the intended refusal. No actionable merge-blocking risk is established; the live VM check remains unrun.

Pre-merge checks: Passed 5
Check name Status Explanation
Description check Passed The description explains the problem, the implementation, the rate-limit handling, and verification results. It does not include the template's explicit Checklist section, but the required information…
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.
Title check Passed The title clearly and concisely describes the main change: updating the escape-union cross arms to use public halves of 198.18.0.0/15.
Full details: Description check

Explanation

The description explains the problem, the implementation, the rate-limit handling, and verification results. It does not include the template's explicit Checklist section, but the required information is otherwise mostly complete.

Full details: Docstring Coverage

Explanation

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 files. (1 skipped: 1 too large.)

✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

A rabbit checks the ranges wide,
Two boxes keep their bounds in view.
The cross-range probes report their rule,
One waits while rate-limited logs renew.
Then hops away beneath the moon.

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

@bryan-minimal bryan-minimal left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Right call: aiming the cross arms at RFC 1918 let egress-infrastructure-destination answer before the row's own rules, so the union bound was never the verdict under test. 198.18/16 and 198.19/16 sit outside every infrastructure range, and the sleep 60 between box A's two undeclared-subnet arms is forced by the limiter's (source, rule) key; the comment explains why the made-up arms can dodge it and these cannot. Approving.

@norrietaylor norrietaylor changed the title fix: e2e: aim the escape-union cross arms at public halves of 198.18.0.0/15 test(e2e): aim the escape-union cross arms at public halves of 198.18.0.0/15 Oct 20, 2026
@norrietaylor
norrietaylor added this pull request to the merge queue Oct 20, 2026
Merged via the queue into main with commit 28ab14c Oct 20, 2026
35 checks passed
@norrietaylor
norrietaylor deleted the inbox-patch/fix/e2e-escape-union-public-halves-74686e4a0c5f1acb branch October 20, 2026 18:27
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants