Repository navigation
fix(minimald,minvmd): git clone in a hostname-allowlist VM box is not refused on its own loopback - #3375
Conversation
An own-IP box with a hostname allowlist is placed in no leaf and runs in its own network namespace. Every refusing rule of the guest table needs a socket of the boxes subtree, so the one refused line on lo in a guest boot log is the effect probe's, from its deny leaf.
The boot log tail started at the boot, so git's tail carried the guest effect probe's refusal on lo and read as git's. Read the log from the first tool on, and assert that no minimal-classifier refusal on lo appears while the toolchain runs. Record the fact under NET-068.
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
Spec lint
Advisory. None of this blocks the merge; the review decides. Advisory, and never a merge gate. Linter: |
|
/revise make Evidence: the PR body says Do:
|
|
/revise make This repeats the Evidence: the PR body says Do:
|
|
/revise make This repeats the Evidence: the PR body says Do:
|
|
Round 3 of 10 on a /revise note: the coder changed nothing. No file changed, as the directive's item 3 says. I ran the steps of agent-verify with this branch's crates (minimald, minvmd). fmt passed. Clippy passed in 7m 15s, cold. nextest took 25m 26s of wall time. Hangs: minimald env::tests::minenv_run_forwards_stdin_to_the_task (#3415) and minimald env::tests::task_run_pipes_stdin_through_the_in_box_helper. Each one was still running after 780s, and I killed them. The second test is in the same module and also forwards stdin, so it is probably the same flake. Nextest reported the two killed tests as failed. Failures this box can reproduce on its own: minvmd net::egress_gate::tests::a_stalled_switch_does_not_hold_the_relay_past_a_guest_close fails at egress_gate.rs:21346 in about 5s. minimald env::tests::task_entrypoint_carries_env_cwd_and_args fails because this sandbox sets MINIMAL_OTEL=off, so the request starts with otel%off% and the run% prefix check fails. This branch touches neither env.rs nor egress_gate.rs. Slowest tests th…[truncated] |
…-vm-box-is-not
|
Round 4 of 10 on a failed check suite: the coder changed nothing. Revise round 4 changes nothing. The directive gives two failed checks: ci-linux-native-success, which is the aggregator, and tests. The tests excerpt shows only PASS lines from the decode crate and job cleanup. It does not name a failing test, and I have no way to fetch the full log. This branch changes only a unit test in crates/minimald/src/net/classifier.rs, the ignored VM test in crates/minvmd/tests/egress_allowlist_integration.rs, and a comment and verify line in the 18 spec. No other test reads the spec file. Local results: the new unit test passes. |
There was a problem hiding this comment.
Read at f5c3434c against D2996. No product code changes. The coder found the minimal-classifier: refused line on lo was the guest effect probe's boot-time connect from boxes/deny/filter-probe-*, not git's: the e2e test read the boot log from offset 0, so the first tool's tail carried it. hostname_allowlist_box_loopback_connect_is_admitted pins against the installer's rendered guest table that every refusing rule needs a socket of the boxes subtree, and that a hostname allowlist is never placed in the deny subtree. The e2e test now skips the boot log, collects refusals with OUT=lo, and fails on any. The conditional layers (installer, launcher) were left alone because their conditions do not hold, and widening deny_out would break NET-079. That is the right call. VM evidence: test-kvm ran it on this head, PASS [78.024s] minvmd::egress_allowlist_integration hostname_allowlist_toolchain_completes (job 133595848876). That is one run, not the repeated runs the proof names, so the flake's absence rests on the merge queue and later runs.
|
Approved: no findings at Nothing to do. Clobber: none seen. |
There was a problem hiding this comment.
arch-review: CONDITIONS · 1 condition · the full ruling
The change conforms to the design. An own-IP box owns its localhost (UC1), and the classifier decides only sockets of the boxes subtree (§4.1 line 54). The new unit test pins this against the installer's render, and the PR correctly keeps deny_out closed on the loopback. The proof of NET-068 is open. hostname_allowlist_toolchain_completes did not run (exit 4, #[ignore] without MINVMD_E2E=1), but the body still says Fixes #3353. C1 keeps the issue open until a green KVM run exists, or files the proof as a residual with an issue.
Ruled at f5c3434 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
…in-a-hostname-allowlist-vm-box-is-not
The loopback test now asserts that the output and ipv6_out chains have rules before it checks them, and that an own-IP launch is placed in no classifier leaf, through the launcher's named gate.
…in-a-hostname-allowlist-vm-box-is-not
|
Round 5 of 10 on the runtime's review findings, pushed as
Verify Converted to a draft: something above needs a person before review. Review threads the coder judged:
A person can run hostname_allowlist_box_loopback_connect_is_admitted and see that no rule of the guest table refuses a box's own loopback connect. The test also shows that an own-IP box is placed in no classifier leaf. The repeated-run half of the proof (hostname_allowlist_toolchain_completes passes, and the boot log has no minimal-classifier refused line for 127.0.0.1 on lo) is NOT shown by this branch yet. Only a KVM lane can run it, and no run of it is on record for this head. Notes from the agent: Revise round 5. I added the named gate placed_in_classifier_leaf to launcher.rs and used it at the one place where the launch decides to allocate a leaf. The behaviour does not change. The unit test now uses this gate to check the own-IP claim, and it asserts that the output and ipv6_out chains have rules. The minvmd test line exited 4 here because there is no /dev/kvm and MINVMD_E2E is not set. The evidence for NET-068 and the repeated-run proof is owed by the ci-linux-kvm lane. Until a green ci-linux-kvm run of hostname_allowlist_toolchain_completes is linked, the PR body must say Refs #3353, not Fixes #3353. I cannot edit the PR body. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The change conforms. An own-IP allowlist box has its own localhost and no classifier leaf, as UC1 line 83 and section 4.1 line 54 require. The launcher and the test now share one placement predicate, placed_in_classifier_leaf. The deny-all refusal stays loopback-wide, and the e2e leg now fails on any refusal on lo while the tools run. No conditions.
Ruled at e5a84b7 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
|
Round 6 of 10 on the runtime's review findings: the coder changed nothing. Revise round 6: no code change. The one open finding is correct that no production behaviour changes, and that is deliberate. The earlier rounds found that the refused line on lo in the boot log came from the guest effect probe's deny leaf, not from git, and the e2e test read the log from boot start. The fix is in the test and the pinned table facts. The PR body is written by the runner, and no commit on this branch carries a closing keyword. Until a green ci-linux-kvm run of hostname_allowlist_toolchain_completes exists, the PR body must say 'Refs #3353', not 'Fixes #3353'. The minvmd test line is deferred to the KVM lane: this box has no /dev/kvm. Review threads the coder judged:
|
|
/revise Add Docker Hub's S3 blob host to the NET-068 allowlist. Change nothing else. The merge-queue Docker Hub's blob redirect can land on S3 directly, not only on Do:
|
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head changes only the e2e harness. skip_boot_log now waits for a quiet boot log before the tools run. The lo_refusals assertion does not change, and the wait ends before the first tool runs. So the proof of NET-068 does not get weaker (UC1 line 83, UC3 line 99). If the log never gets quiet or is missing, the test still fails closed. The ruling on 58b6f65b stands for the rest of the change. No condition is open. The KVM lane run of hostname_allowlist_toolchain_completes on this head is the proof of record.
Ruled at f346f57 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
There was a problem hiding this comment.
minimal-review — approval withheld
Verdict COMMENT — APPROVE withheld: 2 unresolved threads — minimal-foundry[bot] crates/minimald/src/net/classifier.rs:7370, minimal-foundry[bot] crates/minvmd/tests/egress_allowlist_integration.rs:323. No findings.
Panel: 3 of 3 personas ran (correctness, security, supply-chain).
There was a problem hiding this comment.
Re-read at f346f577. Round 8 is test-only: skip_boot_log now waits until the guest boot log stops growing for 1s (10s at most) before it moves the offset, so a late console line from the boot probe's refusal cannot land in the first tool's tail. I agree with the coder's rejection of the other LOW: the unit test cannot load nft, and its fixed chain list is meant to fail on a new refusing chain. The rest is a main merge. The out-of-scope files are unchanged since 58b6f65b. test-kvm on this head: PASS [93.353s] hostname_allowlist_toolchain_completes (job).
There was a problem hiding this comment.
minimal-review — approved
Verdict APPROVE — every review thread is resolved; @norrietaylor closed the last one. The review of f346f577d4da withheld this approval on the threads open then. Posted as a comment: the App cannot approve its own pull request; the check and the label carry it.
|
/revise Add Docker Hub's S3 blob host to the shell copy of the NET-068 list too. Change nothing else. Round 7 added Do:
|
The shell copy of NET068_TOOLCHAIN_EGRESS_HOSTS lacked the S3 host that round 7 added to the Rust list, so skopeo failed in test-kvm on an NXDOMAIN from dns_gate.
|
Round 9 of 10 on a /revise note, pushed as
Verify Outside the task's
Converted to a draft: something above needs a person before review. The session e2e GOA_HOSTS list now matches NET068_TOOLCHAIN_EGRESS_HOSTS, with docker-images-prod.s3.dualstack.us-east-1.amazonaws.com at its end. The hostname-only box in the session e2e allows the S3 host that skopeo reaches through Docker Hub's redirect. Notes from the agent: Revise round 9: this round changes only scripts/session-e2e.sh, as the /revise note asks. That file is not in the task's layers. The directive names it explicitly. I updated the comment above GOA_HOSTS to name the three blob hosts. I also changed the comment 'every one of the ten hosts' to 'eleven hosts', because the list now has eleven entries. A search for production.cloudfront.docker.com found two other copies: crates/boxes/src/lib.rs and the fixture in crates/minimald/src/net/dns_gate.rs. Both already contain the S3 host, so they need no change. I did not run the two cargo test: lines this round, because no Rust code changed. The minvmd VM test needs a KVM lane, and the runner runs it again. |
There was a problem hiding this comment.
arch-review: PASS · the full ruling
The new push adds Docker Hub's S3 blob host to the e2e host list in scripts/session-e2e.sh. That list now matches boxes::NET068_TOOLCHAIN_EGRESS_HOSTS. The host is an explicit per-box DNS-host grant, as UC3 permits. No classifier rule changes. The PASS on the earlier head stays in force for the rest of the change.
Ruled at 08756b9 against gominimal/arch@327e1b57d16b by claude-opus-5-5.
|
Round 10 of 10 on a failed check suite: the coder changed nothing. A person needs to take it from here. |
There was a problem hiding this comment.
Re-read at 3b90391f. Round 9 (08756b9a) adds docker-images-prod.s3.dualstack.us-east-1.amazonaws.com to GOA_HOSTS in scripts/session-e2e.sh, the shell copy of NET068_TOOLCHAIN_EGRESS_HOSTS that round 7 missed. The merge-queue run failed on it (the github-only allowlist step), and the copy's comment and the "eleven hosts" count now match. 3b90391f merges main for the deny.toml RUSTSEC-2026-0543 ignore (#3492). All four copies of the list now name the S3 host. This PR now also fixes #3491.
|
The runtime will not revise this pull request again on its own: round 11 would exceed the cap of 10; 0 base merges were not counted (the last trigger was a failed check suite). A person decides now. Remove |
…-vm-box-is-not Resolve the S3 blob host conflicts in favour of main's #3498.
There was a problem hiding this comment.
Re-read at 673420a2: a merge of main (6c0718d8). Conflicts in crates/boxes/src/lib.rs, dns_gate.rs and scripts/session-e2e.sh were all the S3 blob host that main's #3498 also added; each resolved to main's version. Against main, this PR is now only its own work: the classifier unit test, placed_in_classifier_leaf, the e2e boot-log handling and lo_refusals assertion, the NET-068 verify line and notes, and the "eleven hosts" comment. #3491 is already closed by #3498.
There was a problem hiding this comment.
arch-review: PASS · the full ruling
This head adds one clean merge of main to the head that got a PASS. The merge changes none of the PR's own hunks. NET-068 still conforms to UC1, UC3 and §4.1 line 54. The ruling on 3b90391f stands for this head.
Ruled at 673420a against gominimal/arch@327e1b57d16b by claude-opus-5-5.
Defect
Fixes #3353
Fixes #3491
crates/minimald/src/net/classifier.rsscripts/install-host-classifier.shcrates/minimald/src/box_runtime/launcher.rscrates/minvmd/tests/egress_allowlist_integration.rsdocs/specs/18-spec-box-networking/18-spec-box-networking.mdTask marker
Proof
Green KVM runs of the test: at
f5c3434c(job 133595848876, 78.0s) and at58b6f65b(job 133868140076,PASS [72.710s] minvmd::egress_allowlist_integration hostname_allowlist_toolchain_completes), the second with Docker Hub's S3 blob host on the list. A third atf346f577(job 133903558230,PASS [93.353s]), withskip_boot_logwaiting for a quiet boot log.That run includes the new assertion that no
minimal-classifier: refusedline onloappears while the toolchain runs. The agent's notes below were written before it.Not delivered on this box. A person can now see two things. First, a unit test pins that no rule of the guest table can refuse an own-IP hostname-allowlist box's loopback connect. Second, hostname_allowlist_toolchain_completes reads the guest boot log only from the first tool on, and fails if a minimal-classifier refused line on lo appears while the toolchain runs. Repeated passing VM runs are still owed by a VM lane.
Notes from the agent: Finding: the guest table does not refuse git's 127.0.0.1 connect. An own-IP box has its own network namespace (OwnIpNetwork relays its own tap) and gets no classifier leaf (launcher.rs places a leaf for HostNet only). A hostname allowlist is not deny-all, so verdict_of gives Allow. Every refusing rule of the guest render needs a socket of the boxes subtree. The refused line on lo for 127.0.0.1 comes from the guest's effect probe. At boot the probe connects from boxes/deny/filter-probe- to the daemon's own loopback listener, and deny_out logs that refusal by design. The e2e test read the boot log from offset 0, so git's tail (the first tool) carried the probe's boot-time line, and the line looked like git's. Changes: (1) classifier.rs adds hostname_allowlist_box_loopback_connect_is_admitted, which pins these facts against the installer's rendered guest table. (2) The e2e test calls skip_boot_log before the tools, collects 'minimal-classifier: refused' lines with OUT=lo, and asserts there are none. (3) NET-068 in spec 18 gets a second verify line and a comment that records the fact. No change to scripts/install-host-classifier.sh or box_runtime/launcher.rs: their layer notes were conditional ('if the guest ruleset is where the refusal comes from', 'if the exec lands in the deny subtree'), and neither condition holds. Widening deny_out to the loopback would also break NET-079 (host_ip_deny_all_reaches_only_the_answerer). Not verified: the VM run. The e2e edit was type-checked and linted with 'cargo clippy -p minvmd …[truncated]
Tests
cargo test -p minimald hostname_allowlist_box_loopback_connect_is_admittedcargo nextest run -p minvmd hostname_allowlist_toolchain_completesVerify
min task run agent-verifytimed out after 1800s, so this PR is a draft.