carlos / platform Public

rootfs: NETLINK_ROUTE only, so getifaddrs works in rootfs apps (#1419)

Rootfs units refused AF_NETLINK, so glibc getifaddrs (Ruby Resolv,
Excon, fog's S3; Node os.networkInterfaces; Go net.Interfaces) failed
with EAFNOSUPPORT. The restated rootfs block now allows AF_NETLINK and
instance-exec --rootfs installs a seccomp filter before the tenant
starts (every thread, kept across exec): a netlink socket only of
NETLINK_ROUTE, no netlink socketpair, all else unchanged. A filter that
cannot be installed refuses the start; the units pass --netlink-scope
so a pre-#1419 binary exits instead of running a tenant unscoped. Route
is read-only (no CAP_NET_ADMIN); tenants can read the box's links,
addresses, routes, neighbours and tc state.

Rootfs probe lines: netlink-scope, netlink-route (RTM_GETLINK and
RTM_GETADDR dumps), netlink-others (protocols 1-31 refused by the
scope), netlink-readonly (an RTM_DELADDR on ifindex 0 answers EPERM).
Docs: RFS-4-C156 (Luna pass under Paul's delegation).

Reviews: Astra R1-R3 (R3 READY AFTER FIXES, fixed), Fable R1-R2 (R2
READY). Census census-ruling-rootfs-netlink-route-1419 approved by both
(#280). Owed before any flagship roll: dev witnesses on #1419.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

Squashed from rootfs-netlink-route-1419 into main.
claude agent, operated by paul@keymail.dev 408c387546dd59f959ea5bd3b055f3d6fc362db7 parent 9553905
24 files changed, +931 −45
  • approved_rootfs_copy_test.go +4 −2
  • docs/site/rootfs.md +2 −0
  • docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md +33 −0
  • docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md +7 −2
  • internal/host/units/carlos-instance-rootfs-cmd@.service +13 −3
  • internal/host/units/carlos-instance-rootfs-gen@.service +13 −3
  • internal/host/units/carlos-instance-rootfs-probe.service +9 −2
  • internal/host/units/carlos-instance-rootfs-tty@.service +13 −3
  • internal/host/units/carlos-instance-rootfs-worker@.service +13 −3
  • internal/host/units/carlos-instance-rootfs@.service +13 −3
  • internal/host/units_rootfs_test.go +22 −20
  • internal/instanceexec/exec.go +21 −1
  • internal/instanceexec/exec_rootfs_scope_test.go +111 −0
  • internal/instanceexec/families_test.go +35 −0
  • internal/instanceexec/netlink_route_linux.go +169 −0
  • internal/instanceexec/netlink_route_linux_test.go +314 −0
  • internal/instanceexec/netlink_route_other.go +9 −0
  • internal/instanceexec/probe_rootfs.go +39 −0
  • internal/instanceexec/probe_rootfs_linux.go +4 −0
  • internal/instanceexec/probe_rootfs_other.go +4 −0
  • internal/instanceexec/probe_rootfs_test.go +61 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv +19 −0
  • testdata/clireg-golden.jsonl +2 −2

CI passed — run details

CI log
=== gate ===
go: downloading go1.26.10 (linux/arm64)
go version go1.26.10 linux/arm64
opentofu: arm64, tofu 1.13.9, aws 6.73.0, archive 2.8.1
  tofu: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/tofu_1.13.9_linux_arm64.tar.gz
  tofu: downloaded, digest verified
  aws: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-aws_6.73.0_linux_arm64.zip
  aws: downloaded, digest verified
  archive: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/opentofu/terraform-provider-archive_2.8.1_linux_arm64.zip
  archive: downloaded, digest verified
  installed in /tmp/carlos-opentofu-libLh9
.amadan/test-gate.sh
go: downloading github.com/aws/aws-sdk-go-v2 v1.44.0
go: downloading github.com/aws/aws-sdk-go-v2/service/cloudwatch v1.68.0
go: downloading github.com/aws/aws-sdk-go-v2/service/costexplorer v1.67.5
go: downloading github.com/aws/aws-sdk-go-v2/service/s3 v1.105.0
go: downloading golang.org/x/net v0.62.0
go: downloading github.com/superfly/ltx v0.5.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/sys v0.49.0
go: downloading github.com/aws/aws-sdk-go-v2/config v1.32.6
go: downloading github.com/aws/aws-sdk-go-v2/service/sns v1.43.0
go: downloading github.com/aws/aws-sdk-go-v2/service/route53 v1.64.1
go: downloading github.com/oschwald/maxminddb-golang v1.13.1
go: downloading golang.org/x/crypto v0.58.0
go: downloading github.com/aws/aws-sdk-go-v2/service/acm v1.45.0
go: downloading github.com/aws/aws-sdk-go-v2/service/ec2 v1.324.0
go: downloading github.com/aws/aws-sdk-go-v2/service/iam v1.58.2
go: downloading github.com/aws/aws-sdk-go-v2/service/resourcegroupstaggingapi v1.37.0
go: downloading github.com/pion/logging v0.2.4
go: downloading github.com/pion/stun/v3 v3.1.5
go: downloading github.com/pion/turn/v4 v4.1.4
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/internal/v4a v1.4.38
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading golang.org/x/text v0.43.0
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/matttproud/golang_protobuf_extensions/v2 v2.0.0
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== launchctx (4 s, from +0 s)
ok  	amadan.net/carlos/platform.git/launchctx	0.015s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
=== vet (177 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== vet-tags (186 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading golang.org/x/crypto/x509roots/fallback v0.0.0-20260209214922-2f26647a795e
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading github.com/aws/aws-sdk-go-v2/service/ecs v1.91.0
go: downloading modernc.org/libc v1.74.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (383 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	121.056s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	215.289s
ok  	github.com/carlosframework/platform/cmd/mediaimage	43.706s
ok  	github.com/carlosframework/platform/cmd/moveprobe	17.265s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.021s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.166s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.118s
ok  	github.com/carlosframework/platform/cmd/zddprobe	0.939s
ok  	github.com/carlosframework/platform/internal/agentsock	0.066s
ok  	github.com/carlosframework/platform/internal/alerting	0.023s
ok  	github.com/carlosframework/platform/internal/analytics	0.412s
ok  	github.com/carlosframework/platform/internal/appconfig	45.463s
ok  	github.com/carlosframework/platform/internal/apperr	0.413s
ok  	github.com/carlosframework/platform/internal/applog	0.645s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.939s
ok  	github.com/carlosframework/platform/internal/assetcache	0.412s
ok  	github.com/carlosframework/platform/internal/awsinv	0.014s
ok  	github.com/carlosframework/platform/internal/awsmanaged	10.168s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.047s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.023s
ok  	github.com/carlosframework/platform/internal/backupswords	0.010s
ok  	github.com/carlosframework/platform/internal/billing	0.088s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.057s
ok  	github.com/carlosframework/platform/internal/billingstripe	1.728s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.019s
ok  	github.com/carlosframework/platform/internal/boxid	2.108s
?   	github.com/carlosframework/platform/internal/boxid/boxidtest	[no test files]
?   	github.com/carlosframework/platform/internal/boxid/internal/signtest	[no test files]
ok  	github.com/carlosframework/platform/internal/boxroles	0.008s
ok  	github.com/carlosframework/platform/internal/boxself	0.161s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.048s
ok  	github.com/carlosframework/platform/internal/caps	4.085s
ok  	github.com/carlosframework/platform/internal/certwarm	0.025s
ok  	github.com/carlosframework/platform/internal/cgroup	1.393s
ok  	github.com/carlosframework/platform/internal/changelog	4.705s
ok  	github.com/carlosframework/platform/internal/clamd	0.164s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.011s
ok  	github.com/carlosframework/platform/internal/codehealth	20.157s
ok  	github.com/carlosframework/platform/internal/compute	0.026s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.024s
?   	github.com/carlosframework/platform/internal/controlname	[no test files]
?   	github.com/carlosframework/platform/internal/controlsock	[no test files]
ok  	github.com/carlosframework/platform/internal/dbdoor	11.494s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.026s
ok  	github.com/carlosframework/platform/internal/dbquery	0.017s
ok  	github.com/carlosframework/platform/internal/dbreads	3.051s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.034s
ok  	github.com/carlosframework/platform/internal/demo	0.009s
ok  	github.com/carlosframework/platform/internal/demobuild	3.601s
ok  	github.com/carlosframework/platform/internal/democlaim	0.507s
ok  	github.com/carlosframework/platform/internal/devbox	19.807s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.025s
ok  	github.com/carlosframework/platform/internal/docsite	0.090s
ok  	github.com/carlosframework/platform/internal/domainreg	0.011s
ok  	github.com/carlosframework/platform/internal/domains	70.187s
ok  	github.com/carlosframework/platform/internal/doorkey	0.026s
ok  	github.com/carlosframework/platform/internal/economics	0.019s
ok  	github.com/carlosframework/platform/internal/edgefence	0.054s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.463s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.067s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.005s
ok  	github.com/carlosframework/platform/internal/execsandbox	106.578s
ok  	github.com/carlosframework/platform/internal/fileacl	0.005s
ok  	github.com/carlosframework/platform/internal/fleetapi	1.716s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.009s
ok  	github.com/carlosframework/platform/internal/fxrate	0.018s
ok  	github.com/carlosframework/platform/internal/gate	4.716s
ok  	github.com/carlosframework/platform/internal/genselect	0.136s
ok  	github.com/carlosframework/platform/internal/geo	0.037s
ok  	github.com/carlosframework/platform/internal/geoip	0.156s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.037s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.198s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.022s
ok  	github.com/carlosframework/platform/internal/hafresh	0.021s
ok  	github.com/carlosframework/platform/internal/hairpin	0.228s
ok  	github.com/carlosframework/platform/internal/historyreadback	0.908s
ok  	github.com/carlosframework/platform/internal/hostactors	26.251s
ok  	github.com/carlosframework/platform/internal/hostbox	25.149s
ok  	github.com/carlosframework/platform/internal/hostclaim	2.628s
ok  	github.com/carlosframework/platform/internal/hostenv	0.034s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.012s
ok  	github.com/carlosframework/platform/internal/hostexec	28.613s
ok  	github.com/carlosframework/platform/internal/hostfence	0.132s
ok  	github.com/carlosframework/platform/internal/hostfiles	30.469s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.059s
ok  	github.com/carlosframework/platform/internal/hostguard	1.548s
ok  	github.com/carlosframework/platform/internal/hostops	8.707s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.030s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.018s
ok  	github.com/carlosframework/platform/internal/hostrelocate	2.110s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.809s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.016s
ok  	github.com/carlosframework/platform/internal/infraview	0.009s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.020s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.024s
ok  	github.com/carlosframework/platform/internal/instancectl	61.829s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.467s
ok  	github.com/carlosframework/platform/internal/instancefs	0.027s
ok  	github.com/carlosframework/platform/internal/instancekey	0.023s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.038s
ok  	github.com/carlosframework/platform/internal/interactive	0.730s
ok  	github.com/carlosframework/platform/internal/launchd	0.007s
ok  	github.com/carlosframework/platform/internal/layout	28.708s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	101.803s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.012s
ok  	github.com/carlosframework/platform/internal/lease	146.361s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.667s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.016s
ok  	github.com/carlosframework/platform/internal/ledger	0.084s
ok  	github.com/carlosframework/platform/internal/mail	0.924s
ok  	github.com/carlosframework/platform/internal/mailer	1.033s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.553s
ok  	github.com/carlosframework/platform/internal/mailwire	0.024s
ok  	github.com/carlosframework/platform/internal/maintenance	0.184s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	7.916s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.433s
ok  	github.com/carlosframework/platform/internal/managedboot	4.691s
?   	github.com/carlosframework/platform/internal/managedboot/boottest	[no test files]
?   	github.com/carlosframework/platform/internal/managedboot/roottest	[no test files]
ok  	github.com/carlosframework/platform/internal/media	2.171s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.018s
ok  	github.com/carlosframework/platform/internal/mediaaws	65.146s
ok  	github.com/carlosframework/platform/internal/mediahandler	43.755s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.282s
ok  	github.com/carlosframework/platform/internal/medialocal	9.550s
ok  	github.com/carlosframework/platform/internal/metrics	0.246s
ok  	github.com/carlosframework/platform/internal/minorunits	0.006s
ok  	github.com/carlosframework/platform/internal/moves	57.430s
ok  	github.com/carlosframework/platform/internal/moves/archive	3.423s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.167s
ok  	github.com/carlosframework/platform/internal/namedunits	0.034s
ok  	github.com/carlosframework/platform/internal/objstore	2.197s
ok  	github.com/carlosframework/platform/internal/ops	17.312s
ok  	github.com/carlosframework/platform/internal/pageindex	4.410s
ok  	github.com/carlosframework/platform/internal/parity	0.140s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	1.045s
ok  	github.com/carlosframework/platform/internal/perf	0.215s
ok  	github.com/carlosframework/platform/internal/plans	0.172s
ok  	github.com/carlosframework/platform/internal/privatefile	0.011s
ok  	github.com/carlosframework/platform/internal/provision	240.119s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.959s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.040s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.270s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.049s
ok  	github.com/carlosframework/platform/internal/regionname	0.054s
ok  	github.com/carlosframework/platform/internal/registrar	0.004s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.653s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	86.028s
ok  	github.com/carlosframework/platform/internal/relay	7.770s
ok  	github.com/carlosframework/platform/internal/release	84.366s
ok  	github.com/carlosframework/platform/internal/replicagen	0.034s
ok  	github.com/carlosframework/platform/internal/replicas	0.143s
ok  	github.com/carlosframework/platform/internal/reqrec	8.661s
ok  	github.com/carlosframework/platform/internal/rollout	12.863s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.024s
ok  	github.com/carlosframework/platform/internal/rootaws	100.394s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.922s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.096s
ok  	github.com/carlosframework/platform/internal/rootstate	0.049s
ok  	github.com/carlosframework/platform/internal/runs	0.973s
ok  	github.com/carlosframework/platform/internal/s3compat	0.042s
ok  	github.com/carlosframework/platform/internal/s3fake	1.026s
ok  	github.com/carlosframework/platform/internal/safefile	0.057s
ok  	github.com/carlosframework/platform/internal/schedule	27.038s
ok  	github.com/carlosframework/platform/internal/seeds	0.067s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.274s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	54.890s
ok  	github.com/carlosframework/platform/internal/sim/regionha	25.135s
ok  	github.com/carlosframework/platform/internal/status	0.334s
ok  	github.com/carlosframework/platform/internal/steering	0.329s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.853s
ok  	github.com/carlosframework/platform/internal/storecfg	0.445s
ok  	github.com/carlosframework/platform/internal/svcrole	0.012s
ok  	github.com/carlosframework/platform/internal/systemd	6.584s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	3.743s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.363s
ok  	github.com/carlosframework/platform/internal/telemetry	0.072s
ok  	github.com/carlosframework/platform/internal/termfence	3.198s
ok  	github.com/carlosframework/platform/internal/timerspec	0.062s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.251s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.467s
ok  	github.com/carlosframework/platform/internal/unixdial	0.024s
ok  	github.com/carlosframework/platform/internal/updatewords	0.038s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.017s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.049s
ok  	github.com/carlosframework/platform/internal/version	0.027s
ok  	github.com/carlosframework/platform/internal/vet	3.202s
ok  	github.com/carlosframework/platform/internal/zonehost	0.039s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.087s
?   	github.com/carlosframework/platform/internal/zonehost/zonehosttest	[no test files]
?   	github.com/carlosframework/platform/scripts/gitleaks-gate	[no test files]
ok  	github.com/carlosframework/platform/scripts/govulncheck-gate	0.028s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.097s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.166s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.240s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.012s
=== cutover-witness (161 s, from +15 s)
ok  	github.com/carlosframework/platform	1.921s
=== internal_grouproll@0 (279 s, from +73 s)
ok  	github.com/carlosframework/platform/internal/grouproll	277.223s
=== internal_grouproll@1 (287 s, from +73 s)
ok  	github.com/carlosframework/platform/internal/grouproll	285.455s
=== internal_activator@0 (157 s, from +144 s)
ok  	github.com/carlosframework/platform/internal/activator	152.541s
=== internal_activator@1 (138 s, from +144 s)
ok  	github.com/carlosframework/platform/internal/activator	133.719s
=== internal_activator@2 (137 s, from +144 s)
ok  	github.com/carlosframework/platform/internal/activator	132.991s
=== internal_activator@3 (175 s, from +144 s)
ok  	github.com/carlosframework/platform/internal/activator	170.460s
=== internal_edge@0 (195 s, from +171 s)
ok  	github.com/carlosframework/platform/internal/edge	187.950s
=== internal_edge@1 (139 s, from +171 s)
ok  	github.com/carlosframework/platform/internal/edge	131.402s
=== internal_edge@2 (158 s, from +171 s)
ok  	github.com/carlosframework/platform/internal/edge	148.888s
=== internal_edge@3 (219 s, from +171 s)
ok  	github.com/carlosframework/platform/internal/edge	210.774s
=== root@0 (116 s, from +176 s)
ok  	github.com/carlosframework/platform	105.487s
=== root@1 (110 s, from +176 s)
ok  	github.com/carlosframework/platform	99.319s
=== root@2 (120 s, from +176 s)
ok  	github.com/carlosframework/platform	109.979s
=== root@3 (127 s, from +176 s)
ok  	github.com/carlosframework/platform	116.821s
=== root@4 (115 s, from +176 s)
ok  	github.com/carlosframework/platform	104.583s
=== internal_host@0 (148 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	143.052s
=== internal_host@1 (141 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	135.871s
=== internal_host@2 (206 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	201.014s
=== internal_host@3 (308 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	303.088s
=== internal_host@4 (154 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	149.001s
=== internal_host@5 (220 s, from +218 s)
ok  	github.com/carlosframework/platform/internal/host	215.195s
=== internal_console@0 (160 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	153.730s
=== internal_console@1 (177 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	172.504s
=== internal_console@2 (234 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	228.549s
=== internal_console@3 (253 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	247.208s
=== internal_console@4 (225 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	219.710s
=== internal_console@5 (240 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	234.628s
=== internal_console@6 (228 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	222.380s
=== internal_console@7 (201 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	195.173s
=== internal_console@8 (219 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	213.278s
=== internal_console@9 (211 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	205.524s
=== internal_console@10 (222 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	215.892s
=== internal_console@11 (207 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	200.599s
=== internal_console@12 (296 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	290.404s
=== internal_console@13 (201 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	195.778s
=== internal_console@14 (205 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	199.732s
=== internal_console@15 (217 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	211.260s
=== internal_console@16 (205 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	199.664s
=== internal_console@17 (212 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	205.878s
=== internal_console@18 (229 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	222.589s
=== internal_console@19 (214 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	207.648s
=== internal_console@20 (193 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	186.411s
=== internal_console@21 (221 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	215.021s
=== internal_console@22 (213 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	206.272s
=== internal_console@23 (223 s, from +225 s)
ok  	github.com/carlosframework/platform/internal/console	217.038s
=== lists: internal_console 223 s, internal_edge 170 s, internal_activator 143 s, internal_host 217 s, root 174 s, internal_grouproll 72 s
=== cpu: the gate used 12855 cpu-seconds in 526 s, about 24.4 of 32 cores; the machine as a whole was 81% busy
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      18 s  infra/modules/box-fence-writer/tests/writer.tftest.hcl  Success! 1 passed, 0 failed.
  ok      18 s  infra/modules/deployment-buckets/tests/console_floors.tftest.hcl  Success! 1 passed, 0 failed.
  ok      29 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      19 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      16 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      31 s  infra/modules/deployment-buckets/tests/fence_writers.tftest.hcl  Success! 3 passed, 0 failed.
  ok      25 s  infra/modules/deployment-buckets/tests/media_results.tftest.hcl  Success! 2 passed, 0 failed.
  ok      86 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      26 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      57 s  infra/modules/pdf-host/tests/pdf_host.tftest.hcl  Success! 24 passed, 0 failed.
  ok      43 s  infra/modules/region-group-operator-document/tests/document.tftest.hcl  Success! 12 passed, 0 failed.
  ok      21 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      62 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      44 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      41 s  infra/modules/region-host/tests/alerts_topic.tftest.hcl  Success! 16 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      71 s  infra/modules/region-host/tests/group.tftest.hcl  Success! 32 passed, 0 failed.
  ok      11 s  infra/modules/region-host/tests/group_alarms.tftest.hcl  Success! 4 passed, 0 failed.
  ok      10 s  infra/modules/region-host/tests/group_iam.tftest.hcl  Success! 4 passed, 0 failed.
  ok       5 s  infra/modules/region-host/tests/group_isolation.tftest.hcl  Success! 1 passed, 0 failed.
  ok      36 s  infra/modules/region-host/tests/group_operator.tftest.hcl  Success! 13 passed, 0 failed.
  ok       9 s  infra/modules/region-host/tests/group_user_data.tftest.hcl  Success! 3 passed, 0 failed.
  ok      27 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      12 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       6 s  infra/modules/region-host/tests/instance_metadata.tftest.hcl  Success! 1 passed, 0 failed.
  ok      22 s  infra/modules/region-host/tests/mailer.tftest.hcl  Success! 6 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      15 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     109 s  infra/modules/region-host/tests/managed_fleets/managed_fleets.tftest.hcl  Success! 46 passed, 0 failed.
  ok      77 s  infra/modules/region-host/tests/store_conversion.tftest.hcl  Success! 27 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      32 s  infra/modules/region-host/tests/store_versioning.tftest.hcl  Success! 11 passed, 0 failed.
  ok      15 s  infra/modules/region-host/tests/store_write_credentials.tftest.hcl  Success! 4 passed, 0 failed.
  ok      18 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      11 s  infra/modules/region-remote-host/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      16 s  infra/modules/region-remote-host/tests/no_deployment_bucket.tftest.hcl  Success! 5 passed, 0 failed.
  ok      34 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 39 files in 211 s
opentofu: PASS
=== cross ===
--- shard 0 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/arm64
--- shard 1 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling darwin/amd64
--- shard 2 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling linux/arm64
linux/arm64 carlos binary: 66257058 bytes (ceiling 70000000)
--- shard 3 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/amd64
--- shard 4 of 5 ---
go version go1.26.10 linux/arm64
cross-compiling windows/arm64
=== minio-contract ===
go version go1.26.10 linux/arm64
minio contract: arm64, minio RELEASE.2025-09-07T16-13-09Z, mc RELEASE.2025-08-13T08-35-41Z
  minio: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/minio.linux-arm64.RELEASE.2025-09-07T16-13-09Z
  minio: downloaded, digest verified
  mc: downloading https://carlos-ci-mirror-640012953448.s3.eu-west-1.amazonaws.com/minio/mc.linux-arm64.RELEASE.2025-08-13T08-35-41Z
  mc: downloaded, digest verified
  minio healthy on 127.0.0.1:37125
Added `local` successfully.
Bucket created successfully `local/contract-bucket`.
Bucket created successfully `local/denied-bucket`.
Created policy `contract-only` successfully.
Added user `scopeduser` successfully.
Attached Policies: [contract-only]
To User: scopeduser
  buckets and scoped user ready
=== RUN   TestDeliveredContractMinio
=== RUN   TestDeliveredContractMinio/put
=== RUN   TestDeliveredContractMinio/get_round-trips_the_body
=== RUN   TestDeliveredContractMinio/list_shows_the_key
=== RUN   TestDeliveredContractMinio/head_and_list_agree_on_the_version
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict
=== RUN   TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed
=== RUN   TestDeliveredContractMinio/delete_removes_it
=== RUN   TestDeliveredContractMinio/cross-bucket_denial
--- PASS: TestDeliveredContractMinio (0.03s)
    --- PASS: TestDeliveredContractMinio/put (0.00s)
    --- PASS: TestDeliveredContractMinio/get_round-trips_the_body (0.00s)
    --- PASS: TestDeliveredContractMinio/list_shows_the_key (0.00s)
    --- PASS: TestDeliveredContractMinio/head_and_list_agree_on_the_version (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/not_by_PutObjectTagging (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_its_own_object/and_not_by_x-amz-tagging_on_upload (0.00s)
    --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route (0.01s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CreateMultipartUpload (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/not_by_CopyObject_with_a_REPLACE_tagging_directive (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/but_multipart_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_copy_itself_is_allowed (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/a_POST-policy_forged_tag_with_a_matching_version_is_still_not_a_verdict (0.00s)
        --- PASS: TestDeliveredContractMinio/the_app_cannot_tag_by_any_other_route/and_an_ordinary_tagged-with-something-else_upload_is_allowed (0.00s)
    --- PASS: TestDeliveredContractMinio/delete_removes_it (0.00s)
    --- PASS: TestDeliveredContractMinio/cross-bucket_denial (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.036s
=== RUN   TestT4StorageProbeMinio
2026/11/25 23:22:39 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EB6D36E6825BE1, HostID: 1fab72ad923c984a03fb55cb46915d130756446cd4bb8a302e8278a264726d78, api error SignatureDoesNotMatch: The request signature we calculated does not match the signature you provided. Check your key and signing method.
--- PASS: TestT4StorageProbeMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.047s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.03s)
    --- PASS: TestS3StoreMinioContract/conditional_get_and_etag_listing (0.01s)
    --- PASS: TestS3StoreMinioContract/bump_through_every_mutation_path (0.02s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.042s
Bucket created successfully `local/analytics-versions`.
local/analytics-versions versioning is enabled
Created policy `analytics-versions` successfully.
Added user `analyticsversions` successfully.
Attached Policies: [analytics-versions]
To User: analyticsversions
=== RUN   TestS3StoreMinioVersions
--- PASS: TestS3StoreMinioVersions (0.03s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.040s
Bucket created successfully `local/store-versioned`.
local/store-versioned versioning is enabled
Created policy `store-versioned` successfully.
Added user `storeversioned` successfully.
Attached Policies: [store-versioned]
To User: storeversioned
=== RUN   TestVersionedContractMinio
--- PASS: TestVersionedContractMinio (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.020s
Bucket created successfully `local/wc-bucket`.
Created policy `writer` successfully.
Added user `wcwriter` successfully.
Attached Policies: [writer]
To User: wcwriter
=== RUN   TestWriteCredentialContractMinio
=== RUN   TestWriteCredentialContractMinio/put_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/multipart_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_bucket_settings
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN   TestWriteCredentialContractMinio/refused:_read_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
--- PASS: TestWriteCredentialContractMinio (0.04s)
    --- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
    --- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.047s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.47s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.12s)
    --- PASS: TestEndToEndMinio/replace (0.15s)
    --- PASS: TestEndToEndMinio/remove (0.16s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.476s
Bucket created successfully `local/dbf-deploy`.
Bucket created successfully `local/dbf-data-ie`.
Bucket created successfully `local/dbf-data-uk`.
local/dbf-deploy versioning is enabled
Created policy `dbf-console` successfully.
Created policy `dbf-ukbox` successfully.
Added user `dbfconsole` successfully.
Added user `dbfukbox` successfully.
Attached Policies: [dbf-console]
To User: dbfconsole
Attached Policies: [dbf-ukbox]
To User: dbfukbox
=== RUN   TestDBForwardMinio
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/25 23:22:47 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/25 23:22:47 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/25 23:22:47 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/25 23:22:47 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/25 23:22:47 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/25 23:22:47 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/25 23:22:47 console: could not notify member@example.com of a CLI token issue: keymail: lookup member@example.com: keymail: GET /api/federation/lookup?addr=member%40example.com&from=console%40127.0.0.1%3A39977: could not determine target mailbox
    agent.go:136: dbreads: dbr_hzdhfbcryrepr363ytbfssv3cy: planned 3 files (1544 bytes) and restored to 3 in 14ms
    agent.go:136: dbreads: dbr_hzdhfbcryrepr363ytbfssv3cy: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/25 23:22:48 console: db read dbr_hzdhfbcryrepr363ytbfssv3cy: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_hvhgpsp3oh4ons2rjhlabjcwvq: planned 1 files (720 bytes) and restored to 1 in 11ms
    agent.go:136: dbreads: dbr_hvhgpsp3oh4ons2rjhlabjcwvq: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/25 23:22:49 console: db read dbr_hvhgpsp3oh4ons2rjhlabjcwvq: relayed 1 chunks (102 bytes) in 1.004s, ended done
    agent.go:136: dbreads: dbr_qn677rte3j3i3y7efrgmptenku: planned 3 files (1544 bytes) and held through 3 in 12ms
    agent.go:136: dbreads: dbr_qn677rte3j3i3y7efrgmptenku: output 1544 bytes in 1 confirmed chunks in 1ms
2026/11/25 23:22:50 console: db read dbr_qn677rte3j3i3y7efrgmptenku: relayed 1 chunks (1641 bytes) in 1.004s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_727tpgzcotlpvr7hdprvxyrrqe: planned 3 files (1544 bytes) and restored to 3 in 15ms
2026/11/25 23:22:50 console: db read dbr_727tpgzcotlpvr7hdprvxyrrqe: relayed 0 chunks (0 bytes) in 19ms, ended client gone
    agent.go:136: dbreads: dbr_727tpgzcotlpvr7hdprvxyrrqe: output 5 bytes in 1 confirmed chunks in 105ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_ax5zn7olbhmvoiksx4ylfrfpea: planned 3 files (1544 bytes) and restored to 3 in 13ms
2026/11/25 23:23:10 console: db read dbr_ax5zn7olbhmvoiksx4ylfrfpea: relayed 0 chunks (0 bytes) in 19.053s, ended no-result
    agent.go:136: dbreads: dbr_ax5zn7olbhmvoiksx4ylfrfpea: output 5 bytes in 1 confirmed chunks in 19.029s
--- PASS: TestDBForwardMinio (22.72s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.23s)
    --- PASS: TestDBForwardMinio/by_timeout (19.16s)
PASS
ok  	github.com/carlosframework/platform/internal/console	22.764s
Bucket created successfully `local/media-transfers`.
Bucket created successfully `local/media-transfer-results`.
local/media-transfer-results versioning is enabled
Created policy `media-transfers` successfully.
Added user `mediatransfers` successfully.
Attached Policies: [media-transfers]
To User: mediatransfers
=== RUN   TestMediaTransfersMinio
    upload.go:117: codec: the store already holds video.mp4
    upload.go:117: codec: the store already holds video.m3u8
    upload.go:117: codec: the store already holds poster.jpg
--- PASS: TestMediaTransfersMinio (0.07s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.074s
Bucket created successfully `local/media-local-store`.
Bucket created successfully `local/media-local-results`.
Created policy `media-local` successfully.
Added user `medialocal` successfully.
Attached Policies: [media-local]
To User: medialocal
=== RUN   TestLocalEndToEndMinio
--- PASS: TestLocalEndToEndMinio (0.55s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.552s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/25 23:23:15 edge: mesh key: minted
2026/11/25 23:23:15 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 23:23:15 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 23:23:15 tenant admission is open. accepting tenant work
2026/11/25 23:23:15 activator: HA placement host=shop-7046b94a.example.test kind=Place ref=annie reason=roomiest generation=2026-11-25T23:23:15Z lock_generation=0
2026/11/25 23:23:15 lease: t8-7046b94a/shop-7046b94a.example.test: HA lease acquired in 3ms (first wake)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: started carlos-instance@shop\x2d7046b94a.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 6ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: carlos-instance@shop\x2d7046b94a.example.test.service launched in 7ms, healthy 0s later
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: woke in 20ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 8ms
2026/11/25 23:23:15 lease: t8-7046b94a/plain-7046b94a.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/25 23:23:15 activator: no replica for plain-7046b94a.example.test in s3://contract-bucket/t8-7046b94a/plain-7046b94a.example.test — booting fresh
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: started carlos-instance@plain\x2d7046b94a.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 2ms, instance key 0s, env 4ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: carlos-instance@plain\x2d7046b94a.example.test.service launched in 7ms, healthy 0s later
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: woke in 99ms: checks 0s, lease 1ms, restore 20ms, identity 0s, protect 0s, spawn 8ms, replicate 70ms
2026/11/25 23:23:15 lease: t8-7046b94a/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/25 23:23:15 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 23:23:15 activator: bot0.shop.bac.sidecar.internal: woke in 21ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 8ms
2026/11/25 23:23:15 activator: next-due probe plain-7046b94a.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 23:23:15 activator: plain-7046b94a.example.test hibernated
2026/11/25 23:23:15 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:e8e8eb148c2100214277c3db26ad4603227101debe7b87d6b7faf44a6ac649fb) in 7ms: files 1ms, sync 4ms, record 1ms, marker 2ms
2026/11/25 23:23:15 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/25 23:23:15 activator: next-due probe shop-7046b94a.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: released with a marker (clean true, txid 1, files 3:9a29cc0e158625bb13057c050d77aa1ff5b52aa3a5823cc8755ae9204e8c4f04) in 5ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/25 23:23:15 activator: shop-7046b94a.example.test hibernated
2026/11/25 23:23:15 lease: t8-7046b94a/shop-7046b94a.example.test: HA lease acquired in 3ms (clean marker)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: restored (other-box)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: started carlos-instance@shop\x2d7046b94a.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: carlos-instance@shop\x2d7046b94a.example.test.service launched in 2ms, healthy 0s later
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: woke in 37ms: checks 0s, lease 3ms, restore 23ms, identity 0s, protect 0s, spawn 2ms, replicate 8ms
2026/11/25 23:23:15 edge: ha-take shop-7046b94a.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/25 23:23:15 edge: forward shop-7046b94a.example.test: annie handed the request over to betty; sending it there (occurrence #1)
    hadrain_twobox_minio_linux_test.go:1238: drain report: {V:1 Transaction:t8-witness Incarnation:6f915ec5c562e7328743892f4fa46ac8 Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-25 23:23:15.386610853 +0000 UTC FinishedAt:2026-11-25 23:23:15.484359343 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-7046b94a.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-7046b94a.example.test Kind:other Marker:true Clean:true Reason:} {Host:bot0.shop.bac.sidecar.internal Kind:worker Marker:true Clean:true Reason:}] Unclean:[] Left:[] Holds:{LongestMS:67 Todays:0 RefusedAtOnce:1} Closed:0 Quiet:{DrainQuiet:{Waking:0 Stopping:0 Recovering:0 Owed:0} Held:[]}}
    hadrain_twobox_minio_linux_test.go:1239: driver calls: [begin shop-7046b94a.example.test <nil> stop plain-7046b94a.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-7046b94a.example.test <nil> stop shop-7046b94a.example.test marker=true clean=true <nil> taken shop-7046b94a.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-7046b94a/plain-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/files/0/objects/0000000000000001-50b21fe43f59eb86c6f77675083456dad2a3ecc06aa1c6fd5bfeb15b921b2362
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/files/0/objects/0000000000000003-24f23af1c89aa0fa9754d0f67e1fa56d625b6f2402cc7254d6ba83641fd78790
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-7046b94a/shop-7046b94a.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-7046b94a/shop-7046b94a.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 138ms; S3 calls 53 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=36 PUT lock=3 PUT replica=4); deployment store calls 20 (GET edges=14 LIST edges=4 PUT edges=2)
    hadrain_twobox_minio_linux_test.go:1367: the fenced A's start gate answers 503 "This service is unavailable. Try again later.\n" (Retry-After "10")
2026/11/25 23:23:15 lease: t8-7046b94a/plain-7046b94a.example.test: acquired in 1ms (client 0s, lock read and write 1ms)
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: started carlos-instance@plain\x2d7046b94a.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 0s, control socket 0s, key gate 0s, logs 0s) 0s, launch file 0s, gate 0s, root start 1ms)
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: carlos-instance@plain\x2d7046b94a.example.test.service launched in 1ms, healthy 0s later
2026/11/25 23:23:15 lease: /tmp/carlos-minio-contract-NtSAm6/g/dw686221511/data/instances/plain-7046b94a.example.test/plain-7046b94a.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/25 23:23:15 activator: plain-7046b94a.example.test: woke in 9ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 5ms
2026/11/25 23:23:15 activator: next-due probe shop-7046b94a.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 23:23:15 activator: shop-7046b94a.example.test: released with a marker (clean true, txid 2, files 3:9a29cc0e158625bb13057c050d77aa1ff5b52aa3a5823cc8755ae9204e8c4f04) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/25 23:23:15 activator: shop-7046b94a.example.test hibernated
2026/11/25 23:23:15 tenant admission is closed for shutdown
2026/11/25 23:23:15 activator: next-due probe plain-7046b94a.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 23:23:15 activator: plain-7046b94a.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.52s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/25 23:23:15 edge: mesh key: minted
2026/11/25 23:23:15 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 23:23:15 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 23:23:15 tenant admission is open. accepting tenant work
2026/11/25 23:23:15 activator: HA placement host=shop-fa7ed29c.example.test kind=Place ref=annie reason=roomiest generation=2026-11-25T23:23:15Z lock_generation=0
2026/11/25 23:23:15 lease: t8-fa7ed29c/shop-fa7ed29c.example.test: HA lease acquired in 3ms (first wake)
2026/11/25 23:23:15 activator: shop-fa7ed29c.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 23:23:15 activator: shop-fa7ed29c.example.test: started carlos-instance@shop\x2dfa7ed29c.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 5ms, control socket 0s, key gate 0s, logs 0s) 6ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 23:23:15 activator: shop-fa7ed29c.example.test: carlos-instance@shop\x2dfa7ed29c.example.test.service launched in 7ms, healthy 0s later
2026/11/25 23:23:15 activator: shop-fa7ed29c.example.test: woke in 18ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 6ms
2026/11/25 23:23:15 activator: next-due probe shop-fa7ed29c.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 23:23:15 activator: final checkpoint shop-fa7ed29c.example.test: lease: release marker owed for s3://contract-bucket/t8-fa7ed29c/shop-fa7ed29c.example.test/lock.json (If-Match "df5bbab2f3f0fcbbd62d4f533b259d46"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/25 23:23:15 activator: shop-fa7ed29c.example.test hibernated
2026/11/25 23:23:15 activator: handover of shop-fa7ed29c.example.test left: released without a marker; its held requests get today's answer
    hadrain_twobox_minio_linux_test.go:1469: the held request's hold ended "shop-fa7ed29c.example.test client 4 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-fa7ed29c.example.test <nil> releasing shop-fa7ed29c.example.test <nil> stop shop-fa7ed29c.example.test marker=false clean=false <nil> left shop-fa7ed29c.example.test released without a marker]
    hadrain_twobox_minio_linux_test.go:1487: a request after the loss: 503 "This instance cannot wake right now. Please try again shortly.\n" (Retry-After "10", holder "none", 0s, err <nil>)
2026/11/25 23:23:15 tenant admission is closed for shutdown
2026/11/25 23:23:15 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.27s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.832s
Bucket created successfully `local/gen-take`.
local/gen-take versioning is enabled
Created policy `gen-take` successfully.
Added user `gentake` successfully.
Attached Policies: [gen-take]
To User: gentake
=== RUN   TestGenerationTakeMinio
=== RUN   TestGenerationTakeMinio/take
2026/11/25 23:23:17 lease: instances/gen-1795648996993916574.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/25 23:23:17 lease: instances/gen-1795648996993916574.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795648996993916574.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/25 23:23:17 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/25 23:23:17 http: proxy error: context canceled
2026/11/25 23:23:17 ERROR retention enforcement failed system=store db=w.example.com.db error="enforce snapshot retention: remove ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/25 23:23:17 http: proxy error: context canceled
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/25 23:23:17 lease: instances/gen-1795648997116760566.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/25 23:23:17 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: remove ltx files: lease: invalid or changed generation binding"
2026/11/25 23:23:17 lease: instances/gen-1795648997116760566.shop.example.com: HA lease acquired in 2ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/25 23:23:17 ERROR retention enforcement failed system=store db=seed.db error="enforce snapshot retention: fetch ltx files: lease: a write has waited too long to reach storage (write fence)"
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 2ms (clean marker)
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 3ms (unclean marker)
2026/11/25 23:23:17 lease: instances/gen-1795648997217286456.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.34s)
    --- PASS: TestGenerationTakeMinio/take (0.12s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.09s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.10s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.351s
minio contract: PASS
=== staticcheck ===
go version go1.26.10 linux/arm64
go: downloading honnef.co/go/tools v0.8.2
go: downloading golang.org/x/exp/typeparams v0.0.0-20231108232855-2478ac86f678
go: downloading github.com/BurntSushi/toml v1.4.1-0.20240526193622-a339e1f7089c
go: downloading golang.org/x/sync v0.23.0
go: downloading golang.org/x/exp v0.0.0-20231110203233-9a3e6036ecaa
staticcheck: clean
=== govulncheck ===
go version go1.26.10 linux/arm64
go: downloading golang.org/x/vuln v1.8.0
go: downloading golang.org/x/telemetry v0.0.0-20260908163034-4bcc4b2ee518
go: downloading golang.org/x/tools v0.50.0
govulncheck: scanned github.com/carlosframework/platform, amadan.net/carlos/platform.git/launchctx
GO-2026-6859  called  stdlib@v1.26.10, fixed in v1.26.11
    HTTP/1 server crash due to MaxBytesReader header race in net/http
    excepted until 2027-01-31 (.amadan/govulncheck-exceptions.tsv:9): net/http MaxBytesReader header race, fixed in go1.26.11. CI and releases stay on go1.26.10 because 1.26.11 deadlocks the edge's Expect: 100-continue path (#897, .amadan/go-toolchain.sh); #904 checked every production MaxBytesReader site and found it unreachable.
GO-2026-5932  required  golang.org/x/crypto@v0.58.0, fixed in v0.58.1-0.20261009181718-2f1f834330b2
    The golang.org/x/crypto/openpgp package is unmaintained, unsafe by design, and has known security issues
    not fatal: no call path to the vulnerable code
govulncheck: clean (2 finding(s), none called outside .amadan/govulncheck-exceptions.tsv)
=== code-health ===
go version go1.26.10 linux/arm64
    codehealth_test.go:42: scanned in 1m50.221s
    codehealth_test.go:107: line metrics (code lines, then physical):
          file-lines  5471  7324  internal/activator activator_test.go
          file-lines  4197  7025  internal/console server.go
          file-lines  4175  6358  . apimode.go
          file-lines  3785  7224  internal/activator activator.go
          file-lines  3530  4459  . apimode_test.go
          file-lines  3261  3864  internal/registry registry_test.go
          file-lines  3209  6395  internal/host agent.go
          file-lines  3094  3992  internal/provision reconcile_test.go
          func-lines   870   891  internal/host plan14InstalledClaimLaunch
          func-lines   810  1275  internal/provision Reconcile
          func-lines   769  1242  internal/console (*Server).handleAPIInstanceCreate
          func-lines   688  1243  internal/host runAgent
          func-lines   571   908  internal/activator (*Service).doWakeOnce
          func-lines   538   546  internal/host runServingParkPeerNamespace
          func-lines   519   712  . runRoute
          func-lines   509   569  internal/host TestPagingIsRateLimited
          func-lines   494   813  internal/release adoptHost
          func-lines   441   500  internal/host TestRootInstanceStopExecStop
          func-lines   421   436  internal/host (*ClaimWakeAssembly).Build
          func-lines   421   437  internal/team TestFixture
          func-lines   412   414  internal/console TestDemoProtectionsSourceToLimitAndTakedown
          func-lines   408   485  . TestFleetAppServesThroughTheHub
          func-lines   402   406  internal/registry (*Registry).haJournal
          func-lines   400   868  internal/provision rootReadArchivedChain
          func-lines   399   732  internal/release PassFilter
          func-lines   390   398  internal/host runFilesSeedPreparationWithLive
          func-lines   383   406  internal/console TestDemoSourceToLiveAndUpdate
          func-lines   378   898  internal/edge (*Edge).ServeHTTP
          func-lines   374   377  internal/host plan14RequiredArtifactsRootRunner
          func-lines   371   417  internal/host TestRootEgressKernelProof
          func-lines   367   584  internal/console (*Server).handleAPIShip
          func-lines   366   636  cmd/console serve
          func-lines   364   371  internal/host testRootMigrationBootstrap
          func-lines   360   362  internal/edge TestDemoAPIAliasBoundary
          func-lines   357   358  internal/registry (*Registry).dispatchRemote
          func-lines   355   372  internal/host TestRootSandboxUpdateFromOldBox
          func-lines   343   354  internal/analytics Prune
          func-lines   340   353  internal/host newColdRootHarness
          func-lines   335   557  internal/console (*Store).migrate
          func-lines   334   334  internal/host TestPlan12RecoveryRestoreSourceDatabase
          func-lines   330   371  internal/edge TestRegionalNameNeverLeavesItsRegion
          func-lines   329   471  . runDeploy
          func-lines   329   329  internal/host TestPlan12RecoveryRestoreSourceDatabase.func1
          func-lines   327   369  internal/edge TestTunnelWebSocketEndToEnd
          func-lines   325   455  internal/objstore TestDeliveredContractMinio
          func-lines   320   654  internal/appconfig SyncExecWithCallbacks
          func-lines   315   318  internal/host plan14TimerIntention
          func-lines   311   314  internal/host plan14TimerIntention.func1
          func-lines   310   315  internal/hostbox ColdHandover.Run
          func-lines   308   309  internal/host rootFilesSeedIsolatedWitness
          func-lines   305   323  internal/host hairpinKernelWitness
          func-lines   304   308  internal/console TestHAP2ProductionDoors
          func-lines   302   329  internal/host TestRootG2PoolIngress
        release-importers: . cmd/console internal/activator internal/analytics internal/appconfig internal/apperr internal/applog internal/apppolicy internal/boxid internal/boxvolumes internal/console internal/dbreads internal/dbreads/dbreadstest internal/dbverify internal/demobuild internal/domains internal/doorkey internal/edge internal/edgeproof internal/edgesfile internal/fleetapi internal/grouproll internal/grouprollaws internal/historyreadback internal/host internal/hostactors internal/hostbox internal/hostclaim internal/hostevidence internal/hostexec internal/hostfence internal/hostfiles internal/hostfloor internal/hostguard internal/hostops internal/hostrelocate internal/hostresolve internal/instancectl internal/instanceupdates internal/interactive internal/layout internal/lease internal/ledger internal/mail internal/mailer internal/mailsubmit internal/metrics internal/moves internal/objstore internal/ops internal/park internal/plans internal/provision internal/relay internal/rollout internal/rootfsimage internal/runs internal/s3fake internal/schedule internal/seeds internal/status internal/telemetry internal/usage internal/vet scripts/pathmapcheck scripts/witness-pointer
        not scanned (215 files):
          cmd/carlos-media/drill_other.go: built only for other systems or tags
          cmd/carlos-media/harden_other.go: built only for other systems or tags
          cmd/console/fleetsocket_other.go: built only for other systems or tags
          cmd/console/servelock_windows.go: built only for other systems or tags
          cmd/moveprobe/detach_windows.go: built only for other systems or tags
          cmd/rootfswitness/mmap_other.go: built only for other systems or tags
          devbox_acl_other.go: built only for other systems or tags
          devbox_envfile_darwin_test.go: built only for other systems or tags
          devbox_envfile_other.go: built only for other systems or tags
          domains_transfer_signals_other.go: built only for other systems or tags
          interactive_term_darwin.go: built only for other systems or tags
          interactive_term_other.go: built only for other systems or tags
          internal/activator/claimprocess_root_other.go: built only for other systems or tags
          internal/activator/escrow_stamp_other.go: built only for other systems or tags
          internal/activator/fleetreserve_other.go: built only for other systems or tags
          internal/activator/harecord_other.go: built only for other systems or tags
          internal/activator/ownenv_other.go: built only for other systems or tags
          internal/activator/pty_other.go: built only for other systems or tags
          internal/activator/race_on_test.go: built only for other systems or tags
          internal/activator/rolelaunch_other.go: built only for other systems or tags
          internal/assetcache/statfs_other.go: built only for other systems or tags
          internal/boxself/io_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other.go: built only for other systems or tags
          internal/cgroup/cleanup_other_test.go: built only for other systems or tags
          internal/cgroup/hostprocs_other.go: built only for other systems or tags
          internal/cgroup/recreate_other.go: built only for other systems or tags
          internal/cgroup/role_other.go: built only for other systems or tags
          internal/cgroup/shim_other.go: built only for other systems or tags
          internal/cgroup/strict_other.go: built only for other systems or tags
          internal/cgroup/verify_other.go: built only for other systems or tags
          internal/console/claim_sql_identity_other.go: built only for other systems or tags
          internal/console/geoipverify_other.go: built only for other systems or tags
          internal/console/hostreports_process_other.go: built only for other systems or tags
          internal/console/replicaview_other.go: built only for other systems or tags
          internal/console/restore_sim_nice_other_test.go: built only for other systems or tags
          internal/console/scalecost_other_test.go: built only for other systems or tags
          internal/console/seedscratch_windows.go: built only for other systems or tags
          internal/dbreads/worker_other.go: built only for other systems or tags
          internal/demobuild/security_other.go: built only for other systems or tags
          internal/democlaim/source_other.go: built only for other systems or tags
          internal/devbox/peer_darwin.go: built only for other systems or tags
          internal/devbox/peer_darwin_test.go: built only for other systems or tags
          internal/devbox/peer_other.go: built only for other systems or tags
          internal/devbox/socketcheck_other.go: built only for other systems or tags
          internal/edge/devboxpeer_other.go: built only for other systems or tags
          internal/edge/hairpin_other.go: built only for other systems or tags
          internal/edge/heldbudget_other.go: built only for other systems or tags
          internal/edge/purge_listen_unix.go: built only for other systems or tags
          internal/edge/purge_listen_windows.go: built only for other systems or tags
          internal/edge/race_on_test.go: built only for other systems or tags
          internal/edge/replicaconsole_owner_other.go: built only for other systems or tags
          internal/edge/replicaconsole_peer_other.go: built only for other systems or tags
          internal/edge/replicaconsole_socket_other_test.go: built only for other systems or tags
          internal/edge/static_artifact_other.go: built only for other systems or tags
          internal/edge/static_recordlock_other.go: built only for other systems or tags
          internal/edge/static_sweep_other.go: built only for other systems or tags
          internal/execsandbox/cleanup_other.go: built only for other systems or tags
          internal/execsandbox/file_other.go: built only for other systems or tags
          internal/execsandbox/oci_other.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin.go: built only for other systems or tags
          internal/fileacl/fileacl_darwin_amd64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_arm64.s: built only for other systems or tags
          internal/fileacl/fileacl_darwin_test.go: built only for other systems or tags
          internal/grouproll/state_other.go: built only for other systems or tags
          internal/grouprollaws/pty_darwin.go: built only for other systems or tags
          internal/grouprollaws/pty_other.go: built only for other systems or tags
          internal/hairpin/native_other.go: built only for other systems or tags
          internal/host/applylock_other_test.go: built only for other systems or tags
          internal/host/bootstrapfs_other.go: built only for other systems or tags
          internal/host/boxroles_config_other.go: built only for other systems or tags
          internal/host/claimfilesseed_delegation_other.go: built only for other systems or tags
          internal/host/claimfilesseed_transport_other.go: built only for other systems or tags
          internal/host/claimjournal_containment_other.go: built only for other systems or tags
          internal/host/claimjournal_migration_other.go: built only for other systems or tags
          internal/host/claimlaunch_kernel_other.go: built only for other systems or tags
          internal/host/claimlaunch_rev2_other_test.go: built only for other systems or tags
          internal/host/claimproduction_other.go: built only for other systems or tags
          internal/host/claimready_other.go: built only for other systems or tags
          internal/host/claimroleassembly_other.go: built only for other systems or tags
          internal/host/claimservingartifact_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other.go: built only for other systems or tags
          internal/host/claimservinghandover_reboot_other_test.go: built only for other systems or tags
          internal/host/claimservingpark_other.go: built only for other systems or tags
          internal/host/claimstate_other.go: built only for other systems or tags
          internal/host/claimstop_kernel_other.go: built only for other systems or tags
          internal/host/claimtoken_inventory_other.go: built only for other systems or tags
          internal/host/claimunit_dropin_other.go: built only for other systems or tags
          internal/host/claimunit_files_other.go: built only for other systems or tags
          internal/host/claimunit_migrate_other.go: built only for other systems or tags
          internal/host/claimunit_ready_other.go: built only for other systems or tags
          internal/host/claimunit_socket_migration_other.go: built only for other systems or tags
          internal/host/consolefleet_owner_other.go: built only for other systems or tags
          internal/host/dbreads_other.go: built only for other systems or tags
          internal/host/egress_rail_other.go: built only for other systems or tags
          internal/host/fileowner_other.go: built only for other systems or tags
          internal/host/flock_windows.go: built only for other systems or tags
          internal/host/group_config_other.go: built only for other systems or tags
          internal/host/group_maintenance_other.go: built only for other systems or tags
          internal/host/group_maintenance_verbs_other.go: built only for other systems or tags
          internal/host/group_receipt_other.go: built only for other systems or tags
          internal/host/hadrain_call_other.go: built only for other systems or tags
          internal/host/hadrain_socket_other.go: built only for other systems or tags
          internal/host/hadrainfence_other.go: built only for other systems or tags
          internal/host/headroom_other.go: built only for other systems or tags
          internal/host/installchannel_other.go: built only for other systems or tags
          internal/host/managedboot_other.go: built only for other systems or tags
          internal/host/metrics_nested_other.go: built only for other systems or tags
          internal/host/movesfloor_other.go: built only for other systems or tags
          internal/host/movesfloorgate_other.go: built only for other systems or tags
          internal/host/movesheldrelease_other.go: built only for other systems or tags
          internal/host/movesmeasure_other.go: built only for other systems or tags
          internal/host/offcloudcredentials_other.go: built only for other systems or tags
          internal/host/registrychild_exec_other.go: built only for other systems or tags
          internal/host/registrychild_other.go: built only for other systems or tags
          internal/host/registryowner_chown_other.go: built only for other systems or tags
          internal/host/registryowner_descriptor_unix.go: built only for other systems or tags
          internal/host/replicahealth_other.go: built only for other systems or tags
          internal/host/rootgeneration_census_other.go: built only for other systems or tags
          internal/host/rootgeneration_kernel_other.go: built only for other systems or tags
          internal/host/rootgeneration_payload_other.go: built only for other systems or tags
          internal/host/rootgeneration_retired_other.go: built only for other systems or tags
          internal/host/rootmigration_production_other.go: built only for other systems or tags
          internal/host/runscset_other.go: built only for other systems or tags
          internal/host/sandboxenv_other.go: built only for other systems or tags
          internal/host/statfs_windows.go: built only for other systems or tags
          internal/host/systemapply_other.go: built only for other systems or tags
          internal/hostbox/census_vendor_other.go: built only for other systems or tags
          internal/hostbox/inventory_identity_other.go: built only for other systems or tags
          internal/hostbox/journalmigration_other.go: built only for other systems or tags
          internal/hostbox/journalnamespace_other.go: built only for other systems or tags
          internal/hostbox/journaltrust_other.go: built only for other systems or tags
          internal/hostbox/migration_census_other.go: built only for other systems or tags
          internal/hostbox/typedpark_other.go: built only for other systems or tags
          internal/hostenv/group_other.go: built only for other systems or tags
          internal/hostenv/write_other.go: built only for other systems or tags
          internal/hostenv/write_other_test.go: built only for other systems or tags
          internal/hostexec/clock_other.go: built only for other systems or tags
          internal/hostexec/clock_other_test.go: built only for other systems or tags
          internal/hostexec/local_other.go: built only for other systems or tags
          internal/hostexec/pending_other.go: built only for other systems or tags
          internal/hostexec/probe_other.go: built only for other systems or tags
          internal/hostexec/rootprocess_other.go: built only for other systems or tags
          internal/hostfiles/dir_other.go: built only for other systems or tags
          internal/hostfiles/refuse_other.go: built only for other systems or tags
          internal/hostfiles/watch_other.go: built only for other systems or tags
          internal/hostfloor/controllers_other.go: built only for other systems or tags
          internal/hostfloor/image_other.go: built only for other systems or tags
          internal/hostguard/flock_other.go: built only for other systems or tags
          internal/hostguard/flock_other_test.go: built only for other systems or tags
          internal/hostguard/record_other.go: built only for other systems or tags
          internal/instancectl/claimexec_other.go: built only for other systems or tags
          internal/instancectl/claimexec_socket_other.go: built only for other systems or tags
          internal/instancectl/claimlaunch_snapshot_other.go: built only for other systems or tags
          internal/instancectl/claimnetwork_other.go: built only for other systems or tags
          internal/instancectl/demo_snapshot_other.go: built only for other systems or tags
          internal/instancectl/egress_cgroup_other.go: built only for other systems or tags
          internal/instancectl/egress_dropin_other.go: built only for other systems or tags
          internal/instancectl/fleetsize_other.go: built only for other systems or tags
          internal/instancectl/gvisorprobe_other.go: built only for other systems or tags
          internal/instancectl/peer_other.go: built only for other systems or tags
          internal/instancectl/peer_tuple_other.go: built only for other systems or tags
          internal/instancectl/rootfs_identity_other.go: built only for other systems or tags
          internal/instanceexec/claimexec_other.go: built only for other systems or tags
          internal/instanceexec/exec_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/netlink_route_other.go: built only for other systems or tags
          internal/instanceexec/probe_gvisor_other.go: built only for other systems or tags
          internal/instanceexec/probe_hardening_other.go: built only for other systems or tags
          internal/instanceexec/probe_other.go: built only for other systems or tags
          internal/instanceexec/probe_rootfs_other.go: built only for other systems or tags
          internal/instanceexec/sandbox_other.go: built only for other systems or tags
          internal/instanceexec/scope_other.go: built only for other systems or tags
          internal/instanceexec/stop_other.go: built only for other systems or tags
          internal/instanceexec/tty_other.go: built only for other systems or tags
          internal/instancefs/instancefs_other.go: built only for other systems or tags
          internal/launchd/activate_darwin.go: built only for other systems or tags
          internal/launchd/activate_darwin_amd64.s: built only for other systems or tags
          internal/launchd/activate_darwin_arm64.s: built only for other systems or tags
          internal/launchd/activate_darwin_test.go: built only for other systems or tags
          internal/layout/journal_other.go: built only for other systems or tags
          internal/layout/links_other.go: built only for other systems or tags
          internal/mailer/keys_other.go: built only for other systems or tags
          internal/maintenanceexec/run_other.go: built only for other systems or tags
          internal/managedboot/admission_other.go: built only for other systems or tags
          internal/managedboot/identity_other.go: built only for other systems or tags
          internal/mediahandler/collect_other.go: built only for other systems or tags
          internal/mediahandler/procs_other.go: built only for other systems or tags
          internal/medialocal/runner_other.go: built only for other systems or tags
          internal/moves/archive/open_other.go: built only for other systems or tags
          internal/moves/archive/sync_other.go: built only for other systems or tags
          internal/ops/flock_windows.go: built only for other systems or tags
          internal/park/local_other.go: built only for other systems or tags
          internal/privatefile/io_other.go: built only for other systems or tags
          internal/proxyproto/peek_other.go: built only for other systems or tags
          internal/relay/race_on_test.go: built only for other systems or tags
          internal/release/consumedfence_other.go: built only for other systems or tags
          internal/release/digestcache_other.go: built only for other systems or tags
          internal/rootaws/credentials_other.go: built only for other systems or tags
          internal/rootaws/open_darwin.go: built only for other systems or tags
          internal/rootfsimage/dir_other.go: built only for other systems or tags
          internal/rootstate/authoritydir_other.go: built only for other systems or tags
          internal/rootstate/authorityfile_other.go: built only for other systems or tags
          internal/rootstate/file_other.go: built only for other systems or tags
          internal/rootstate/link_other.go: built only for other systems or tags
          internal/rootstate/persistent_other.go: built only for other systems or tags
          internal/rootstate/state_other.go: built only for other systems or tags
          internal/safefile/file_other.go: built only for other systems or tags
          internal/safefile/reap_other.go: built only for other systems or tags
          internal/stopevidence/fds_other.go: built only for other systems or tags
          internal/stopevidence/fds_other_test.go: built only for other systems or tags
          internal/stopevidence/holders_other.go: built only for other systems or tags
          internal/stopevidence/reconstruct_other.go: built only for other systems or tags
          internal/team/storelock_other.go: built only for other systems or tags
          internal/team/storelock_windows.go: built only for other systems or tags
          move_offline_run_other.go: built only for other systems or tags
          system_group_other.go: built only for other systems or tags
        
    codehealth_test.go:115: fatal               1094 at  474 sites  log.Fatal*, (*log.Logger).Fatal* and os.Exit in the root package's production files
    codehealth_test.go:115: sleep               1005 at  811 sites  time.Sleep in test files
    codehealth_test.go:115: db-no-context        885 at  703 sites  database calls with no context (dbOpWithoutContext) in production files
    codehealth_test.go:115: host-context         188 at  142 sites  context.Background and context.TODO in internal/host production files
    codehealth_test.go:115: func-lines         18604 at   45 sites  functions over 300 code lines (blank and comment-only lines not counted)
    codehealth_test.go:115: file-lines         30722 at    8 sites  files over 3,000 code lines, counted the same way
    codehealth_test.go:115: release-importers     66 at    1 sites  packages whose production files import internal/release
    codehealth_test.go:119: below the record: file-lines internal/console server.go -: 4197 in the code, the record allows 4210 (make code-health-record lowers it)
--- PASS: TestCodeHealth (110.22s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	111.281s
=== code-health-record ===
go version go1.26.10 linux/arm64
code-health record: HEAD is on main; comparing with its parent 95539056f63dad93191407478c1ac951a9e6d6df
=== RUN   TestRecordAgainstBase
--- PASS: TestRecordAgainstBase (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/codehealth	0.008s
code-health record: no line went up without a reason
=== race ===
go version go1.26.10 linux/arm64
GATE_RACE=1 .amadan/test-gate.sh
=== internal_systemd@0 (14 s, from +15 s)
ok  	github.com/carlosframework/platform/internal/systemd	13.524s
=== internal_rootaws@0 (26 s, from +34 s)
ok  	github.com/carlosframework/platform/internal/rootaws	25.383s
=== internal_activator@0 (266 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	264.366s
=== internal_activator@1 (264 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	262.193s
=== internal_activator@2 (276 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	274.410s
=== internal_activator@3 (418 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	416.328s
=== internal_activator@4 (275 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	273.461s
=== internal_activator@5 (311 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	308.870s
=== internal_activator@6 (318 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	316.256s
=== internal_activator@7 (409 s, from +112 s)
ok  	github.com/carlosframework/platform/internal/activator	407.232s
=== internal_edge@0 (84 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	80.967s
=== internal_edge@1 (81 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	77.813s
=== internal_edge@2 (199 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	195.560s
=== internal_edge@3 (141 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	137.981s
=== internal_edge@4 (160 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	156.820s
=== internal_edge@5 (219 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	215.409s
=== internal_edge@6 (228 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	224.258s
=== internal_edge@7 (206 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	202.895s
=== internal_edge@8 (221 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	217.257s
=== internal_edge@9 (278 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	274.540s
=== internal_edge@10 (215 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	211.762s
=== internal_edge@11 (216 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	212.634s
=== internal_edge@12 (299 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	295.960s
=== internal_edge@13 (296 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	292.246s
=== internal_edge@14 (200 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	196.262s
=== internal_edge@15 (243 s, from +134 s)
ok  	github.com/carlosframework/platform/internal/edge	239.417s
=== internal_host@0 (8 s, from +194 s)
ok  	github.com/carlosframework/platform/internal/host	4.803s
=== internal_host@1 (17 s, from +194 s)
ok  	github.com/carlosframework/platform/internal/host	13.296s
=== lists: internal_edge 133 s, internal_activator 111 s, internal_host 193 s, internal_rootaws 34 s, internal_systemd 14 s
=== cpu: the gate used 7620 cpu-seconds in 530 s, about 14.4 of 32 cores; the machine as a whole was 44% busy
=== gitleaks ===
go version go1.26.10 linux/arm64
go: downloading github.com/zricethezav/gitleaks/v8 v8.30.1
go: downloading github.com/spf13/cobra v1.9.1
go: downloading github.com/Masterminds/sprig/v3 v3.3.0
go: downloading github.com/fatih/semgroup v1.2.0
go: downloading github.com/spf13/viper v1.19.0
go: downloading github.com/BobuSumisu/aho-corasick v1.0.3
go: downloading github.com/gitleaks/go-gitdiff v0.9.1
go: downloading golang.org/x/exp v0.0.0-20250218142911-aa4b98e5adaa
go: downloading github.com/mholt/archives v0.1.2
go: downloading github.com/charmbracelet/lipgloss v0.5.0
go: downloading github.com/rs/zerolog v1.33.0
go: downloading github.com/hashicorp/go-version v1.7.0
go: downloading github.com/h2non/filetype v1.1.3
go: downloading golang.org/x/sync v0.11.0
go: downloading github.com/fsnotify/fsnotify v1.8.0
go: downloading github.com/mitchellh/mapstructure v1.5.0
go: downloading github.com/spf13/pflag v1.0.6
go: downloading github.com/spf13/afero v1.12.0
go: downloading gopkg.in/ini.v1 v1.67.0
go: downloading github.com/spf13/cast v1.7.1
go: downloading github.com/sagikazarmark/slog-shim v0.1.0
go: downloading github.com/hashicorp/hcl v1.0.0
go: downloading gopkg.in/yaml.v3 v3.0.1
go: downloading github.com/pelletier/go-toml/v2 v2.2.3
go: downloading github.com/magiconair/properties v1.8.9
go: downloading github.com/subosito/gotenv v1.6.0
go: downloading github.com/lucasb-eyer/go-colorful v1.2.0
go: downloading github.com/muesli/termenv v0.15.1
go: downloading github.com/muesli/reflow v0.2.1-0.20210115123740-9e1d0d53df68
go: downloading github.com/mattn/go-runewidth v0.0.14
go: downloading github.com/Masterminds/semver/v3 v3.3.0
go: downloading dario.cat/mergo v1.0.1
go: downloading github.com/Masterminds/goutils v1.1.1
go: downloading github.com/huandu/xstrings v1.5.0
go: downloading github.com/mitchellh/copystructure v1.2.0
go: downloading github.com/shopspring/decimal v1.4.0
go: downloading golang.org/x/crypto v0.35.0
go: downloading golang.org/x/text v0.22.0
go: downloading github.com/rivo/uniseg v0.2.0
go: downloading github.com/mitchellh/reflectwalk v1.0.2
go: downloading golang.org/x/sys v0.30.0
go: downloading github.com/aymanbagabas/go-osc52/v2 v2.0.1
go: downloading github.com/STARRY-S/zip v0.2.1
go: downloading github.com/klauspost/compress v1.17.11
go: downloading github.com/andybalholm/brotli v1.1.2-0.20250424173009-453214e765f3
go: downloading github.com/klauspost/pgzip v1.2.6
go: downloading github.com/ulikunitz/xz v0.5.12
go: downloading github.com/pierrec/lz4/v4 v4.1.21
go: downloading github.com/minio/minlz v1.0.0
go: downloading github.com/nwaples/rardecode/v2 v2.1.0
go: downloading github.com/sorairolake/lzip-go v0.3.5
go: downloading github.com/therootcompany/xz v1.0.1
go: downloading github.com/bodgit/sevenzip v1.6.0
go: downloading github.com/dsnet/compress v0.0.2-0.20230904184137-39efe44ab707
go: downloading github.com/mattn/go-colorable v0.1.14
go: downloading github.com/bodgit/windows v1.0.1
go: downloading github.com/bodgit/plumbing v1.3.0
go: downloading github.com/hashicorp/go-multierror v1.1.1
go: downloading go4.org v0.0.0-20230225012048-214862532bf5
go: downloading github.com/hashicorp/golang-lru/v2 v2.0.7
go: downloading github.com/hashicorp/errwrap v1.1.0
self-test: reported source file: a key
self-test: reported source file: a 64-hex key
self-test: reported source file: a census-shaped entry
self-test: reported source file: a key marked gitleaks:allow
self-test: reported source file: a test's fake value outside tests
self-test: reported allowed file: another key beside its allowed value
self-test: reported a tracked file named gitleaks-gate-sentinel.env
self-test: reported 97 near misses of the names notscanned.go lists
self-test: skipped  the 32 files notscanned.go lists
self-test: refused  a notscanned.go entry git does not track
self-test: refused  a config that does not parse
self-test: refused  a config that does not exist
self-test: refused  a missing gitleaks binary
self-test: 6 planted keys reported, 130 tracked files judged, 3 broken setups refused
gitleaks: scanned 11632 tracked files; 32 not scanned, by exact path (scripts/gitleaks-gate/notscanned.go)
gitleaks: clean
diff --git a/approved_rootfs_copy_test.go b/approved_rootfs_copy_test.go
index de55a3986..c8b988523 100644
--- a/approved_rootfs_copy_test.go
+++ b/approved_rootfs_copy_test.go
@@ -21,7 +21,7 @@ import (
const rootfsCopyRecordPath = "docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md"
// Canonical ids only: two digits from C01 to C99, three digits from C100
-// (Plan 4 runs to RFS-4-C146; RFS-4-C147 is the rootfs-default-home follow-up, RFS-4-C155 the /etc/hosts one). No leading zero on a three-digit id, no C00.
+// (Plan 4 runs to RFS-4-C146; RFS-4-C147 is the rootfs-default-home follow-up, RFS-4-C155 the /etc/hosts one, RFS-4-C156 the netlink one). No leading zero on a three-digit id, no C00.
var rootfsCopyIDPattern = regexp.MustCompile(`^RFS-[1-6]-C(0[1-9]|[1-9][0-9]{1,2})$`)
// rootfsCopyIDs is the deck's inventory, pinned as a literal list in the
@@ -85,7 +85,7 @@ var rootfsCopyIDs = []string{
"RFS-4-C45", "RFS-4-C46", "RFS-4-C47", "RFS-4-C147", "RFS-4-C155", "RFS-4-C48",
"RFS-4-C49", "RFS-4-C50", "RFS-4-C51", "RFS-4-C52",
"RFS-4-C53", "RFS-4-C54", "RFS-4-C55", "RFS-4-C56",
- "RFS-4-C57", "RFS-4-C58", "RFS-4-C59", "RFS-4-C60",
+ "RFS-4-C57", "RFS-4-C156", "RFS-4-C58", "RFS-4-C59", "RFS-4-C60",
"RFS-4-C61", "RFS-4-C62", "RFS-4-C63", "RFS-4-C64",
"RFS-4-C65", "RFS-4-C66", "RFS-4-C67", "RFS-4-C68",
"RFS-4-C69", "RFS-4-C70", "RFS-4-C71", "RFS-4-C72",
@@ -256,6 +256,8 @@ var rootfsCopyBuilt = []string{
"RFS-4-C147",
// rootfs-etc-hosts-1349 (2026-11-22): carlos ship adds /etc/hosts (docs/site/rootfs.md)
"RFS-4-C155",
+ // rootfs-netlink-route-1419 (2026-11-25): rootfs processes read NETLINK_ROUTE (docs/site/rootfs.md)
+ "RFS-4-C156",
// rails-guide-run-console (2026-11-06): Commands and consoles on the
// Rootfs page and the Rails guide's pointer; RFS-4-C100 struck
"RFS-4-C148", "RFS-4-C149", "RFS-4-C150", "RFS-4-C151", "RFS-4-C152", "RFS-4-C153", "RFS-4-C154",
diff --git a/docs/site/rootfs.md b/docs/site/rootfs.md
index d77ea92a8..a385c82d7 100644
--- a/docs/site/rootfs.md
+++ b/docs/site/rootfs.md
@@ -77,6 +77,8 @@ carlos ship --check warns when a process runs Node, Bun or Deno and the release
An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service.
+A process can read the box's network setup, such as its interfaces, addresses and routes, but cannot change it. So getifaddrs works, and with it Ruby's Socket.ip_address_list and Resolv and Node's os.networkInterfaces. Go's net.Interfaces works too. Other netlink sockets are refused.
+
## The visitor's address
Requests reach the web process with the visitor's address as the last entry of X-Forwarded-For. The platform writes that header itself and removes anything the visitor sent, so the last entry is always the address the platform saw. This also holds on a fleet box, where the request came in through the hub.
diff --git a/docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md b/docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md
new file mode 100644
index 000000000..be184ebc0
--- /dev/null
+++ b/docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md
@@ -0,0 +1,33 @@
+# Census approval: rootfs-netlink-route-1419
+
+Ruling `census-ruling-rootfs-netlink-route-1419`. The independent reviewer approves or rejects every change below, 1 with a new disposition; nothing goes to the census owner (Paul, #280, 2026-10-26).
+
+| unit | change | read sites | what changed |
+|---|---|---|---|
+| `internal/host/units/carlos-instance-rootfs-cmd@.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+| `internal/host/units/carlos-instance-rootfs-gen@.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+| `internal/host/units/carlos-instance-rootfs-probe.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+| `internal/host/units/carlos-instance-rootfs-tty@.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+| `internal/host/units/carlos-instance-rootfs-worker@.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+| `internal/host/units/carlos-instance-rootfs@.service` `external` | body | unchanged (1) | the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read |
+
+Envelopes re-pinned: `internal/host/units`, `internal/instanceexec`.
+
+Review: a model from the other family than the author reads the branch's diff against main on the amadan.net remote (`origin` or `amadan`, whichever points at amadan.net) and gives a verdict for every unit and every re-pinned envelope above. For a unit, compare the change with its recorded disposition and basis below; for an envelope, read every changed function in the package and what it reaches. Reject if the change lets root open, run, query or follow anything it did not before from a path or input a tenant, an app or a box agent can create, write or name; if it weakens a check, refusal, validation, argument or environment the basis relies on; or if the diff cannot settle either. Otherwise approve. Record each verdict on #280 with the tip. A rejected unit goes back to the author to correct; nothing escalates to the census owner.
+
+Recorded dispositions, which each change must still satisfy:
+
+- `internal/host/units/carlos-instance-rootfs-cmd@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-cmd@.service, accepted at census-ruling-carlos-run): new (rootfs Plan 2 Task 4): the rootfs cmd unit (oneshot, TimeoutStartSec=6h5m, the cmd log sockets), binding /run/carlos-control/exe/%I/rootfs/cmd/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.
+- `internal/host/units/carlos-instance-rootfs-gen@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs generation's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (RootfsGenDropIn) supplies, so the template alone mounts and runs nothing. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.
+- `internal/host/units/carlos-instance-rootfs-probe.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe's unit (embedded in the carlos binary, installed by root's unit install, applied by PID 1 as root; its process, carlos instance-probe --rootfs, runs as user carlos);basis=root-input (J4, as carlos-instance-probe.service): new (rootfs Plan 2 Task 7): a oneshot on carlos-instances.slice with the same restated block, RootImage= the probe image root builds itself (BuildProbeImage, under /run/carlos-control/probe), the probe's own _probe directories, root's launch.json, resolv.conf copy and box-addrs list read-only from /run/carlos-control/exe/_probe/rootfs/run/, and StandardOutput=truncate:/run/carlos-control/rootfs-probe.out, which PID 1 writes and root reads (runRootfsProbe); no tenant image, file or name reaches it;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, inside the rootfs block; plus one line outside it, Environment=CARLOS_PROBE_SYSCALL_FILTER=1, a constant the unit sets for its own process (the probe, as carlos); it names no path
+- `internal/host/units/carlos-instance-rootfs-tty@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5, new: the rootfs tty template, carlos-instance-rootfs-cmd@.service outside named lines held by TestRootfsTTYTemplateEqualsRootfsCmdOutsideTheNamedLines: Description (tty), ExecStart/ExecStopPost instance-exec/instance-exit --rootfs tty %I, StandardInput=file:/run/carlos/logs/%I.tty.sock with StandardOutput/StandardError=journal, and RootImage plus the two BindReadOnlyPaths sources under /run/carlos-control/exe/%I/rootfs/tty/ (root-only exe layout) instead of rootfs/cmd/. The rootfs namespace block byte for byte (TestRootfsTemplatesShareOneNamespace), runs as carlos, binds only the instance own and root paths (TestRootfsTemplatesBindOnlyTheInstancesOwnAndRoots). Task 6: POST /tty runtime=rootfs (startRootfsCmd with RoleTTY) starts it through Plan 2's rootfs one-shot path (preflight, validateStagedImage, ensureRootfsExe under rootfs/tty/, jit drop-in and owed reload, post-start MemoryDenyWriteExecute check); its files go only through removeRootfsUnitFiles (stopRootfs and cleanCmdExe with RoleTTY, the sweep);rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.
+- `internal/host/units/carlos-instance-rootfs-worker@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs worker's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (WorkerDropIn) supplies. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.
+- `internal/host/units/carlos-instance-rootfs@.service` `external`: legacy, task accepted-legacy. Basis: accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance@.service): new (rootfs Plan 2 Task 4): the run unit of a rootfs instance (ExecStart= the trampoline with --rootfs run, ExecStopPost= instance-exit --rootfs run), Slice=carlos-instances-%i.slice, binding /run/carlos-control/exe/%I/rootfs/run/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.
+
+New dispositions, which census-propose wrote and the reviewer checks against the unit's reads and the diff:
+
+- new `internal/instanceexec/netlink_route_linux.go:ScopeNetlinkRoute`: reads +file:Syscall; written legacy, accepted-legacy, frozen
+
+Seal: `8b8e269938a575bfaeb8f0c9a5be508b4b22a10b7b5bd19d74fa511e5f15a302` → `0d02e63b6a67aab196e13324393148ab8faccbd4331af3eadb1ab52ff5b42bb1`.
+
+Overlay: `internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv`, appended to `internal/provision/testdata/plan14-root-reads-chain.tsv`.
diff --git a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md
index 8e3461e13..fa81048df 100644
--- a/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md
+++ b/docs/superpowers/plans/2026-10-24-rootfs-apps-copy.md
@@ -301,6 +301,7 @@ From the plan: Placeholders: `<app>` an app; `<fleet>` a fleet name; `<region>`
| RFS-4-C55 | docs/site/rootfs.md (fact, R11) | Memory is never writable and executable at once, unless the release is shipped with carlos ship --jit. A JIT compiler needs that: Node, Bun and Deno, the JVM, Ruby's YJIT and PHP's opcache JIT. Ruby, PHP and Python run well without one. | approved |
| RFS-4-C56 | docs/site/rootfs.md | Network | approved |
| RFS-4-C57 | docs/site/rootfs.md | An instance can reach public addresses, such as an object store or a managed database's public endpoint. It cannot reach a private address unless a system operator allows it for the app with carlos apps set --egress-allow, and it never reaches the box it runs on or the cloud's metadata service. | approved |
+| RFS-4-C156 | docs/site/rootfs.md (fact, rootfs-netlink-route-1419) | A process can read the box's network setup, such as its interfaces, addresses and routes, but cannot change it. So getifaddrs works, and with it Ruby's Socket.ip_address_list and Resolv and Node's os.networkInterfaces. Go's net.Interfaces works too. Other netlink sockets are refused. | approved |
| RFS-4-C148 | docs/site/rootfs.md (rails-guide-run-console) | Commands and consoles | approved |
| RFS-4-C149 | docs/site/rootfs.md (rails-guide-run-console) | carlos run runs a one-off command on an instance: a data fix, a rake task, an artisan or manage.py command. It runs inside the instance's image, in web's working_dir, with web's environment and the same database. Its output comes back to your terminal, and carlos exits with the command's own status. | approved |
| RFS-4-C150 | docs/site/rootfs.md (rails-guide-run-console) | A command with a slash in it, like bin/rails, is found from web's working_dir. A bare name, like php, is found along the image's PATH. Commands are not run through a shell, so for a pipe or a variable, run sh -c with the line in quotes. | approved |
@@ -610,6 +611,10 @@ RFS-4-C155 (2026-11-22, #1349: carlos ship adds /etc/hosts) was approved
by a Luna copy pass under Paul's delegation; its revision was applied,
then ", or a link to one" added when Astra R1 kept a symlinked hosts
file's target.
+RFS-4-C156 (2026-11-25, #1419: rootfs processes may read NETLINK_ROUTE)
+was reviewed by a Luna pass under Paul's delegation; its revision was
+applied with two facts corrected (getifaddrs lists interfaces and
+addresses, not routes; Go's net.Interfaces does not use getifaddrs).
Recounted from the rows on 2026-10-30 (Plan 6 amendment, Astra R1 P2-7);
the earlier counts had not followed Plans 1 and 4's later rows.
@@ -617,7 +622,7 @@ the earlier counts had not followed Plans 1 and 4's later rows.
- Plan 1: 99 live, 0 struck, 99 rows
- Plan 2: 12 live, 0 struck, 12 rows
- Plan 3: 32 live, 3 struck, 35 rows
-- Plan 4: 151 live, 3 struck, 154 rows (RFS-4-C100 struck and RFS-4-C148 to C154 added on 2026-11-06; RFS-4-C155 added on 2026-11-22)
+- Plan 4: 152 live, 3 struck, 155 rows (RFS-4-C100 struck and RFS-4-C148 to C154 added on 2026-11-06; RFS-4-C155 added on 2026-11-22; RFS-4-C156 on 2026-11-25)
- Plan 5: 44 live, 0 struck, 44 rows
- Plan 6: 75 live, 0 struck, 75 rows (RFS-6-C47 revised and RFS-6-C65 added and approved on 2026-10-30; RFS-6-C66 to C75 added and approved on 2026-10-31)
-- Total: 413 live, 6 struck, 419 rows
+- Total: 414 live, 6 struck, 420 rows
diff --git a/internal/host/units/carlos-instance-rootfs-cmd@.service b/internal/host/units/carlos-instance-rootfs-cmd@.service
index 0c12358e2..1adf28518 100644
--- a/internal/host/units/carlos-instance-rootfs-cmd@.service
+++ b/internal/host/units/carlos-instance-rootfs-cmd@.service
@@ -27,7 +27,10 @@ RemainAfterExit=yes
TimeoutStartSec=6h5m
# --rootfs before the role, in ExecStart= and ExecStopPost= alike, as in
# carlos-instance-rootfs@.service.
-ExecStart=/opt/carlos/carlos instance-exec --rootfs cmd %I
+# --netlink-scope: the trampoline scopes netlink to NETLINK_ROUTE before the
+# tenant starts (#1419). A carlos from before #1419 does not know the flag
+# and exits at once, so this unit's AF_NETLINK never reaches an unscoped tenant.
+ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope cmd %I
# The advisory exit record, as for the other templates. Not "+" (codex R3-2).
ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I
User=carlos
@@ -187,8 +190,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units/carlos-instance-rootfs-gen@.service b/internal/host/units/carlos-instance-rootfs-gen@.service
index 18d839479..abb01634f 100644
--- a/internal/host/units/carlos-instance-rootfs-gen@.service
+++ b/internal/host/units/carlos-instance-rootfs-gen@.service
@@ -24,7 +24,10 @@ Before=carlos-edge-drain.service
Type=simple
# --rootfs before the role, in ExecStart= and ExecStopPost= alike, as in
# carlos-instance-rootfs@.service.
-ExecStart=/opt/carlos/carlos instance-exec --rootfs run %I
+# --netlink-scope: the trampoline scopes netlink to NETLINK_ROUTE before the
+# tenant starts (#1419). A carlos from before #1419 does not know the flag
+# and exits at once, so this unit's AF_NETLINK never reaches an unscoped tenant.
+ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope run %I
# The tenant runs in its own data directory (#256 D). %I here is
# <id>:<n>, not the host's id, so the real directory comes from the
# generation's runtime drop-in, which overrides this line. This one only
@@ -167,8 +170,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units/carlos-instance-rootfs-probe.service b/internal/host/units/carlos-instance-rootfs-probe.service
index 5f0291152..fad6de6c0 100644
--- a/internal/host/units/carlos-instance-rootfs-probe.service
+++ b/internal/host/units/carlos-instance-rootfs-probe.service
@@ -162,8 +162,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units/carlos-instance-rootfs-tty@.service b/internal/host/units/carlos-instance-rootfs-tty@.service
index ca360a163..202f435a2 100644
--- a/internal/host/units/carlos-instance-rootfs-tty@.service
+++ b/internal/host/units/carlos-instance-rootfs-tty@.service
@@ -26,7 +26,10 @@ RemainAfterExit=yes
TimeoutStartSec=6h5m
# --rootfs before the role, in ExecStart= and ExecStopPost= alike, as in
# carlos-instance-rootfs@.service.
-ExecStart=/opt/carlos/carlos instance-exec --rootfs tty %I
+# --netlink-scope: the trampoline scopes netlink to NETLINK_ROUTE before the
+# tenant starts (#1419). A carlos from before #1419 does not know the flag
+# and exits at once, so this unit's AF_NETLINK never reaches an unscoped tenant.
+ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope tty %I
# The advisory exit record, as for the other templates. Not "+" (codex R3-2).
ExecStopPost=/opt/carlos/carlos instance-exit --rootfs tty %I
User=carlos
@@ -191,8 +194,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units/carlos-instance-rootfs-worker@.service b/internal/host/units/carlos-instance-rootfs-worker@.service
index a003845bb..bb06682e4 100644
--- a/internal/host/units/carlos-instance-rootfs-worker@.service
+++ b/internal/host/units/carlos-instance-rootfs-worker@.service
@@ -28,7 +28,10 @@ Type=simple
# --rootfs before the role, in ExecStart= and ExecStopPost= alike: worker
# is a role the trampoline and instance-exit take only with it (there is
# no binary worker unit).
-ExecStart=/opt/carlos/carlos instance-exec --rootfs worker %I
+# --netlink-scope: the trampoline scopes netlink to NETLINK_ROUTE before the
+# tenant starts (#1419). A carlos from before #1419 does not know the flag
+# and exits at once, so this unit's AF_NETLINK never reaches an unscoped tenant.
+ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope worker %I
# The worker runs in the instance's own data directory, the one the
# instance's database is in (#256 D). %I here is <id>:<worker>, not the
# host's id, so the real directory comes from the worker's runtime
@@ -179,8 +182,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units/carlos-instance-rootfs@.service b/internal/host/units/carlos-instance-rootfs@.service
index a5c768d3f..19605856d 100644
--- a/internal/host/units/carlos-instance-rootfs@.service
+++ b/internal/host/units/carlos-instance-rootfs@.service
@@ -25,7 +25,10 @@ Type=simple
# trampoline takes the rootfs launch shape (root's launch file names the
# command, the tenant's names only the environment; rootfs apps design
# §5.2), and instance-exit takes the rootfs roles only with it.
-ExecStart=/opt/carlos/carlos instance-exec --rootfs run %I
+# --netlink-scope: the trampoline scopes netlink to NETLINK_ROUTE before the
+# tenant starts (#1419). A carlos from before #1419 does not know the flag
+# and exits at once, so this unit's AF_NETLINK never reaches an unscoped tenant.
+ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope run %I
# Runs inside the same namespace, as carlos, after this invocation's
# processes have been signalled: leaves an ADVISORY exit record in the
# instance's own run directory (isolated-exec design §6.5). Not "+": the
@@ -209,8 +212,15 @@ PrivatePIDs=yes
RestrictNamespaces=yes
NoNewPrivileges=yes
CapabilityBoundingSet=
-# Kept, unchanged; a unit-file pin.
-RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX
+# AF_NETLINK is here for getifaddrs (#1419), and only NETLINK_ROUTE of it:
+# instance-exec --rootfs and the rootfs probe install a seccomp filter that
+# answers every other netlink protocol EAFNOSUPPORT (probe netlink-others).
+# Route is read-only here: changing links, addresses or routes takes
+# CAP_NET_ADMIN, and the capability set is empty (probe netlink-readonly).
+# It does let a tenant read and watch the box's links, addresses, routes,
+# neighbours and tc, so the box must never name a network object (an
+# interface, an altname, a tc handle) after a tenant.
+RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK
# Abstract unix sockets live in the network namespace, which instances
# share with the box because they need outbound TCP, and the line above
# cannot tell them from path sockets (#178). The trampoline scopes them
diff --git a/internal/host/units_rootfs_test.go b/internal/host/units_rootfs_test.go
index ddf87f49e..f7275a989 100644
--- a/internal/host/units_rootfs_test.go
+++ b/internal/host/units_rootfs_test.go
@@ -72,12 +72,14 @@ func TestRootfsNamespaceRestatesTheBinaryBlock(t *testing.T) {
"PrivateTmp=yes": "replaced by a tmpfs on /tmp (probe tmp-private)",
"ProtectControlGroups=yes": "replaced by strict (probe cgroup-strict)",
"BindReadOnlyPaths=-/run/systemd/resolve/resolv.conf:/etc/resolv.conf": "replaced by root's per-instance copy outside the block (probe dns)",
+ "RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX": "AF_NETLINK added for getifaddrs (#1419); instance-exec --rootfs and the rootfs probe narrow it to NETLINK_ROUTE with seccomp (probe netlink-scope, netlink-route, netlink-others)",
}
added := map[string]bool{
- "RootImageOptions=ro,nosuid,nodev": true,
- "MountAPIVFS=yes": true,
- "TemporaryFileSystem=/tmp:mode=1777,nosuid,nodev": true,
- "ProtectControlGroups=strict": true,
+ "RootImageOptions=ro,nosuid,nodev": true,
+ "MountAPIVFS=yes": true,
+ "TemporaryFileSystem=/tmp:mode=1777,nosuid,nodev": true,
+ "ProtectControlGroups=strict": true,
+ "RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX AF_NETLINK": true,
}
for d := range bin {
if rfs[d] {
@@ -221,18 +223,18 @@ func TestRootfsTemplatesPerUnitLines(t *testing.T) {
"After=carlos-edge.service data-instances.mount run-carlos-instances.mount run-carlos-logs.mount",
"KillMode=mixed", "TimeoutStopSec=20", "TasksMax=256", "OOMScoreAdjust=500", "OOMPolicy=kill", "User=carlos", "Group=carlos"}
for name, wants := range map[string][]string{
- "carlos-instance-rootfs@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs run %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I",
+ "carlos-instance-rootfs@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope run %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I",
"RootImage=/run/carlos-control/exe/%I/rootfs/run/image",
"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/run/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/run/resolv.conf:/etc/resolv.conf",
"BindPaths=/data/instances/%I /run/carlos/instances/%I", "ReadWritePaths=/data/instances/%I /run/carlos/instances/%I", "WorkingDirectory=/data/instances/%I", "StandardOutput=file:/run/carlos/logs/%I.run.sock",
"Slice=carlos-instances-%i.slice", "Restart=no", "SuccessExitStatus=129 130 141 143"}, common...),
- "carlos-instance-rootfs-gen@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs run %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I", "WorkingDirectory=/data/instances", "SuccessExitStatus=129 130 141 143", "Restart=no"}, common...),
- "carlos-instance-rootfs-worker@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs worker %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs worker %I", "WorkingDirectory=/data/instances", "SuccessExitStatus=129 130 141 143", "Restart=no"}, common...),
+ "carlos-instance-rootfs-gen@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope run %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I", "WorkingDirectory=/data/instances", "SuccessExitStatus=129 130 141 143", "Restart=no"}, common...),
+ "carlos-instance-rootfs-worker@.service": append([]string{"Type=simple", "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope worker %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs worker %I", "WorkingDirectory=/data/instances", "SuccessExitStatus=129 130 141 143", "Restart=no"}, common...),
// The command has exactly the instance's reach (C5): the same
// slice, whose parent carlos-instances.slice carries the only
// box-address fence (#367), the same two directories and the
// cmd pair of root's files.
- "carlos-instance-rootfs-cmd@.service": append([]string{"Type=oneshot", "RemainAfterExit=yes", "TimeoutStartSec=6h5m", "ExecStart=/opt/carlos/carlos instance-exec --rootfs cmd %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I",
+ "carlos-instance-rootfs-cmd@.service": append([]string{"Type=oneshot", "RemainAfterExit=yes", "TimeoutStartSec=6h5m", "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope cmd %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I",
"RootImage=/run/carlos-control/exe/%I/rootfs/cmd/image",
"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/cmd/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/cmd/resolv.conf:/etc/resolv.conf",
"BindPaths=/data/instances/%I /run/carlos/instances/%I", "ReadWritePaths=/data/instances/%I /run/carlos/instances/%I", "Slice=carlos-instances-%i.slice",
@@ -240,7 +242,7 @@ func TestRootfsTemplatesPerUnitLines(t *testing.T) {
// One interactive session (rootfs Plan 6): the rootfs cmd unit's
// reach, stdin from the agent's socket, and the tty set of root's
// files.
- "carlos-instance-rootfs-tty@.service": append([]string{"Type=oneshot", "RemainAfterExit=yes", "TimeoutStartSec=6h5m", "ExecStart=/opt/carlos/carlos instance-exec --rootfs tty %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs tty %I",
+ "carlos-instance-rootfs-tty@.service": append([]string{"Type=oneshot", "RemainAfterExit=yes", "TimeoutStartSec=6h5m", "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope tty %I", "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs tty %I",
"RootImage=/run/carlos-control/exe/%I/rootfs/tty/image",
"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/tty/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/tty/resolv.conf:/etc/resolv.conf",
"BindPaths=/data/instances/%I /run/carlos/instances/%I", "ReadWritePaths=/data/instances/%I /run/carlos/instances/%I", "Slice=carlos-instances-%i.slice",
@@ -300,11 +302,11 @@ func TestRootfsCmdTemplateEqualsRootfsOutsideTheNamedLines(t *testing.T) {
swap := map[string]string{
"Description=carlos rootfs instance %I": "Description=carlos rootfs instance %I (cmd)",
"Type=simple": "Type=oneshot",
- "ExecStart=/opt/carlos/carlos instance-exec --rootfs run %I": "ExecStart=/opt/carlos/carlos instance-exec --rootfs cmd %I",
- "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I": "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I",
- "StandardOutput=file:/run/carlos/logs/%I.run.sock": "StandardOutput=file:/run/carlos/logs/%I.cmd.sock",
- "StandardError=inherit": "StandardError=file:/run/carlos/logs/%I.cmd-err.sock",
- "RootImage=/run/carlos-control/exe/%I/rootfs/run/image": "RootImage=/run/carlos-control/exe/%I/rootfs/cmd/image",
+ "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope run %I": "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope cmd %I",
+ "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs run %I": "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I",
+ "StandardOutput=file:/run/carlos/logs/%I.run.sock": "StandardOutput=file:/run/carlos/logs/%I.cmd.sock",
+ "StandardError=inherit": "StandardError=file:/run/carlos/logs/%I.cmd-err.sock",
+ "RootImage=/run/carlos-control/exe/%I/rootfs/run/image": "RootImage=/run/carlos-control/exe/%I/rootfs/cmd/image",
"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/run/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/run/resolv.conf:/etc/resolv.conf": "BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/cmd/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/cmd/resolv.conf:/etc/resolv.conf",
}
onlyRun := map[string]bool{"Restart=no": true, "SuccessExitStatus=129 130 141 143": true}
@@ -368,12 +370,12 @@ func TestRootfsCmdTemplateEqualsRootfsOutsideTheNamedLines(t *testing.T) {
func TestRootfsTTYTemplateEqualsRootfsCmdOutsideTheNamedLines(t *testing.T) {
t.Parallel()
equalOutsideTheNamedLines(t, "carlos-instance-rootfs-cmd@.service", "carlos-instance-rootfs-tty@.service", map[string][]string{
- "Description=carlos rootfs instance %I (cmd)": {"Description=carlos rootfs instance %I (tty)"},
- "ExecStart=/opt/carlos/carlos instance-exec --rootfs cmd %I": {"ExecStart=/opt/carlos/carlos instance-exec --rootfs tty %I"},
- "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I": {"ExecStopPost=/opt/carlos/carlos instance-exit --rootfs tty %I"},
- "StandardOutput=file:/run/carlos/logs/%I.cmd.sock": {"StandardInput=file:/run/carlos/logs/%I.tty.sock", "StandardOutput=journal"},
- "StandardError=file:/run/carlos/logs/%I.cmd-err.sock": {"StandardError=journal"},
- "RootImage=/run/carlos-control/exe/%I/rootfs/cmd/image": {"RootImage=/run/carlos-control/exe/%I/rootfs/tty/image"},
+ "Description=carlos rootfs instance %I (cmd)": {"Description=carlos rootfs instance %I (tty)"},
+ "ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope cmd %I": {"ExecStart=/opt/carlos/carlos instance-exec --rootfs --netlink-scope tty %I"},
+ "ExecStopPost=/opt/carlos/carlos instance-exit --rootfs cmd %I": {"ExecStopPost=/opt/carlos/carlos instance-exit --rootfs tty %I"},
+ "StandardOutput=file:/run/carlos/logs/%I.cmd.sock": {"StandardInput=file:/run/carlos/logs/%I.tty.sock", "StandardOutput=journal"},
+ "StandardError=file:/run/carlos/logs/%I.cmd-err.sock": {"StandardError=journal"},
+ "RootImage=/run/carlos-control/exe/%I/rootfs/cmd/image": {"RootImage=/run/carlos-control/exe/%I/rootfs/tty/image"},
"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/cmd/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/cmd/resolv.conf:/etc/resolv.conf": {"BindReadOnlyPaths=/run/carlos-control/exe/%I/rootfs/tty/launch.json:/opt/carlos/launch.json /run/carlos-control/exe/%I/rootfs/tty/resolv.conf:/etc/resolv.conf"},
})
for _, d := range directives(readUnit(t, "carlos-instance-rootfs-tty@.service")) {
diff --git a/internal/instanceexec/exec.go b/internal/instanceexec/exec.go
index d08388a9a..6bbb5eeaa 100644
--- a/internal/instanceexec/exec.go
+++ b/internal/instanceexec/exec.go
@@ -50,7 +50,9 @@ func RunExec(args []string) {
log.Fatal(err)
}
if c.rootfs {
- err = execRootfsLaunch(dataDir(), instancectl.RootfsLaunchPath, c.role, c.inst, c.launcher())
+ err = rootfsStart(ScopeNetlinkRoute, func() error {
+ return execRootfsLaunch(dataDir(), instancectl.RootfsLaunchPath, c.role, c.inst, c.launcher())
+ })
} else {
err = execLaunch(dataDir(), c.role, c.inst, c.launcher())
}
@@ -59,6 +61,17 @@ func RunExec(args []string) {
}
}
+// rootfsStart runs scope, then launch: a rootfs tenant starts only with
+// netlink narrowed to NETLINK_ROUTE (#1419), and a scope that cannot be
+// installed refuses the start rather than run the tenant with every
+// netlink protocol the unit's AF_NETLINK would allow.
+func rootfsStart(scope, launch func() error) error {
+ if err := scope(); err != nil {
+ return refused("netlink scope: %v", err)
+ }
+ return launch()
+}
+
// errUsage is a command line of the wrong shape; the usage is printed.
var errUsage = errors.New("usage")
@@ -98,6 +111,11 @@ func parseExecArgs(args []string) (execCommand, error) {
fs.Usage = cliflag.Usage(fs, "usage: carlos instance-exec [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>")
claim := fs.String("claim-reservation", "", "root launch reservation")
rootfs := fs.Bool("rootfs", false, "rootfs launch: root's launch file names the command")
+ // Every rootfs launch is scoped whether or not the flag is given; the
+ // rootfs units pass it so that a carlos from before #1419, which does
+ // not know it, refuses to start instead of running a tenant unscoped
+ // under the units' AF_NETLINK.
+ netlinkScope := fs.Bool("netlink-scope", false, "rootfs launch: scope netlink to NETLINK_ROUTE (always on with --rootfs)")
sandbox := fs.String("sandbox", "", "guest sandbox mode")
_ = fs.Parse(args)
if fs.NArg() != 2 {
@@ -110,6 +128,8 @@ func parseExecArgs(args []string) (execCommand, error) {
return execCommand{}, fmt.Errorf("instance-exec: role %q is not run, seed, sidecar or cmd", fs.Arg(0))
case role == instancectl.RoleWorker && !*rootfs:
return execCommand{}, fmt.Errorf("instance-exec: role %q is not run, seed, sidecar or cmd (worker needs --rootfs)", fs.Arg(0))
+ case *netlinkScope && !*rootfs:
+ return execCommand{}, errors.New("instance-exec: --netlink-scope needs --rootfs")
}
c := execCommand{role: role, inst: fs.Arg(1), rootfs: *rootfs, claim: *claim}
var err error
diff --git a/internal/instanceexec/exec_rootfs_scope_test.go b/internal/instanceexec/exec_rootfs_scope_test.go
new file mode 100644
index 000000000..93da67ed0
--- /dev/null
+++ b/internal/instanceexec/exec_rootfs_scope_test.go
@@ -0,0 +1,111 @@
+package instanceexec
+
+import (
+ "errors"
+ "go/ast"
+ "go/parser"
+ "go/token"
+ "path/filepath"
+ "strings"
+ "testing"
+)
+
+// #1419: a rootfs start narrows netlink before anything of the tenant's
+// runs, and a scope that cannot be installed refuses the start.
+func TestRootfsStartScopesNetlinkFirst(t *testing.T) {
+ var order []string
+ err := rootfsStart(func() error { order = append(order, "scope"); return nil }, func() error { order = append(order, "launch"); return nil })
+ if err != nil || len(order) != 2 || order[0] != "scope" || order[1] != "launch" {
+ t.Fatalf("order %v, err %v", order, err)
+ }
+
+ launched := false
+ err = rootfsStart(func() error { return errors.New("seccomp: EINVAL") }, func() error { launched = true; return nil })
+ if launched {
+ t.Error("the tenant launched without its netlink scope")
+ }
+ if !errors.Is(err, errRootfsLaunchRefused) {
+ t.Errorf("err = %v, want a rootfs launch refusal", err)
+ }
+}
+
+// The rootfs units pass --netlink-scope (#1419 review, Fable P2-1): this
+// carlos takes it with --rootfs only.
+func TestNetlinkScopeFlag(t *testing.T) {
+ if c, err := parseExecArgs([]string{"--rootfs", "--netlink-scope", "run", "shop.example.com:1"}); err != nil || !c.rootfs {
+ t.Errorf("--rootfs --netlink-scope: %+v, %v", c, err)
+ }
+ if _, err := parseExecArgs([]string{"--netlink-scope", "run", "shop.example.com:1"}); err == nil {
+ t.Error("--netlink-scope was taken without --rootfs")
+ }
+}
+
+// Fable P2-1/P2-2: every rootfs launch goes through rootfsStart with
+// ScopeNetlinkRoute as its scope. execRootfsLaunch is called only inside
+// a function literal passed to rootfsStart(ScopeNetlinkRoute, ...), so a
+// refactor that launches a rootfs tenant without the scope fails here.
+func TestEveryRootfsLaunchIsScoped(t *testing.T) {
+ files, err := filepath.Glob("*.go")
+ if err != nil {
+ t.Fatal(err)
+ }
+ calls := 0
+ for _, file := range files {
+ if strings.HasSuffix(file, "_test.go") {
+ continue
+ }
+ f, err := parser.ParseFile(token.NewFileSet(), file, nil, parser.SkipObjectResolution)
+ if err != nil {
+ t.Fatal(err)
+ }
+ var stack []ast.Node
+ ast.Inspect(f, func(n ast.Node) bool {
+ if n == nil {
+ stack = stack[:len(stack)-1]
+ return true
+ }
+ stack = append(stack, n)
+ // Every use of the name, not only direct calls: a value
+ // (launch := execRootfsLaunch) would escape a call-only guard
+ // (Fable R2 P3-b). The declaration's own name is not a use.
+ id, ok := n.(*ast.Ident)
+ if !ok || id.Name != "execRootfsLaunch" {
+ return true
+ }
+ if fd, ok := stack[len(stack)-2].(*ast.FuncDecl); ok && fd.Name == id {
+ return true
+ }
+ calls++
+ call, isCall := stack[len(stack)-2].(*ast.CallExpr)
+ if !isCall || call.Fun != ast.Expr(id) || !insideScopedStart(stack) {
+ t.Errorf("%s uses execRootfsLaunch other than as a call inside rootfsStart(ScopeNetlinkRoute, func ...)", file)
+ }
+ return true
+ })
+ }
+ if calls == 0 {
+ t.Error("found no call of execRootfsLaunch; the guard is looking in the wrong place")
+ }
+}
+
+// insideScopedStart reports whether the innermost function literal on
+// stack is an argument of rootfsStart(ScopeNetlinkRoute, ...).
+func insideScopedStart(stack []ast.Node) bool {
+ for i := len(stack) - 1; i > 0; i-- {
+ lit, ok := stack[i].(*ast.FuncLit)
+ if !ok {
+ continue
+ }
+ call, ok := stack[i-1].(*ast.CallExpr)
+ if !ok {
+ return false
+ }
+ fn, ok := call.Fun.(*ast.Ident)
+ if !ok || fn.Name != "rootfsStart" || len(call.Args) != 2 || call.Args[1] != ast.Expr(lit) {
+ return false
+ }
+ scope, ok := call.Args[0].(*ast.Ident)
+ return ok && scope.Name == "ScopeNetlinkRoute"
+ }
+ return false
+}
diff --git a/internal/instanceexec/families_test.go b/internal/instanceexec/families_test.go
index 08b322026..98a2587c9 100644
--- a/internal/instanceexec/families_test.go
+++ b/internal/instanceexec/families_test.go
@@ -39,6 +39,12 @@ func TestInstanceCodeOpensOnlyTheUnitsAddressFamilies(t *testing.T) {
"golang.org/x/sys/unix": {},
}
allowedAF := map[string]bool{"AF_INET": true, "AF_INET6": true, "AF_UNIX": true, "AF_UNSPEC": true}
+ // The one exception (#1419): the rootfs units also allow AF_NETLINK,
+ // narrowed to NETLINK_ROUTE by the seccomp scope this file installs,
+ // and only the rootfs paths (instance-exec --rootfs after the scope,
+ // the rootfs probe) call into it. TestOnlyRootfsPathsReachNetlink
+ // holds that.
+ netlinkFile := map[string]bool{"AF_NETLINK": true, "NetlinkRIB": true}
var found []string
seen := map[string]bool{}
@@ -90,6 +96,9 @@ func TestInstanceCodeOpensOnlyTheUnitsAddressFamilies(t *testing.T) {
return true
}
af := strings.HasPrefix(sel.Sel.Name, "AF_") && !allowedAF[sel.Sel.Name]
+ if filepath.Base(file) == "netlink_route_linux.go" && netlinkFile[sel.Sel.Name] {
+ return true
+ }
if names[sel.Sel.Name] || af {
found = append(found, strings.TrimPrefix(file, root+string(filepath.Separator))+": "+p+"."+sel.Sel.Name)
}
@@ -105,3 +114,29 @@ func TestInstanceCodeOpensOnlyTheUnitsAddressFamilies(t *testing.T) {
t.Errorf("the walk never reached instancectl: %v", seen)
}
}
+
+// The netlink exception above is safe only while the two functions that
+// open netlink sockets are wired into the rootfs probe and nowhere else: a
+// binary unit still refuses AF_NETLINK, and its probe would fail (#1419).
+func TestOnlyRootfsPathsReachNetlink(t *testing.T) {
+ files, err := filepath.Glob("*.go")
+ if err != nil {
+ t.Fatal(err)
+ }
+ allowed := map[string]bool{"netlink_route_linux.go": true, "netlink_route_other.go": true, "probe_rootfs_linux.go": true}
+ for _, file := range files {
+ if strings.HasSuffix(file, "_test.go") || allowed[file] {
+ continue
+ }
+ f, err := parser.ParseFile(token.NewFileSet(), file, nil, parser.SkipObjectResolution)
+ if err != nil {
+ t.Fatal(err)
+ }
+ ast.Inspect(f, func(n ast.Node) bool {
+ if id, ok := n.(*ast.Ident); ok && (id.Name == "netlinkAddrDump" || id.Name == "netlinkSocketOpen" || id.Name == "netlinkDeleteRefused") {
+ t.Errorf("%s names %s; only the rootfs probe's wiring may", file, id.Name)
+ }
+ return true
+ })
+ }
+}
diff --git a/internal/instanceexec/netlink_route_linux.go b/internal/instanceexec/netlink_route_linux.go
new file mode 100644
index 000000000..f1468be93
--- /dev/null
+++ b/internal/instanceexec/netlink_route_linux.go
@@ -0,0 +1,169 @@
+//go:build linux
+
+package instanceexec
+
+import (
+ "errors"
+ "fmt"
+ "runtime"
+ "syscall"
+ "unsafe"
+
+ "golang.org/x/sys/unix"
+)
+
+// ScopeNetlinkRoute narrows AF_NETLINK, which the rootfs units allow for
+// getifaddrs (#1419), to NETLINK_ROUTE: socket(AF_NETLINK, any type, any
+// other protocol) answers EAFNOSUPPORT, what a unit without AF_NETLINK
+// answers. systemd's RestrictAddressFamilies= cannot name a protocol, and
+// the others are leaks or attack surface even without capabilities
+// (SOCK_DIAG lists every socket in the box's network namespace,
+// KOBJECT_UEVENT streams device events, GENERIC reaches many kernel
+// families). The filter is installed on every thread (TSYNC) and kept
+// across fork and exec, so the tenant and everything it starts carry it.
+// It adds to the unit's filters and loosens nothing.
+func ScopeNetlinkRoute() error {
+ var arch uint32
+ switch runtime.GOARCH {
+ case "amd64":
+ arch = unix.AUDIT_ARCH_X86_64
+ case "arm64":
+ arch = unix.AUDIT_ARCH_AARCH64
+ default:
+ return errors.New("netlink scope: no seccomp architecture for " + runtime.GOARCH)
+ }
+ filter := netlinkRouteFilter(arch, unix.SYS_SOCKET, unix.SYS_SOCKETPAIR)
+ if err := unix.Prctl(unix.PR_SET_NO_NEW_PRIVS, 1, 0, 0, 0); err != nil {
+ return err
+ }
+ program := unix.SockFprog{Len: uint16(len(filter)), Filter: &filter[0]}
+ unsynced, _, errno := unix.Syscall(unix.SYS_SECCOMP, unix.SECCOMP_SET_MODE_FILTER, unix.SECCOMP_FILTER_FLAG_TSYNC, uintptr(unsafe.Pointer(&program)))
+ runtime.KeepAlive(filter)
+ if errno != 0 {
+ return errno
+ }
+ if unsynced != 0 {
+ return errors.New("netlink scope: a thread could not take the filter")
+ }
+ return nil
+}
+
+// netlinkRouteFilter is ScopeNetlinkRoute's program for arch, whose
+// socket(2) and socketpair(2) numbers are sysSocket and sysSocketpair.
+// socketpair(AF_NETLINK, ...) is refused whatever the protocol: netlink
+// never supports it, but the kernel creates (and for an unknown protocol
+// tries to load) both protocol sockets before it says so.
+// Arguments are read as their low 32 bits (offsets 16 and 32 on these
+// little-endian architectures), as the kernel reads the int family and
+// protocol.
+func netlinkRouteFilter(arch, sysSocket, sysSocketpair uint32) []unix.SockFilter {
+ ret := func(k uint32) unix.SockFilter { return unix.SockFilter{Code: unix.BPF_RET | unix.BPF_K, K: k} }
+ allow := ret(unix.SECCOMP_RET_ALLOW)
+ return []unix.SockFilter{
+ /* 0 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 4},
+ /* 1 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jt: 1, K: arch},
+ // A nonnative call is refused, never killed: the unit's
+ // SystemCallArchitectures=native refuses it already, and this
+ // filter must not turn that answer into a kill.
+ /* 2 */ ret(unix.SECCOMP_RET_ERRNO | uint32(unix.ENOSYS)),
+ /* 3 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 0},
+ // x32 calls carry this bit under AUDIT_ARCH_X86_64; refuse them
+ // rather than let a second socket number past the check below.
+ /* 4 */ {Code: unix.BPF_JMP | unix.BPF_JSET | unix.BPF_K, Jf: 1, K: 0x40000000},
+ /* 5 */ ret(unix.SECCOMP_RET_ERRNO | uint32(unix.ENOSYS)),
+ /* 6 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jt: 3, K: sysSocket},
+ /* 7 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jf: 7, K: sysSocketpair},
+ // socketpair: any netlink pair is refused.
+ /* 8 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 16},
+ /* 9 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jt: 4, Jf: 5, K: unix.AF_NETLINK},
+ // socket: a netlink socket only of NETLINK_ROUTE.
+ /* 10 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 16},
+ /* 11 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jf: 3, K: unix.AF_NETLINK},
+ /* 12 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 32},
+ /* 13 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jt: 1, K: unix.NETLINK_ROUTE},
+ /* 14 */ ret(unix.SECCOMP_RET_ERRNO | uint32(unix.EAFNOSUPPORT)),
+ /* 15 */ allow,
+ }
+}
+
+// netlinkAddrDump makes glibc getifaddrs's two requests over
+// NETLINK_ROUTE: an RTM_GETLINK dump, then an RTM_GETADDR dump (glibc
+// getifaddrs_internal). Only the rootfs probe calls it.
+func netlinkAddrDump() error {
+ if _, err := syscall.NetlinkRIB(syscall.RTM_GETLINK, syscall.AF_UNSPEC); err != nil {
+ return fmt.Errorf("RTM_GETLINK dump: %w", err)
+ }
+ if _, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, syscall.AF_UNSPEC); err != nil {
+ return fmt.Errorf("RTM_GETADDR dump: %w", err)
+ }
+ return nil
+}
+
+// netlinkSocketOpen opens and closes one netlink socket of proto. Only
+// the rootfs probe calls it.
+func netlinkSocketOpen(proto int) error {
+ fd, err := unix.Socket(unix.AF_NETLINK, unix.SOCK_RAW|unix.SOCK_CLOEXEC, proto)
+ if err != nil {
+ return err
+ }
+ return unix.Close(fd)
+}
+
+// netlinkDeleteRefused asks the kernel to delete 127.0.0.2 from interface
+// index 0 and answers the kernel's error. No device ever has index 0 (the
+// kernel allocates positive indexes), so the request cannot change the
+// box even when the capability it tests for is present (Astra R2 P1):
+// rtnetlink checks CAP_NET_ADMIN first, so a process without it gets
+// EPERM, and one with it gets ENODEV from inet_rtm_deladdr's device
+// lookup. Only the rootfs probe calls it (netlink-readonly).
+// deleteTargetIndex is the interface netlinkDeleteRefused names: 0, which
+// no device has. TestNetlinkDeleteCannotChangeTheBox pins it.
+const deleteTargetIndex = 0
+
+func netlinkDeleteRefused() error {
+ fd, err := unix.Socket(unix.AF_NETLINK, unix.SOCK_RAW|unix.SOCK_CLOEXEC, unix.NETLINK_ROUTE)
+ if err != nil {
+ return err
+ }
+ defer unix.Close(fd)
+ if err := unix.SetsockoptTimeval(fd, unix.SOL_SOCKET, unix.SO_RCVTIMEO, &unix.Timeval{Sec: 2}); err != nil {
+ return err
+ }
+ // nlmsghdr (16) + ifaddrmsg (8) + IFA_LOCAL rtattr (4 + 4).
+ const total = unix.SizeofNlMsghdr + unix.SizeofIfAddrmsg + 8
+ msg := make([]byte, total)
+ nlh := (*unix.NlMsghdr)(unsafe.Pointer(&msg[0]))
+ nlh.Len = total
+ nlh.Type = unix.RTM_DELADDR
+ nlh.Flags = unix.NLM_F_REQUEST | unix.NLM_F_ACK
+ nlh.Seq = 1
+ ifa := (*unix.IfAddrmsg)(unsafe.Pointer(&msg[unix.SizeofNlMsghdr]))
+ ifa.Family = unix.AF_INET
+ ifa.Prefixlen = 32
+ ifa.Index = deleteTargetIndex
+ attr := msg[unix.SizeofNlMsghdr+unix.SizeofIfAddrmsg:]
+ *(*uint16)(unsafe.Pointer(&attr[0])) = 8
+ *(*uint16)(unsafe.Pointer(&attr[2])) = unix.IFA_LOCAL
+ copy(attr[4:], []byte{127, 0, 0, 2})
+ if err := unix.Sendto(fd, msg, 0, &unix.SockaddrNetlink{Family: unix.AF_NETLINK}); err != nil {
+ return err
+ }
+ buf := make([]byte, 4096)
+ n, _, err := unix.Recvfrom(fd, buf, 0)
+ if err != nil {
+ return err
+ }
+ msgs, err := syscall.ParseNetlinkMessage(buf[:n])
+ if err != nil {
+ return err
+ }
+ for _, m := range msgs {
+ if m.Header.Type == unix.NLMSG_ERROR && len(m.Data) >= 4 {
+ if code := *(*int32)(unsafe.Pointer(&m.Data[0])); code != 0 {
+ return syscall.Errno(-code)
+ }
+ return nil
+ }
+ }
+ return errors.New("netlink: no acknowledgement")
+}
diff --git a/internal/instanceexec/netlink_route_linux_test.go b/internal/instanceexec/netlink_route_linux_test.go
new file mode 100644
index 000000000..f1f24b409
--- /dev/null
+++ b/internal/instanceexec/netlink_route_linux_test.go
@@ -0,0 +1,314 @@
+//go:build linux
+
+package instanceexec
+
+import (
+ "fmt"
+ "os"
+ "os/exec"
+ "runtime"
+ "strings"
+ "syscall"
+ "testing"
+
+ "golang.org/x/sys/unix"
+)
+
+// netlinkHelperEnv makes the test binary a helper: it scopes itself with
+// ScopeNetlinkRoute (stage "scope") or only reports, inheriting the scope
+// across an exec (stage "inherited"), and prints one line per socket.
+const netlinkHelperEnv = "CARLOS_NETLINK_SCOPE_HELPER"
+
+// TestNetlinkScopeHelper is not a test: it is the process the two tests
+// below run (go test's re-exec pattern).
+func TestNetlinkScopeHelper(t *testing.T) {
+ stage := os.Getenv(netlinkHelperEnv)
+ if stage == "" {
+ t.Skip("helper process only")
+ }
+ if stage == "privileged-delete" {
+ // In a new user and network namespace this process holds
+ // CAP_NET_ADMIN over the namespace: the delete must reach the
+ // device lookup and fail there, leaving the addresses alone.
+ // The prerequisite is a working route dump; an environment that
+ // refuses it (a sandbox's own filter) says so and nothing else.
+ before, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, syscall.AF_UNSPEC)
+ if err != nil {
+ fmt.Printf("unavailable=%s\n", strings.ReplaceAll(err.Error(), " ", "_"))
+ os.Exit(0)
+ }
+ derr := netlinkDeleteRefused()
+ after, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, syscall.AF_UNSPEC)
+ if err != nil {
+ fmt.Printf("after-dump=%s\n", strings.ReplaceAll(err.Error(), " ", "_"))
+ os.Exit(4)
+ }
+ fmt.Printf("delete=%v same=%v\n", strings.ReplaceAll(fmt.Sprint(derr), " ", "_"), string(before) == string(after))
+ os.Exit(0)
+ }
+ // A second OS thread, started and parked before the scope, opens a
+ // sock_diag socket after it: TSYNC must have reached it.
+ ready, scoped, done := make(chan struct{}), make(chan struct{}), make(chan string)
+ go func() {
+ runtime.LockOSThread()
+ close(ready)
+ <-scoped
+ fd, err := unix.Socket(unix.AF_NETLINK, unix.SOCK_RAW|unix.SOCK_CLOEXEC, unix.NETLINK_SOCK_DIAG)
+ if err != nil {
+ done <- strings.ReplaceAll(err.(syscall.Errno).Error(), " ", "_")
+ return
+ }
+ unix.Close(fd)
+ done <- "open"
+ }()
+ <-ready
+ if stage == "scope" {
+ if err := ScopeNetlinkRoute(); err != nil {
+ fmt.Println("scope", err)
+ os.Exit(3)
+ }
+ }
+ close(scoped)
+ fmt.Println(netlinkSocketReport() + " thread=" + <-done)
+ if stage == "scope" {
+ // Exec this binary again: the filter must survive execve.
+ cmd := exec.Command(os.Args[0], "-test.run=^TestNetlinkScopeHelper$")
+ cmd.Env = append(os.Environ(), netlinkHelperEnv+"=inherited")
+ out, err := cmd.Output()
+ fmt.Print("inherited ", string(out))
+ if err != nil {
+ fmt.Println("inherited exec", err)
+ }
+ }
+ os.Exit(0)
+}
+
+// netlinkSocketReport opens one socket of each kind and names the result:
+// route, then every other netlink protocol, then inet and unix.
+func netlinkSocketReport() string {
+ var b strings.Builder
+ open := func(family, typ, proto int) string {
+ fd, err := unix.Socket(family, typ|unix.SOCK_CLOEXEC, proto)
+ if err != nil {
+ return strings.ReplaceAll(err.(syscall.Errno).Error(), " ", "_")
+ }
+ unix.Close(fd)
+ return "open"
+ }
+ fmt.Fprintf(&b, "route=%s", open(unix.AF_NETLINK, unix.SOCK_RAW, unix.NETLINK_ROUTE))
+ fmt.Fprintf(&b, " route-dgram=%s", open(unix.AF_NETLINK, unix.SOCK_DGRAM, unix.NETLINK_ROUTE))
+ for p := 1; p < 32; p++ {
+ fmt.Fprintf(&b, " p%d=%s", p, open(unix.AF_NETLINK, unix.SOCK_RAW, p))
+ }
+ // A protocol with high bits set is the kernel's int: still not route.
+ fmt.Fprintf(&b, " phigh=%s", open(unix.AF_NETLINK, unix.SOCK_RAW, 0x10004))
+ pair := func(proto int) string {
+ _, err := unix.Socketpair(unix.AF_NETLINK, unix.SOCK_RAW|unix.SOCK_CLOEXEC, proto)
+ if err != nil {
+ return strings.ReplaceAll(err.(syscall.Errno).Error(), " ", "_")
+ }
+ return "open"
+ }
+ fmt.Fprintf(&b, " pair0=%s pair4=%s", pair(0), pair(4))
+ del := "nil"
+ if err := netlinkDeleteRefused(); err != nil {
+ del = err.Error()
+ }
+ fmt.Fprintf(&b, " delete=%s", strings.ReplaceAll(del, " ", "_"))
+ fmt.Fprintf(&b, " inet=%s unix=%s", open(unix.AF_INET, unix.SOCK_DGRAM, 0), open(unix.AF_UNIX, unix.SOCK_STREAM, 0))
+ return b.String()
+}
+
+func runNetlinkHelper(t *testing.T, stage string) string {
+ t.Helper()
+ cmd := exec.Command(os.Args[0], "-test.run=^TestNetlinkScopeHelper$")
+ cmd.Env = append(os.Environ(), netlinkHelperEnv+"="+stage)
+ out, err := cmd.Output()
+ if err != nil {
+ t.Fatalf("helper %s: %v\n%s", stage, err, out)
+ }
+ return string(out)
+}
+
+// fields parses a helper line into name -> result.
+func netlinkFields(line string) map[string]string {
+ f := map[string]string{}
+ for _, kv := range strings.Fields(line) {
+ k, v, _ := strings.Cut(kv, "=")
+ f[k] = v
+ }
+ return f
+}
+
+// #1419: after ScopeNetlinkRoute a process opens NETLINK_ROUTE sockets
+// and no other netlink protocol (EAFNOSUPPORT, what a unit without
+// AF_NETLINK answers), socketpair is refused the same way, a change over
+// route is refused (EPERM, this test runs without CAP_NET_ADMIN), inet
+// and unix answer as they did before the scope, and an exec'd child keeps
+// all of it.
+func TestScopeNetlinkRouteNarrowsNetlinkToRoute(t *testing.T) {
+ // As root the delete check would reach the kernel's address lookup:
+ // only that expectation is skipped.
+ root := os.Geteuid() == 0
+ before := netlinkFields(strings.TrimSpace(runNetlinkHelper(t, "plain")))
+ if before["route"] != "open" {
+ t.Skipf("this environment refuses NETLINK_ROUTE already: %v", before)
+ }
+ out := runNetlinkHelper(t, "scope")
+ lines := strings.Split(strings.TrimSpace(out), "\n")
+ if len(lines) != 2 || !strings.HasPrefix(lines[1], "inherited ") {
+ t.Fatalf("helper output:\n%s", out)
+ }
+ eaf := strings.ReplaceAll(syscall.EAFNOSUPPORT.Error(), " ", "_")
+ for i, line := range []string{lines[0], strings.TrimPrefix(lines[1], "inherited ")} {
+ f := netlinkFields(line)
+ wants := map[string]string{
+ "route": "open", "route-dgram": "open", "phigh": eaf, "pair4": eaf, "pair0": eaf,
+ "thread": eaf,
+ "delete": strings.ReplaceAll(syscall.EPERM.Error(), " ", "_"),
+ "inet": before["inet"], "unix": before["unix"],
+ }
+ if root {
+ delete(wants, "delete")
+ }
+ for k, want := range wants {
+ if f[k] != want {
+ t.Errorf("line %d: %s=%s, want %s", i, k, f[k], want)
+ }
+ }
+ for p := 1; p < 32; p++ {
+ if k := fmt.Sprintf("p%d", p); f[k] != eaf {
+ t.Errorf("line %d: netlink protocol %d = %s, want %s", i, p, f[k], eaf)
+ }
+ }
+ }
+}
+
+// runFilter is classic BPF as seccomp runs it, for the four instruction
+// kinds netlinkRouteFilter uses, over a little-endian seccomp_data of nr,
+// arch and the full 64-bit args 0 and 2 (low words at 16 and 32, high
+// words at 20 and 36).
+func runFilter(t *testing.T, prog []unix.SockFilter, nr, arch uint32, arg0, arg2 uint64) uint32 {
+ t.Helper()
+ data := map[uint32]uint32{0: nr, 4: arch, 16: uint32(arg0), 20: uint32(arg0 >> 32), 32: uint32(arg2), 36: uint32(arg2 >> 32)}
+ var a uint32
+ for pc := 0; pc < len(prog); pc++ {
+ ins := prog[pc]
+ switch ins.Code {
+ case unix.BPF_LD | unix.BPF_W | unix.BPF_ABS:
+ v, ok := data[ins.K]
+ if !ok {
+ t.Fatalf("load of offset %d", ins.K)
+ }
+ a = v
+ case unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K:
+ if a == ins.K {
+ pc += int(ins.Jt)
+ } else {
+ pc += int(ins.Jf)
+ }
+ case unix.BPF_JMP | unix.BPF_JSET | unix.BPF_K:
+ if a&ins.K != 0 {
+ pc += int(ins.Jt)
+ } else {
+ pc += int(ins.Jf)
+ }
+ case unix.BPF_RET | unix.BPF_K:
+ return ins.K
+ default:
+ t.Fatalf("instruction %d: code %#x", pc, ins.Code)
+ }
+ }
+ t.Fatal("ran off the end")
+ return 0
+}
+
+// The program, run for both architectures' syscall numbers (amd64 socket
+// 41, socketpair 53; arm64 198, 199): only netlink sockets of another
+// protocol are refused, a nonnative or x32 call is ENOSYS, never a kill,
+// and every other call falls through to ALLOW (the unit's own filters
+// still apply).
+func TestNetlinkRouteFilterProgram(t *testing.T) {
+ refuse := unix.SECCOMP_RET_ERRNO | uint32(unix.EAFNOSUPPORT)
+ enosys := unix.SECCOMP_RET_ERRNO | uint32(unix.ENOSYS)
+ allow := uint32(unix.SECCOMP_RET_ALLOW)
+ for _, a := range []struct {
+ name string
+ arch, sock, pair, rd uint32
+ }{
+ {"amd64", unix.AUDIT_ARCH_X86_64, 41, 53, 0},
+ {"arm64", unix.AUDIT_ARCH_AARCH64, 198, 199, 63},
+ } {
+ prog := netlinkRouteFilter(a.arch, a.sock, a.pair)
+ for _, c := range []struct {
+ name string
+ nr, arch uint32
+ a0, a2 uint64
+ want uint32
+ }{
+ {"route socket", a.sock, a.arch, unix.AF_NETLINK, 0, allow},
+ {"sock_diag socket", a.sock, a.arch, unix.AF_NETLINK, 4, refuse},
+ {"uevent socket", a.sock, a.arch, unix.AF_NETLINK, 15, refuse},
+ {"high-bit protocol", a.sock, a.arch, unix.AF_NETLINK, 0x10004, refuse},
+ {"sock_diag socketpair", a.pair, a.arch, unix.AF_NETLINK, 4, refuse},
+ {"route socketpair", a.pair, a.arch, unix.AF_NETLINK, 0, refuse},
+ // The kernel reads int family and protocol, the low words.
+ {"high word on the family", a.sock, a.arch, 1<<32 | unix.AF_NETLINK, 4, refuse},
+ {"high word on sock_diag", a.sock, a.arch, unix.AF_NETLINK, 1<<32 | 4, refuse},
+ {"high word only (the kernel's route)", a.sock, a.arch, unix.AF_NETLINK, 1 << 32, allow},
+ {"high word on inet", a.sock, a.arch, 1<<32 | unix.AF_INET, 4, allow},
+ {"inet socket", a.sock, a.arch, unix.AF_INET, 4, allow},
+ {"unix socketpair", a.pair, a.arch, unix.AF_UNIX, 0, allow},
+ {"another call", a.rd, a.arch, unix.AF_NETLINK, 4, allow},
+ {"nonnative", a.sock, unix.AUDIT_ARCH_I386, unix.AF_NETLINK, 4, enosys},
+ {"x32", a.sock | 0x40000000, a.arch, unix.AF_NETLINK, 4, enosys},
+ } {
+ if got := runFilter(t, prog, c.nr, c.arch, c.a0, c.a2); got != c.want {
+ t.Errorf("%s %s: %#x, want %#x", a.name, c.name, got, c.want)
+ }
+ }
+ for _, s := range prog {
+ if s.Code == unix.BPF_RET|unix.BPF_K && s.K == unix.SECCOMP_RET_KILL_PROCESS {
+ t.Errorf("%s: the filter kills", a.name)
+ }
+ }
+ }
+}
+
+// Astra R2 P1: with CAP_NET_ADMIN (a new user and network namespace, so
+// nothing real is at stake) the read-only witness still changes nothing:
+// it names interface index 0, which no device has, so the kernel answers
+// ENODEV and the namespace's addresses are as they were. ENODEV is the
+// device lookup's answer, made before any address is looked at; naming
+// lo (index 1) instead would answer EADDRNOTAVAIL here, so the test also
+// catches a return to a real interface.
+func TestNetlinkDeleteCannotChangeTheBox(t *testing.T) {
+ if deleteTargetIndex != 0 {
+ t.Fatalf("netlinkDeleteRefused names interface %d; it must name 0, which no device has", deleteTargetIndex)
+ }
+ cmd := exec.Command(os.Args[0], "-test.run=^TestNetlinkScopeHelper$")
+ cmd.Env = append(os.Environ(), netlinkHelperEnv+"=privileged-delete")
+ cmd.SysProcAttr = &syscall.SysProcAttr{
+ Cloneflags: syscall.CLONE_NEWUSER | syscall.CLONE_NEWNET,
+ UidMappings: []syscall.SysProcIDMap{{ContainerID: 0, HostID: os.Getuid(), Size: 1}},
+ GidMappings: []syscall.SysProcIDMap{{ContainerID: 0, HostID: os.Getgid(), Size: 1}},
+ }
+ var stdout, stderr strings.Builder
+ cmd.Stdout, cmd.Stderr = &stdout, &stderr
+ // Only a namespace that cannot be made is a skip; a helper that
+ // started and then failed is a failure (Astra R3 P2).
+ if err := cmd.Start(); err != nil {
+ t.Skipf("no user and network namespace here: %v", err)
+ }
+ if err := cmd.Wait(); err != nil {
+ t.Fatalf("privileged helper: %v\nstdout: %s\nstderr: %s", err, stdout.String(), stderr.String())
+ }
+ got := strings.TrimSpace(stdout.String())
+ if strings.HasPrefix(got, "unavailable=") {
+ t.Skipf("this environment refuses a route dump inside the namespace: %s", got)
+ }
+ enodev := strings.ReplaceAll(syscall.ENODEV.Error(), " ", "_")
+ if got != "delete="+enodev+" same=true" {
+ t.Errorf("privileged delete: %q, want delete=%s same=true", got, enodev)
+ }
+}
diff --git a/internal/instanceexec/netlink_route_other.go b/internal/instanceexec/netlink_route_other.go
new file mode 100644
index 000000000..b17ce885b
--- /dev/null
+++ b/internal/instanceexec/netlink_route_other.go
@@ -0,0 +1,9 @@
+//go:build !linux
+
+package instanceexec
+
+import "errors"
+
+// ScopeNetlinkRoute is linux-only (netlink_route_linux.go): off Linux it
+// refuses, so a rootfs start fails closed.
+func ScopeNetlinkRoute() error { return errors.New("netlink scope: linux only") }
diff --git a/internal/instanceexec/probe_rootfs.go b/internal/instanceexec/probe_rootfs.go
index cc43cc1f6..e1e9f0196 100644
--- a/internal/instanceexec/probe_rootfs.go
+++ b/internal/instanceexec/probe_rootfs.go
@@ -33,6 +33,16 @@ type rootfsProbeEnv struct {
// mkfile creates path exclusively and removes it again: the write
// probe behind root-read-only and tmp-private.
mkfile func(path string) error
+ // The netlink scope a rootfs tenant runs under (#1419): scopeNetlink
+ // installs it on the probe itself, netlinkDump is getifaddrs's
+ // RTM_GETLINK and RTM_GETADDR dumps, netlinkOpen opens one netlink
+ // socket of a protocol.
+ scopeNetlink func() error
+ netlinkDump func() error
+ netlinkOpen func(proto int) error
+ // netlinkWrite asks rtnetlink for a change that cannot alter the box
+ // (deleting an address that does not exist); it must answer EPERM.
+ netlinkWrite func() error
}
// The mounts an image root may have (mountsAllowlisted). Every mount
@@ -73,6 +83,9 @@ const inaccessibleDirRoot = "/systemd/inaccessible/dir"
// cgroup-ro-mount, and root-image with mounts-allowlisted for var-empty.
func runRootfsChecks(e rootfsProbeEnv) instancectl.ProbeReport {
v := &verdicts{}
+ // First, so every line below runs under the scope a tenant gets.
+ scopeErr := e.scopeNetlink()
+ v.pass("netlink-scope", fmt.Sprint(scopeErr), scopeErr == nil)
entries, merr := readMountinfo(e.mountinfo)
// The root is the probe image: a read-only squashfs on a loop device,
@@ -118,9 +131,35 @@ func runRootfsChecks(e rootfsProbeEnv) instancectl.ProbeReport {
v.pass("pts-private", d, ok)
networkAndIPCChecks(e.probeEnv, v.add, v.pass)
+ netlinkChecks(e, v)
return v.report()
}
+// netlinkChecks are #1419's lines: getifaddrs's dump works over
+// NETLINK_ROUTE, a change over it is refused, and every other netlink protocol (1 to 31, the kernel's
+// MAX_LINKS) is refused with EAFNOSUPPORT, the scope's answer. A
+// protocol the kernel itself does not know would answer EPROTONOSUPPORT
+// without the scope, so only EAFNOSUPPORT proves it.
+func netlinkChecks(e rootfsProbeEnv, v *verdicts) {
+ err := e.netlinkDump()
+ v.pass("netlink-route", fmt.Sprint(err), err == nil)
+ var bad []string
+ for p := 1; p < 32; p++ {
+ switch err := e.netlinkOpen(p); {
+ case err == nil:
+ bad = append(bad, fmt.Sprintf("protocol %d: opened", p))
+ case !errors.Is(err, syscall.EAFNOSUPPORT):
+ bad = append(bad, fmt.Sprintf("protocol %d: %v", p, err))
+ }
+ }
+ v.pass("netlink-others", strings.Join(bad, "; "), len(bad) == 0)
+ // Route is read-only only while the process has no CAP_NET_ADMIN
+ // (#1419 review, Fable P3-3): a drop-in that handed it back would show
+ // here.
+ werr := e.netlinkWrite()
+ v.pass("netlink-readonly", fmt.Sprintf("RTM_DELADDR: %v, want %v", werr, syscall.EPERM), errors.Is(werr, syscall.EPERM))
+}
+
// mountEntry is one line of /proc/self/mountinfo: the mount point, the
// root of the mount within its file system, the file system type, the
// source, the per-mount options, and the device (field 3, MAJ:MIN), which
diff --git a/internal/instanceexec/probe_rootfs_linux.go b/internal/instanceexec/probe_rootfs_linux.go
index 1a9b02b69..0f58bc2f4 100644
--- a/internal/instanceexec/probe_rootfs_linux.go
+++ b/internal/instanceexec/probe_rootfs_linux.go
@@ -27,6 +27,10 @@ func productionRootfsProbeEnv() rootfsProbeEnv {
cgroupRoot: cgroupMountpoint,
ownerUID: lstatUID,
mkfile: createThenRemove,
+ scopeNetlink: ScopeNetlinkRoute,
+ netlinkDump: netlinkAddrDump,
+ netlinkOpen: netlinkSocketOpen,
+ netlinkWrite: netlinkDeleteRefused,
}
}
diff --git a/internal/instanceexec/probe_rootfs_other.go b/internal/instanceexec/probe_rootfs_other.go
index b9af0b665..06e6685d9 100644
--- a/internal/instanceexec/probe_rootfs_other.go
+++ b/internal/instanceexec/probe_rootfs_other.go
@@ -18,5 +18,9 @@ func productionRootfsProbeEnv() rootfsProbeEnv {
ownerUID: func(string) (uint32, error) { return 0, errors.ErrUnsupported },
mkfile: unsupported,
selfCgroupFile: "/proc/self/cgroup",
+ scopeNetlink: ScopeNetlinkRoute,
+ netlinkDump: func() error { return errors.ErrUnsupported },
+ netlinkOpen: func(int) error { return errors.ErrUnsupported },
+ netlinkWrite: func() error { return errors.ErrUnsupported },
}
}
diff --git a/internal/instanceexec/probe_rootfs_test.go b/internal/instanceexec/probe_rootfs_test.go
index 864b84c4b..7960b0ba9 100644
--- a/internal/instanceexec/probe_rootfs_test.go
+++ b/internal/instanceexec/probe_rootfs_test.go
@@ -5,6 +5,7 @@ package instanceexec
import (
"encoding/json"
"errors"
+ "fmt"
"os"
"os/exec"
"path/filepath"
@@ -111,6 +112,17 @@ func goodRootfsEnv(t *testing.T) rootfsProbeEnv {
selfCgroupFile: selfCgroup,
cgroupRoot: cg,
ownerUID: func(string) (uint32, error) { return 0, nil },
+ // Scoped to NETLINK_ROUTE (#1419): route opens and dumps, every
+ // other protocol is the filter's EAFNOSUPPORT.
+ scopeNetlink: func() error { return nil },
+ netlinkDump: func() error { return nil },
+ netlinkWrite: func() error { return syscall.EPERM },
+ netlinkOpen: func(proto int) error {
+ if proto == 0 {
+ return nil
+ }
+ return syscall.EAFNOSUPPORT
+ },
// The image is read-only everywhere but the unit's own /tmp.
mkfile: func(path string) error {
if filepath.Dir(path) != tmp {
@@ -194,7 +206,8 @@ func TestRootfsProbePassesInsideAnImageRoot(t *testing.T) {
t.Fatalf("not ready: %+v", r.Lines)
}
for _, c := range []string{"root-image", "mounts-allowlisted", "data-tree", "run-tree", "opt-own-image", "launch-root-owned", "root-read-only", "tmp-private", "etc-carlos", "control-unreachable", "pid1", "shm-private", "symlink-eloop", "nosymfollow", "imds-v4", "imds-tcp", "cgroup-strict", "pts-private", "dns", "loopback-v4", "private-v4", "box-addr", "mdwe", "syscall-filter",
- "imds-v6", "resolver-ports", "loopback-v6", "private-v6", "ipc-private", "abstract-unix", "cpu-limits", "io-weight"} {
+ "imds-v6", "resolver-ports", "loopback-v6", "private-v6", "ipc-private", "abstract-unix", "cpu-limits", "io-weight",
+ "netlink-scope", "netlink-route", "netlink-others", "netlink-readonly"} {
if v := verdict(r, c); v != "ok" {
t.Errorf("%s = %s: %s", c, v, detail(r, c))
}
@@ -695,3 +708,50 @@ func TestRootfsOwnCgroup(t *testing.T) {
t.Error("a missing file: no error")
}
}
+
+// #1419: the rootfs probe scopes itself the way instance-exec scopes a
+// tenant, then proves route works and every other netlink protocol is
+// refused by the scope (EAFNOSUPPORT), not merely unknown to the kernel.
+func TestRootfsProbeNetlinkLines(t *testing.T) {
+ cases := []struct {
+ name string
+ edit func(*rootfsProbeEnv)
+ check string
+ want string
+ }{
+ {"scope not installed", func(e *rootfsProbeEnv) { e.scopeNetlink = func() error { return errors.New("seccomp: EINVAL") } }, "netlink-scope", "seccomp: EINVAL"},
+ {"route dump fails", func(e *rootfsProbeEnv) {
+ e.netlinkDump = func() error { return fmt.Errorf("RTM_GETLINK dump: %w", syscall.EAFNOSUPPORT) }
+ }, "netlink-route", "RTM_GETLINK dump: address family not supported"},
+ {"sock_diag opens", func(e *rootfsProbeEnv) {
+ e.netlinkOpen = func(p int) error {
+ if p == 0 || p == unix.NETLINK_SOCK_DIAG {
+ return nil
+ }
+ return syscall.EAFNOSUPPORT
+ }
+ }, "netlink-others", "protocol 4: opened"},
+ {"refused by the kernel, not the scope", func(e *rootfsProbeEnv) {
+ e.netlinkOpen = func(p int) error {
+ if p == 0 {
+ return nil
+ }
+ if p == 30 {
+ return syscall.EPROTONOSUPPORT
+ }
+ return syscall.EAFNOSUPPORT
+ }
+ }, "netlink-others", "protocol 30: protocol not supported"},
+ {"a change is not refused", func(e *rootfsProbeEnv) { e.netlinkWrite = func() error { return syscall.EADDRNOTAVAIL } }, "netlink-readonly", "cannot assign requested address"},
+ }
+ for _, c := range cases {
+ t.Run(c.name, func(t *testing.T) {
+ e := goodRootfsEnv(t)
+ c.edit(&e)
+ r := runRootfsChecks(e)
+ if r.Ready || verdict(r, c.check) != "fail" || !strings.Contains(detail(r, c.check), c.want) {
+ t.Errorf("ready=%v %s=%s %q, want a fail naming %q", r.Ready, c.check, verdict(r, c.check), detail(r, c.check), c.want)
+ }
+ })
+ }
+}
diff --git a/internal/provision/testdata/plan14-root-reads-chain.tsv b/internal/provision/testdata/plan14-root-reads-chain.tsv
index 43c59caa8..8420ecc0d 100644
--- a/internal/provision/testdata/plan14-root-reads-chain.tsv
+++ b/internal/provision/testdata/plan14-root-reads-chain.tsv
@@ -294,3 +294,4 @@ plan14-root-reads-release-copy-across-consoles.tsv 892cf87db700600490e3ec9e944f9
plan14-root-reads-rootfs-etc-hosts-1349.tsv 892cf87db700600490e3ec9e944f9dbe7151e43bc5471090634f1735bcb9a7bd
plan14-root-reads-managed-fleets-2b2.tsv 4bb3547d064b71134612e74b3b8269e16356d2832a8e579ace150349e55c6a27
plan14-root-reads-store-write-credential.tsv 8b8e269938a575bfaeb8f0c9a5be508b4b22a10b7b5bd19d74fa511e5f15a302
+plan14-root-reads-rootfs-netlink-route-1419.tsv 0d02e63b6a67aab196e13324393148ab8faccbd4331af3eadb1ab52ff5b42bb1
diff --git a/internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv b/internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv
new file mode 100644
index 000000000..921ba57c4
--- /dev/null
+++ b/internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv
@@ -0,0 +1,19 @@
+# Census overlay rootfs-netlink-route-1419, written by census-propose (#369). census-ruling-rootfs-netlink-route-1419, approved on #280 before the merge; the approval card is docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md.
+# 6 body, 0 sites, 2 envelope: each changed unit re-frozen at its existing disposition with its claim appended.
+# 1 new dispositions: 0 reads re-frozen at their disposition with the claim, 1 new units frozen accepted-legacy, 0 quiet units retired while they read nothing, 0 other.
+@legacy b7f53cc6aa019c1e3edec3c5c23d026475d21e0c9f4cb2b1068e955d06b6db74 internal/host/units/carlos-instance-rootfs-cmd@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-cmd@.service, accepted at census-ruling-carlos-run): new (rootfs Plan 2 Task 4): the rootfs cmd unit (oneshot, TimeoutStartSec=6h5m, the cmd log sockets), binding /run/carlos-control/exe/%I/rootfs/cmd/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 6a400c1ac2cb62e923593fb509ffd2b6f9bae4a6ff4436a80811b2971167f2e4
+@legacy 34550ec7c821dfbb93eae25d91f247326f47d2b1925cecb7603d2073ab1f8b7f internal/host/units/carlos-instance-rootfs-gen@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs generation's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (RootfsGenDropIn) supplies, so the template alone mounts and runs nothing. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 084918373f50eb37c8ad323cbff87c9a5d327c0d713c4bbc09ba2701c8b12aba
+@legacy 1d15a70ee71ece7d791507b11ca92a6c3b1e216138372160f2c232bf5f6381af internal/host/units/carlos-instance-rootfs-probe.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe's unit (embedded in the carlos binary, installed by root's unit install, applied by PID 1 as root; its process, carlos instance-probe --rootfs, runs as user carlos);basis=root-input (J4, as carlos-instance-probe.service): new (rootfs Plan 2 Task 7): a oneshot on carlos-instances.slice with the same restated block, RootImage= the probe image root builds itself (BuildProbeImage, under /run/carlos-control/probe), the probe's own _probe directories, root's launch.json, resolv.conf copy and box-addrs list read-only from /run/carlos-control/exe/_probe/rootfs/run/, and StandardOutput=truncate:/run/carlos-control/rootfs-probe.out, which PID 1 writes and root reads (runRootfsProbe); no tenant image, file or name reaches it;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, inside the rootfs block; plus one line outside it, Environment=CARLOS_PROBE_SYSCALL_FILTER=1, a constant the unit sets for its own process (the probe, as carlos); it names no path;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 d16141b1ad33781e33ad61384c14f6b7764daa222dd27c4bfb06d1a45d3c0425
+@legacy 126c796b12a3ec3078ae0ce7441aa458ed30c3c7ad33fe960b360af6e96f9090 internal/host/units/carlos-instance-rootfs-tty@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5, new: the rootfs tty template, carlos-instance-rootfs-cmd@.service outside named lines held by TestRootfsTTYTemplateEqualsRootfsCmdOutsideTheNamedLines: Description (tty), ExecStart/ExecStopPost instance-exec/instance-exit --rootfs tty %I, StandardInput=file:/run/carlos/logs/%I.tty.sock with StandardOutput/StandardError=journal, and RootImage plus the two BindReadOnlyPaths sources under /run/carlos-control/exe/%I/rootfs/tty/ (root-only exe layout) instead of rootfs/cmd/. The rootfs namespace block byte for byte (TestRootfsTemplatesShareOneNamespace), runs as carlos, binds only the instance own and root paths (TestRootfsTemplatesBindOnlyTheInstancesOwnAndRoots). Task 6: POST /tty runtime=rootfs (startRootfsCmd with RoleTTY) starts it through Plan 2's rootfs one-shot path (preflight, validateStagedImage, ensureRootfsExe under rootfs/tty/, jit drop-in and owed reload, post-start MemoryDenyWriteExecute check); its files go only through removeRootfsUnitFiles (stopRootfs and cleanCmdExe with RoleTTY, the sweep);rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 157482e343556817fd4a4d1b571d4bd5b3fce1d55c9610f24a4ef4a43dd44a25
+@legacy c9069c49657d2a7bc666aed876e10b34ebff592f3bc098e6db291620826f5516 internal/host/units/carlos-instance-rootfs-worker@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs worker's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (WorkerDropIn) supplies. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 f6484843ed12db291646fcce9d935b5cdc0be8cc00160c3e2d58ad4b4dfd8c2e
+@legacy e44594c8b6b05bf6be771d2874db8acd79a8f39ae67375da2af7697b5a316582 internal/host/units/carlos-instance-rootfs@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance@.service): new (rootfs Plan 2 Task 4): the run unit of a rootfs instance (ExecStart= the trampoline with --rootfs run, ExecStopPost= instance-exit --rootfs run), Slice=carlos-instances-%i.slice, binding /run/carlos-control/exe/%I/rootfs/run/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 4459dcc0c3b3a7fc1b75194769f9ce46ffa598d844a1547b487704f76620daf9
+@legacy 39724b3733fab1aa435b945da65a694873fa1c908a14038cf137d4eccfe595cd internal/instanceexec/netlink_route_linux.go ScopeNetlinkRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-netlink-route-1419;basis=new (#1419): installs a seccomp filter on its own process (carlos, inside a rootfs unit, every thread via TSYNC) answering socket(AF_NETLINK, any type, protocol other than NETLINK_ROUTE) with EAFNOSUPPORT; nonnative and x32 calls ENOSYS. Its one read is the seccomp syscall; it opens no path and takes no tenant input; it only narrows what the unit allows. Not run by root. Round-1 fix: socketpair(AF_NETLINK, ...) is refused too file:Syscall@527 2a49962af9cb77dc3ef4e34514f951ae03d001c1466cfae3a749eb4e1b6d4ebc
+internal/host/units/carlos-instance-rootfs-cmd@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-cmd@.service, accepted at census-ruling-carlos-run): new (rootfs Plan 2 Task 4): the rootfs cmd unit (oneshot, TimeoutStartSec=6h5m, the cmd log sockets), binding /run/carlos-control/exe/%I/rootfs/cmd/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 6a400c1ac2cb62e923593fb509ffd2b6f9bae4a6ff4436a80811b2971167f2e4
+internal/host/units/carlos-instance-rootfs-gen@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs generation's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (RootfsGenDropIn) supplies, so the template alone mounts and runs nothing. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 084918373f50eb37c8ad323cbff87c9a5d327c0d713c4bbc09ba2701c8b12aba
+internal/host/units/carlos-instance-rootfs-probe.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=the rootfs probe's unit (embedded in the carlos binary, installed by root's unit install, applied by PID 1 as root; its process, carlos instance-probe --rootfs, runs as user carlos);basis=root-input (J4, as carlos-instance-probe.service): new (rootfs Plan 2 Task 7): a oneshot on carlos-instances.slice with the same restated block, RootImage= the probe image root builds itself (BuildProbeImage, under /run/carlos-control/probe), the probe's own _probe directories, root's launch.json, resolv.conf copy and box-addrs list read-only from /run/carlos-control/exe/_probe/rootfs/run/, and StandardOutput=truncate:/run/carlos-control/rootfs-probe.out, which PID 1 writes and root reads (runRootfsProbe); no tenant image, file or name reaches it;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, inside the rootfs block; plus one line outside it, Environment=CARLOS_PROBE_SYSCALL_FILTER=1, a constant the unit sets for its own process (the probe, as carlos); it names no path;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 d16141b1ad33781e33ad61384c14f6b7764daa222dd27c4bfb06d1a45d3c0425
+internal/host/units/carlos-instance-rootfs-tty@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-6;basis=rootfs Plan 6 Task 5, new: the rootfs tty template, carlos-instance-rootfs-cmd@.service outside named lines held by TestRootfsTTYTemplateEqualsRootfsCmdOutsideTheNamedLines: Description (tty), ExecStart/ExecStopPost instance-exec/instance-exit --rootfs tty %I, StandardInput=file:/run/carlos/logs/%I.tty.sock with StandardOutput/StandardError=journal, and RootImage plus the two BindReadOnlyPaths sources under /run/carlos-control/exe/%I/rootfs/tty/ (root-only exe layout) instead of rootfs/cmd/. The rootfs namespace block byte for byte (TestRootfsTemplatesShareOneNamespace), runs as carlos, binds only the instance own and root paths (TestRootfsTemplatesBindOnlyTheInstancesOwnAndRoots). Task 6: POST /tty runtime=rootfs (startRootfsCmd with RoleTTY) starts it through Plan 2's rootfs one-shot path (preflight, validateStagedImage, ensureRootfsExe under rootfs/tty/, jit drop-in and owed reload, post-start MemoryDenyWriteExecute check); its files go only through removeRootfsUnitFiles (stopRootfs and cleanCmdExe with RoleTTY, the sweep);rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 157482e343556817fd4a4d1b571d4bd5b3fce1d55c9610f24a4ef4a43dd44a25
+internal/host/units/carlos-instance-rootfs-worker@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance-gen@.service): new (rootfs Plan 2 Task 4): a rootfs worker's template, the run template without Slice=, StandardOutput=, the instance's binds and RootImage=, which only root's per-start drop-in (WorkerDropIn) supplies. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImageOptions=ro,nosuid,nodev, with no RootImage= of its own (root's per-start drop-in names the image); what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 f6484843ed12db291646fcce9d935b5cdc0be8cc00160c3e2d58ad4b4dfd8c2e
+internal/host/units/carlos-instance-rootfs@.service external legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-apps-2;identity=a rootfs unit template (embedded in the carlos binary, installed under /etc/systemd/system by root's unit install as the other templates are, applied by PID 1 as root; its process runs as user carlos);basis=root-input (J4, as carlos-instance@.service): new (rootfs Plan 2 Task 4): the run unit of a rootfs instance (ExecStart= the trampoline with --rootfs run, ExecStopPost= instance-exit --rootfs run), Slice=carlos-instances-%i.slice, binding /run/carlos-control/exe/%I/rootfs/run/. The template carries the binary template's hardening block restated for an image root (ProtectSystem=strict, the /data, /run/carlos and /opt/carlos tmpfs mounts read-only, PrivateDevices=, PrivateIPC=, ProtectControlGroups=strict, PrivatePIDs=, RestrictNamespaces=, NoNewPrivileges=, an empty CapabilityBoundingSet=, the IPAddressDeny= list, MemoryDenyWriteExecute=yes) plus RootImage= with RootImageOptions=ro,nosuid,nodev; what PID 1 mounts for it: the image, a link root's ensureRootfsExe made under /run/carlos-control/exe (root's, never in any instance's namespace) to the image validateStagedImage checked; root's launch.json and resolv.conf copy from the same root-only directory, read-only; the platform binary, read-only; the instance's own two directories. Provenance: the RootImage= path is fixed and root-controlled (a link root made to the image validateStagedImage checked), but the image's contents are tenant-built: PID 1 and the kernel mount a tenant-produced squashfs (read-only, nosuid, nodev) as the unit's root, after root has checked its bytes against root's own staged manifest; that mount is the new authority this template carries. The tenant also writes its own two directories; it names no path PID 1 or root opens;rev3=census-ruling-instance-syscall-filter;basis=the tenant syscall filter (#527 Q5): three [Service] lines after SystemCallArchitectures=native (SystemCallFilter=@system-service; SystemCallFilter=~@keyring io_uring_setup io_uring_enter io_uring_register userfaultfd; SystemCallErrorNumber=ENOSYS), applied by PID 1 as a seccomp filter on the unit's own process as carlos; no bind source, Exec line, user, mount or path read by root added, with its comment, inside the restated rootfs block (byte-identical across the rootfs units);rev3=census-ruling-w6-ingress-drain;basis=adds Before=carlos-edge-drain.service (with a comment). Ordering only; no read added.;rev3=census-ruling-rootfs-netlink-route-1419;basis=the restated rootfs block's RestrictAddressFamilies= gains AF_NETLINK (#1419), with a comment, byte-identical across the six rootfs units; applied by PID 1 to the unit's own process as carlos (empty CapabilityBoundingSet=, NoNewPrivileges=), narrowed to NETLINK_ROUTE by instance-exec --rootfs and the rootfs probe's seccomp scope. No bind source, Exec line, user, mount or path read by root added. Round-1 fix: the five tenant units' ExecStart= add --netlink-scope, a constant flag instance-exec accepts with --rootfs (a pre-#1419 binary exits on it); the block comment says what route lets a tenant read file:external@0 4459dcc0c3b3a7fc1b75194769f9ce46ffa598d844a1547b487704f76620daf9
+internal/instanceexec/netlink_route_linux.go ScopeNetlinkRoute legacy accepted-legacy accepted-legacy;rev3=census-ruling-rootfs-netlink-route-1419;basis=new (#1419): installs a seccomp filter on its own process (carlos, inside a rootfs unit, every thread via TSYNC) answering socket(AF_NETLINK, any type, protocol other than NETLINK_ROUTE) with EAFNOSUPPORT; nonnative and x32 calls ENOSYS. Its one read is the seccomp syscall; it opens no path and takes no tenant input; it only narrows what the unit allows. Not run by root. Round-1 fix: socketpair(AF_NETLINK, ...) is refused too file:Syscall@527 2a49962af9cb77dc3ef4e34514f951ae03d001c1466cfae3a749eb4e1b6d4ebc
+@coverage internal/host/units 8e2d527d528d57f1a1970c6789d6f443dc2efcba64b8a243e10f72d02bae5c00
+@coverage internal/instanceexec d9b267b002ec3a8f20a06ec8123d76bb6a7c8ae5316df663456f1b8cea1625c7
diff --git a/testdata/clireg-golden.jsonl b/testdata/clireg-golden.jsonl
index 9631203c5..c8c060fa7 100644
--- a/testdata/clireg-golden.jsonl
+++ b/testdata/clireg-golden.jsonl
@@ -422,8 +422,8 @@
{"case":"help | -h","argv":["help","-h"],"exit":0,"stdout":"usage: carlos <command> [flags]\n\nOne binary, three roles. \"carlos <command> -h\" prints a command's own\nflags; --app, the flag on nearly every app verb, shortens to -a.\n\nYour apps — ship and run software on a CARLOS deployment\n auth log in, see who this terminal is, log out\n config edit .carlos/config: \"config destinations\" lists, adds,\n changes and removes the named places -d deploys to\n apps create | place | delete | restore an app name — --place\n fleet/<f> claims and places in one step, and \"apps place\"\n repoints an app's routes and instances onto a customer\n fleet or back to \"\"\n deploy put a build live: ship it, promote it and wait until the\n URL serves it. Use this unless you need the steps apart\n canary the same, onto a host and channel of this branch's own, so\n nothing the app already serves changes: deploy | ls | rm\n ship upload a release without putting it live; --label and\n --notes name it, and --version is optional once a version\n target is set\n promote move a shipped version onto one of the app's own channels —\n the channel is optional when the app has only one\n (\"carlos channels\" lists them; \"carlos pipeline\" orders them)\n devbox publish a dev server or a folder as a link on this devbox\n restart cycle an app's instances — no new version, no config change;\n --host or --environment narrows it, --dry-run names the set\n db read a copy of an instance's database, restored from its\n replica: pull (save it) | query (one read-only query)\n run run one of your app's commands against one instance, as that instance\n console open the console process your app's manifest declares, on one instance, in a terminal session\n schedule recurring or one-shot work per app: ls | set | rm | run\n store object storage: create | status | apply | approvals | approve | decline | grant | rotate\n relay the platform STUN/TURN relay: serve (what the unit runs)\n and keygen (mint a region master)\n email tenant email sending: enable | domains add | status | test |\n credentials create/list/revoke | rotate | pause | resume\n rollback point a channel back at an earlier version\n channels show what each of an app's channels is serving\n pipeline show or shape an app's release channels\n releases every version shipped, newest first, with labels and tags\n version target the semver ship counts iterations under: print it, or set\n it — \"carlos version target --app <a> 0.5.0\"\n env plain per-app config vars: set | unset | list\n secrets sealed per-app secrets: set | unset | list | genkey\n instances an app's instances: enable | create | list | delete |\n set-upstreams | set-channel | set-assets | set-pages — set-channel is\n the only door onto which channel a route follows\n sidecars a process nothing dials, one per enrolled member: enable |\n create | ls | wake | rm | logs\n steering opt an instance into DNS latency steering, or back off —\n --app <a> --host <h> latency|off (shared pool only, v1)\n routes an app's routes and what each is bound to: upstream,\n channel, config environment, status\n domains a customer's own hostname attached to an app's route:\n attach | detach | list\n features an app's own feature flags, stored and served by the\n platform, never interpreted: set | list\n assets the copies servers keep of an app's asset files: purge | status\n gate a shared password in front of an app's hostnames\n ratelimit per-client limits on an app's instances\n logs an app's merged log timeline: its own output plus platform\n events (wakes, restarts, failures); -f follows live\n errors error groups for an app: log lines at the set level plus\n 500s the edge saw\n availability requests an app's instances could not answer (502/503/504),\n grouped by cause, plus failed wakes and exits\n analytics an app's page views and visitors from a terminal, counted at\n the edge as it serves your app\n protection show or set whether protection only records on this app\n geo what the platform's GeoIP database says about an address\n explain what a reference code from a page the edge answered says\n ledger open ledgers: append | head | list | publish | blob | verify\n vet check a release against the platform contract\n update update this carlos binary to the latest release (or name\n the brew/apt command when a package manager owns it);\n -y skips the prompt, terminal still required\n skills the platform's published agent skills: list them, or print one —\n \"carlos skills getting-started\" pipes the recipe to an agent\n\nYour deployment — stand up and administer boxes, routes and accounts\n bootstrap prepare a host: units, dirs, user\n accounts the tenancy primitive: create | list | migrate\n billing billing problems, house accounts: problems | close | house\n fleets account-owned groups of remote boxes that dial this\n console: create | add-box | rotate-token | tag-box |\n detach-box | ls — box tokens print exactly once, at mint\n or rotate, and a compromised box needs detach-box, not\n rotate-token\n link publish this deployment's apps through a Carloku account:\n create | status | publish | unpublish | rotate | remove\n links the deployments linked to an account: ls\n services credentials a SERVER holds, not a person: create | ls |\n rotate | revoke, owner-only and closed to service\n credentials themselves — secrets print exactly once, and\n a compromised one needs revoke, not rotate\n platform customer accounts a platform runs: customers | credentials\n add route a hostname on this box to an app\n remove drop one of this box's routes\n route repoint a route's channel or config environment, grant or\n revoke a capability, hibernate it, change its backing\n instances with no sub-verb: list THIS box's registry routes\n release-keygen mint the root signing key, or a scoped signing key\n proof dev proofs a box requires before adopting: keygen | get | put\n economics bill: record the month's AWS bill; backhaul: what region\n edges cost us this period\n status --live: what every box last reported; --dry-run: leak check\n move move an instance to another region: status | cut | abort |\n resolve --retry (operators; off unless the console enables it)\n\nOn the host — what systemd runs; rarely typed by hand\n edge the mesh front door (router)\n agent edge + activator + release adoption for this host\n adopt one release-adoption pass (the hourly timer's verb)\n ops box operations: litestream | restore-verify\n system platform self-update: update | status | rollback (apply is the\n root oneshot); antivirus: deployment-wide object scanning\n version print the build id\n","stderr":""}
{"case":"instance-control | --zz-unknown-flag","argv":["instance-control","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos instance-control (socket-activated by carlos-instance-control.socket)\n"}
{"case":"instance-control | -h","argv":["instance-control","-h"],"exit":0,"stdout":"","stderr":"usage: carlos instance-control (socket-activated by carlos-instance-control.socket)\n"}
-{"case":"instance-exec | --zz-unknown-flag","argv":["instance-exec","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos instance-exec [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --claim-reservation <string> root launch reservation\n --rootfs rootfs launch: root's launch file names the command\n --sandbox <string> guest sandbox mode\n"}
-{"case":"instance-exec | -h","argv":["instance-exec","-h"],"exit":0,"stdout":"","stderr":"usage: carlos instance-exec [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --claim-reservation <string> root launch reservation\n --rootfs rootfs launch: root's launch file names the command\n --sandbox <string> guest sandbox mode\n"}
+{"case":"instance-exec | --zz-unknown-flag","argv":["instance-exec","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos instance-exec [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --claim-reservation <string> root launch reservation\n --netlink-scope rootfs launch: scope netlink to NETLINK_ROUTE (always on with --rootfs)\n --rootfs rootfs launch: root's launch file names the command\n --sandbox <string> guest sandbox mode\n"}
+{"case":"instance-exec | -h","argv":["instance-exec","-h"],"exit":0,"stdout":"","stderr":"usage: carlos instance-exec [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --claim-reservation <string> root launch reservation\n --netlink-scope rootfs launch: scope netlink to NETLINK_ROUTE (always on with --rootfs)\n --rootfs rootfs launch: root's launch file names the command\n --sandbox <string> guest sandbox mode\n"}
{"case":"instance-exit | --zz-unknown-flag","argv":["instance-exit","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos instance-exit [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --rootfs the unit is a rootfs template\n --run-dir <string> run directory holding instances/<id> (default: /run/carlos)\n --sandbox <string> guest sandbox mode\n"}
{"case":"instance-exit | -h","argv":["instance-exit","-h"],"exit":0,"stdout":"","stderr":"usage: carlos instance-exit [--rootfs] <run|seed|sidecar|cmd|worker|tty> <instance-id>\nflags:\n --rootfs the unit is a rootfs template\n --run-dir <string> run directory holding instances/<id> (default: /run/carlos)\n --sandbox <string> guest sandbox mode\n"}
{"case":"instance-probe | --zz-unknown-flag","argv":["instance-probe","--zz-unknown-flag"],"exit":2,"stdout":"","stderr":"flag provided but not defined: -zz-unknown-flag\nusage: carlos instance-probe [--rootfs]\nflags:\n --rootfs the rootfs probe's checks, from inside the probe image (carlos-instance-rootfs-probe.service)\n --sandbox <string> guest sandbox mode\n"}