Name the broker reply in the sealed route check - #2038
Merged
Merged
Conversation
ppXD
force-pushed
the
fix/name-the-broker-reply-in-the-route-check
branch
from
September 27, 2026 10:46
f6f4a34 to
7bc0b35
Compare
The setup's route check asked `ip route get <ns> from <gateway>`, but the broker's replies are TCP from the broker port. A policy rule keyed on the protocol or the port (all TCP through a VPN table, a null route behind an ipproto or sport rule) was invisible to the check, so a sealed run was admitted and every brokered call then timed out. A sealed plan now asks the reply's own lookup, adding `ipproto 6 sport <port>`. The protocol is given by number because the name needs /etc/protocols, which minimal images lack. A rule keyed on the destination port or a mark still gets past it, since each reply goes to the agent's ephemeral port; the doc says so. An allowlist plan has no single port to name, so its check is unchanged and its doc says what it does not see. Two pins the last review found missing are added. The launch-time setup failure must carry the fix-that-step remedy, not the grant remedy. The proxy gate must count a task-set ALL_PROXY, and must keep the worker's own NO_PROXY in the exemption list.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
FilteredEgressPlan.RouteCheckArgv, added in Seal a network-off run to its model broker #2035) askedip route get <ns> from <gateway>. The broker's replies are TCP from the broker port, so a policy rule keyed on the protocol or the port was invisible to it. Two examples:ip rule add ipproto tcp lookup <vpn-table>, or a null route behind anipproto/sportrule. The check then admitted a sealed run, and every brokered call timed out. A sealed plan now asks the reply's own lookup, addingipproto 6 sport <port>.tcpneeds/etc/protocols, which minimal Debian and Ubuntu images lack, and thereipanswersInvalid "ipproto" value.ALL_PROXY, which the child gets unfiltered. The worker's ownNO_PROXYstays in the exemption list.Test plan
FilteredEgressPlanTestspins the sealed argv withipproto 6 sport <port>and the allowlist argv without it.LocalProcessRunnerEnvScrubTestsadds a taskALL_PROXYrow and a workerNO_PROXYunion row.NO_PROXYfrom the union, turns the new rows red.SealedEgressE2ETests,FilteredEgressNetnsE2ETests,ModelCredentialBrokerNetnsE2ETests,DurableLaunchEgressE2ETests, 14/14, no host residue.A_host_whose_policy_rule_discards_the_run_s_replies_fails_the_setup_and_leaks_nothingbecomes a theory. The new row installs a rule that only TCP from the broker port meets.ApplyAsync(BuildSealed)was compared against a real TCP exchange to the broker port.rp_filter=1, a real wg-quick tunnel, Tailscale with and without an exit node, a Cilium-style setup, AWS VPC CNI, a Calico blackhole, and rules keyed onipproto,sport,dport,uidrange,fwmark,tosandiif. The one exception is a contrived mark case, and base behaves identically there.ipproto 6andsportrules. It also refused a working one under anipproto 17rule, because a route get with no protocol is answered as UDP.ipproto(4.17 and earlier) already fail at the route listing.policy-route-discard-dstandpolicy-route-discard-l4each have their own marker, so neither can be satisfied by the other's.