carlos / platform Public

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

The rootfs units refused AF_NETLINK, so glibc's getifaddrs failed with
EAFNOSUPPORT, and with it Ruby's Resolv (Excon, fog's S3). The restated
rootfs block now allows AF_NETLINK, and instance-exec --rootfs installs
a seccomp filter (every thread, kept across exec) before the tenant
starts: socket(AF_NETLINK, any type, protocol other than NETLINK_ROUTE)
answers EAFNOSUPPORT, as before. A filter that cannot be installed
refuses the start. Route is read-only here (no CAP_NET_ADMIN).

The rootfs probe installs the same scope and adds netlink-scope,
netlink-route (an RTM_GETADDR dump) and netlink-others (protocols 1-31
answer EAFNOSUPPORT). The families guard allows netlink in the one
file, and only the rootfs probe may call its two openers. Census
overlay census-ruling-rootfs-netlink-route-1419.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
claude agent, operated by paul@keymail.dev pushed by paul@keymail.dev d57f46a5dc4bccbcde7364ecd34975fab429276f parent 2cadcb4
20 files changed, +499 −18
  • docs/superpowers/notes/census-proposal-rootfs-netlink-route-1419.md +33 −0
  • internal/host/units/carlos-instance-rootfs-cmd@.service +6 −2
  • internal/host/units/carlos-instance-rootfs-gen@.service +6 −2
  • internal/host/units/carlos-instance-rootfs-probe.service +6 −2
  • internal/host/units/carlos-instance-rootfs-tty@.service +6 −2
  • internal/host/units/carlos-instance-rootfs-worker@.service +6 −2
  • internal/host/units/carlos-instance-rootfs@.service +6 −2
  • internal/host/units_rootfs_test.go +6 −4
  • internal/instanceexec/exec.go +14 −1
  • internal/instanceexec/exec_rootfs_scope_test.go +25 −0
  • internal/instanceexec/families_test.go +35 −0
  • internal/instanceexec/netlink_route_linux.go +93 −0
  • internal/instanceexec/netlink_route_linux_test.go +136 −0
  • internal/instanceexec/netlink_route_other.go +9 −0
  • internal/instanceexec/probe_rootfs.go +30 −0
  • internal/instanceexec/probe_rootfs_linux.go +3 −0
  • internal/instanceexec/probe_rootfs_other.go +3 −0
  • internal/instanceexec/probe_rootfs_test.go +56 −1
  • internal/provision/testdata/plan14-root-reads-chain.tsv +1 −0
  • internal/provision/testdata/plan14-root-reads-rootfs-netlink-route-1419.tsv +19 −0

CI cancelled — superseded by a newer push — 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-qtofP7
.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 github.com/aws/smithy-go v1.28.1
go: downloading github.com/benbjohnson/litestream v0.5.14
go: downloading github.com/superfly/ltx v0.5.1
go: downloading golang.org/x/net v0.62.0
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/service/sns v1.43.0
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/aws/aws-sdk-go-v2/service/route53 v1.64.1
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/service/internal/presigned-url v1.13.40
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/aws/aws-sdk-go-v2/internal/endpoints/v2 v2.7.40
go: downloading github.com/prometheus/client_golang v1.17.0
go: downloading github.com/lmittmann/tint v1.1.3
go: downloading golang.org/x/sync v0.24.0
go: downloading github.com/aws/aws-sdk-go-v2/feature/s3/manager v1.20.18
go: downloading github.com/aws/aws-sdk-go-v2/aws/protocol/eventstream v1.7.14
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/checksum v1.9.23
go: downloading github.com/aws/aws-sdk-go-v2/service/internal/s3shared v1.19.31
go: downloading github.com/pion/transport/v4 v4.0.2
go: downloading github.com/pion/dtls/v3 v3.1.4
go: downloading github.com/pion/randutil v0.1.0
go: downloading github.com/wlynxg/anet v0.0.5
go: downloading google.golang.org/protobuf v1.36.10
go: downloading github.com/prometheus/procfs v0.12.0
go: downloading github.com/beorn7/perks v1.0.1
go: downloading github.com/cespare/xxhash/v2 v2.3.0
go: downloading github.com/prometheus/common v0.45.0
go: downloading github.com/prometheus/client_model v0.5.0
go: downloading golang.org/x/text v0.43.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 modernc.org/libc v1.74.1
go: downloading modernc.org/libc v1.74.1
go: downloading github.com/google/uuid v1.6.0
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/dustin/go-humanize v1.0.1
go: downloading github.com/google/uuid v1.6.0
go: downloading modernc.org/memory v1.11.0
=== launchctx (4 s, from +0 s)
ok  	amadan.net/carlos/platform.git/launchctx	0.016s
?   	amadan.net/carlos/platform.git/launchctx/controlname	[no test files]
?   	amadan.net/carlos/platform.git/launchctx/wireid	[no test files]
=== vet (181 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/memory v1.11.0
go: downloading modernc.org/mathutil v1.7.1
go: downloading github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec
=== vet-tags (179 s, from +0 s)
go: downloading modernc.org/sqlite v1.55.0
go: downloading github.com/klauspost/compress v1.20.2
go: downloading github.com/pierrec/lz4/v4 v4.1.22
go: downloading modernc.org/libc v1.74.1
go: downloading modernc.org/mathutil v1.7.1
=== gofmt (1 s, from +0 s)
gofmt -l .: clean
=== rest (392 s, from +15 s)
ok  	github.com/carlosframework/platform/cmd/carlos-media	128.246s
?   	github.com/carlosframework/platform/cmd/changelog	[no test files]
ok  	github.com/carlosframework/platform/cmd/console	213.444s
ok  	github.com/carlosframework/platform/cmd/mediaimage	45.187s
ok  	github.com/carlosframework/platform/cmd/moveprobe	16.443s
ok  	github.com/carlosframework/platform/cmd/pricebook-export	0.067s
ok  	github.com/carlosframework/platform/cmd/rootfswitness	0.184s
ok  	github.com/carlosframework/platform/cmd/runsc-assets	0.153s
ok  	github.com/carlosframework/platform/cmd/zddprobe	1.130s
ok  	github.com/carlosframework/platform/internal/agentsock	0.060s
ok  	github.com/carlosframework/platform/internal/alerting	0.028s
ok  	github.com/carlosframework/platform/internal/analytics	0.502s
ok  	github.com/carlosframework/platform/internal/appconfig	44.481s
ok  	github.com/carlosframework/platform/internal/apperr	0.539s
ok  	github.com/carlosframework/platform/internal/applog	0.593s
ok  	github.com/carlosframework/platform/internal/apppolicy	2.693s
ok  	github.com/carlosframework/platform/internal/assetcache	0.502s
ok  	github.com/carlosframework/platform/internal/awsinv	0.042s
ok  	github.com/carlosframework/platform/internal/awsmanaged	9.870s
ok  	github.com/carlosframework/platform/internal/awsregiongroup	0.445s
ok  	github.com/carlosframework/platform/internal/awsterminations	0.030s
ok  	github.com/carlosframework/platform/internal/backupswords	0.014s
ok  	github.com/carlosframework/platform/internal/billing	0.074s
ok  	github.com/carlosframework/platform/internal/billing/billingtest	0.068s
ok  	github.com/carlosframework/platform/internal/billingstripe	1.830s
ok  	github.com/carlosframework/platform/internal/boxchoice	0.037s
ok  	github.com/carlosframework/platform/internal/boxid	2.101s
?   	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.012s
ok  	github.com/carlosframework/platform/internal/boxself	0.161s
ok  	github.com/carlosframework/platform/internal/boxvolumes	0.032s
ok  	github.com/carlosframework/platform/internal/caps	4.432s
ok  	github.com/carlosframework/platform/internal/certwarm	0.014s
ok  	github.com/carlosframework/platform/internal/cgroup	1.464s
ok  	github.com/carlosframework/platform/internal/changelog	5.507s
ok  	github.com/carlosframework/platform/internal/clamd	0.080s
?   	github.com/carlosframework/platform/internal/cliflag	[no test files]
ok  	github.com/carlosframework/platform/internal/clireg	0.020s
ok  	github.com/carlosframework/platform/internal/codehealth	18.515s
ok  	github.com/carlosframework/platform/internal/compute	0.012s
ok  	github.com/carlosframework/platform/internal/consolefleet	0.014s
?   	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.897s
ok  	github.com/carlosframework/platform/internal/dbdoor/dbdoortest	0.077s
ok  	github.com/carlosframework/platform/internal/dbquery	0.051s
ok  	github.com/carlosframework/platform/internal/dbreads	2.961s
?   	github.com/carlosframework/platform/internal/dbreads/dbreadstest	[no test files]
ok  	github.com/carlosframework/platform/internal/dbverify	0.039s
ok  	github.com/carlosframework/platform/internal/demo	0.019s
ok  	github.com/carlosframework/platform/internal/demobuild	3.888s
ok  	github.com/carlosframework/platform/internal/democlaim	0.747s
ok  	github.com/carlosframework/platform/internal/devbox	17.423s
ok  	github.com/carlosframework/platform/internal/dnsrec	0.028s
ok  	github.com/carlosframework/platform/internal/docsite	0.128s
ok  	github.com/carlosframework/platform/internal/domainreg	0.016s
ok  	github.com/carlosframework/platform/internal/domains	70.491s
ok  	github.com/carlosframework/platform/internal/doorkey	0.040s
ok  	github.com/carlosframework/platform/internal/economics	0.021s
ok  	github.com/carlosframework/platform/internal/edgefence	0.152s
ok  	github.com/carlosframework/platform/internal/edgeguard	0.429s
?   	github.com/carlosframework/platform/internal/edgeproof	[no test files]
ok  	github.com/carlosframework/platform/internal/edgesfile	0.125s
ok  	github.com/carlosframework/platform/internal/egressaddr	0.011s
ok  	github.com/carlosframework/platform/internal/execsandbox	103.269s
ok  	github.com/carlosframework/platform/internal/fileacl	0.014s
ok  	github.com/carlosframework/platform/internal/fleetapi	2.873s
ok  	github.com/carlosframework/platform/internal/fleetstore	0.012s
ok  	github.com/carlosframework/platform/internal/fxrate	0.020s
ok  	github.com/carlosframework/platform/internal/gate	5.173s
ok  	github.com/carlosframework/platform/internal/genselect	0.075s
ok  	github.com/carlosframework/platform/internal/geo	0.056s
ok  	github.com/carlosframework/platform/internal/geoip	0.105s
ok  	github.com/carlosframework/platform/internal/groupadmission	0.012s
ok  	github.com/carlosframework/platform/internal/grouprollaws	17.572s
ok  	github.com/carlosframework/platform/internal/hadeparture	0.021s
ok  	github.com/carlosframework/platform/internal/hafresh	0.011s
ok  	github.com/carlosframework/platform/internal/hairpin	0.226s
ok  	github.com/carlosframework/platform/internal/historyreadback	1.272s
ok  	github.com/carlosframework/platform/internal/hostactors	26.822s
ok  	github.com/carlosframework/platform/internal/hostbox	24.321s
ok  	github.com/carlosframework/platform/internal/hostclaim	2.668s
ok  	github.com/carlosframework/platform/internal/hostenv	0.049s
ok  	github.com/carlosframework/platform/internal/hostevidence	0.039s
ok  	github.com/carlosframework/platform/internal/hostexec	23.411s
ok  	github.com/carlosframework/platform/internal/hostfence	0.128s
ok  	github.com/carlosframework/platform/internal/hostfiles	26.898s
ok  	github.com/carlosframework/platform/internal/hostfloor	0.099s
ok  	github.com/carlosframework/platform/internal/hostguard	1.769s
ok  	github.com/carlosframework/platform/internal/hostops	10.242s
?   	github.com/carlosframework/platform/internal/hostops/fencerelease	[no test files]
ok  	github.com/carlosframework/platform/internal/hostops/internal/fencerelease	0.032s
ok  	github.com/carlosframework/platform/internal/hostquarantine	0.040s
ok  	github.com/carlosframework/platform/internal/hostrelocate	2.504s
ok  	github.com/carlosframework/platform/internal/hostresolve	0.740s
ok  	github.com/carlosframework/platform/internal/hostwrite	0.007s
ok  	github.com/carlosframework/platform/internal/infraview	0.008s
ok  	github.com/carlosframework/platform/internal/ingresshealth	0.008s
ok  	github.com/carlosframework/platform/internal/ingresshealth/awstg	0.014s
ok  	github.com/carlosframework/platform/internal/instancectl	61.991s
ok  	github.com/carlosframework/platform/internal/instanceexec	9.931s
ok  	github.com/carlosframework/platform/internal/instancefs	0.017s
ok  	github.com/carlosframework/platform/internal/instancekey	0.025s
ok  	github.com/carlosframework/platform/internal/instanceupdates	0.043s
ok  	github.com/carlosframework/platform/internal/interactive	0.729s
ok  	github.com/carlosframework/platform/internal/launchd	0.017s
ok  	github.com/carlosframework/platform/internal/layout	24.337s
ok  	github.com/carlosframework/platform/internal/layout/pubclass	101.028s
ok  	github.com/carlosframework/platform/internal/lbhealth	0.019s
ok  	github.com/carlosframework/platform/internal/lease	148.491s
ok  	github.com/carlosframework/platform/internal/lease/leasetest	1.734s
ok  	github.com/carlosframework/platform/internal/lease/locktest	0.019s
ok  	github.com/carlosframework/platform/internal/ledger	0.062s
ok  	github.com/carlosframework/platform/internal/mail	1.057s
ok  	github.com/carlosframework/platform/internal/mailer	1.007s
ok  	github.com/carlosframework/platform/internal/mailsubmit	1.763s
ok  	github.com/carlosframework/platform/internal/mailwire	0.007s
ok  	github.com/carlosframework/platform/internal/maintenance	0.146s
ok  	github.com/carlosframework/platform/internal/maintenanceexec	8.424s
ok  	github.com/carlosframework/platform/internal/maintenanceguard	0.287s
ok  	github.com/carlosframework/platform/internal/managedboot	4.283s
?   	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.534s
ok  	github.com/carlosframework/platform/internal/media/mediatest	0.020s
ok  	github.com/carlosframework/platform/internal/mediaaws	64.853s
ok  	github.com/carlosframework/platform/internal/mediahandler	43.951s
ok  	github.com/carlosframework/platform/internal/mediajobs	1.372s
ok  	github.com/carlosframework/platform/internal/medialocal	10.332s
ok  	github.com/carlosframework/platform/internal/metrics	0.264s
ok  	github.com/carlosframework/platform/internal/minorunits	0.012s
ok  	github.com/carlosframework/platform/internal/moves	54.132s
ok  	github.com/carlosframework/platform/internal/moves/archive	4.036s
ok  	github.com/carlosframework/platform/internal/moves/offlinerun	0.122s
ok  	github.com/carlosframework/platform/internal/namedunits	0.044s
ok  	github.com/carlosframework/platform/internal/objstore	2.622s
ok  	github.com/carlosframework/platform/internal/ops	18.536s
ok  	github.com/carlosframework/platform/internal/pageindex	4.399s
ok  	github.com/carlosframework/platform/internal/parity	0.107s
?   	github.com/carlosframework/platform/internal/parity/cmd/parity-doc	[no test files]
ok  	github.com/carlosframework/platform/internal/park	0.602s
ok  	github.com/carlosframework/platform/internal/perf	0.197s
ok  	github.com/carlosframework/platform/internal/plans	0.120s
ok  	github.com/carlosframework/platform/internal/privatefile	0.023s
ok  	github.com/carlosframework/platform/internal/provision	244.369s
ok  	github.com/carlosframework/platform/internal/proxyproto	0.941s
ok  	github.com/carlosframework/platform/internal/publicrelease	0.045s
ok  	github.com/carlosframework/platform/internal/ratelimit	0.183s
ok  	github.com/carlosframework/platform/internal/regionlabel	0.063s
ok  	github.com/carlosframework/platform/internal/regionname	0.025s
ok  	github.com/carlosframework/platform/internal/registrar	0.010s
ok  	github.com/carlosframework/platform/internal/registrar/openprovider	0.669s
?   	github.com/carlosframework/platform/internal/registrar/registrartest	[no test files]
ok  	github.com/carlosframework/platform/internal/registry	87.091s
ok  	github.com/carlosframework/platform/internal/relay	7.739s
ok  	github.com/carlosframework/platform/internal/release	83.752s
ok  	github.com/carlosframework/platform/internal/replicagen	0.022s
ok  	github.com/carlosframework/platform/internal/replicas	0.100s
ok  	github.com/carlosframework/platform/internal/reqrec	7.714s
ok  	github.com/carlosframework/platform/internal/rollout	11.587s
ok  	github.com/carlosframework/platform/internal/rolloutwords	0.034s
ok  	github.com/carlosframework/platform/internal/rootaws	99.179s
ok  	github.com/carlosframework/platform/internal/rootfsimage	0.739s
ok  	github.com/carlosframework/platform/internal/rootparticipation	0.081s
ok  	github.com/carlosframework/platform/internal/rootstate	0.036s
ok  	github.com/carlosframework/platform/internal/runs	0.903s
ok  	github.com/carlosframework/platform/internal/s3compat	0.019s
ok  	github.com/carlosframework/platform/internal/s3fake	1.267s
ok  	github.com/carlosframework/platform/internal/safefile	0.051s
ok  	github.com/carlosframework/platform/internal/schedule	24.023s
ok  	github.com/carlosframework/platform/internal/seeds	0.100s
ok  	github.com/carlosframework/platform/internal/sim/litestreamfacts	5.077s
ok  	github.com/carlosframework/platform/internal/sim/mediajobs	54.844s
ok  	github.com/carlosframework/platform/internal/sim/regionha	23.001s
ok  	github.com/carlosframework/platform/internal/status	0.707s
ok  	github.com/carlosframework/platform/internal/steering	0.210s
ok  	github.com/carlosframework/platform/internal/stopevidence	0.514s
ok  	github.com/carlosframework/platform/internal/storecfg	0.398s
ok  	github.com/carlosframework/platform/internal/svcrole	0.014s
ok  	github.com/carlosframework/platform/internal/systemd	5.846s
?   	github.com/carlosframework/platform/internal/systemdshow	[no test files]
ok  	github.com/carlosframework/platform/internal/team	3.550s
ok  	github.com/carlosframework/platform/internal/teamcontract	0.219s
ok  	github.com/carlosframework/platform/internal/telemetry	0.022s
ok  	github.com/carlosframework/platform/internal/termfence	2.254s
ok  	github.com/carlosframework/platform/internal/timerspec	0.013s
ok  	github.com/carlosframework/platform/internal/tsidentity	4.183s
ok  	github.com/carlosframework/platform/internal/tunnelclient	0.401s
ok  	github.com/carlosframework/platform/internal/unixdial	0.017s
ok  	github.com/carlosframework/platform/internal/updatewords	0.089s
ok  	github.com/carlosframework/platform/internal/upstreamguard	0.009s
?   	github.com/carlosframework/platform/internal/upstreamguard/guardtest	[no test files]
ok  	github.com/carlosframework/platform/internal/usage	0.032s
ok  	github.com/carlosframework/platform/internal/version	0.027s
ok  	github.com/carlosframework/platform/internal/vet	3.326s
ok  	github.com/carlosframework/platform/internal/zonehost	0.053s
ok  	github.com/carlosframework/platform/internal/zonehost/route53zones	0.096s
?   	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.021s
ok  	github.com/carlosframework/platform/scripts/pathmapcheck	0.120s
ok  	github.com/carlosframework/platform/scripts/region-ha-g2/fixture	5.220s
ok  	github.com/carlosframework/platform/scripts/stateless-replicas-drill	1.190s
ok  	github.com/carlosframework/platform/scripts/witness-pointer	0.029s
=== cutover-witness (166 s, from +15 s)
ok  	github.com/carlosframework/platform	2.282s
=== internal_grouproll@0 (283 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	281.547s
=== internal_grouproll@1 (284 s, from +75 s)
ok  	github.com/carlosframework/platform/internal/grouproll	283.298s
=== internal_activator@0 (154 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	149.337s
=== internal_activator@1 (137 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	133.025s
=== internal_activator@2 (137 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	132.614s
=== internal_activator@3 (169 s, from +149 s)
ok  	github.com/carlosframework/platform/internal/activator	164.745s
=== internal_edge@0 (196 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	187.359s
=== internal_edge@1 (143 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	133.774s
=== internal_edge@2 (155 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	147.426s
=== internal_edge@3 (220 s, from +176 s)
ok  	github.com/carlosframework/platform/internal/edge	209.624s
=== root@0 (117 s, from +180 s)
ok  	github.com/carlosframework/platform	106.393s
=== root@1 (112 s, from +180 s)
ok  	github.com/carlosframework/platform	101.920s
=== root@2 (122 s, from +180 s)
ok  	github.com/carlosframework/platform	111.910s
=== root@3 (113 s, from +180 s)
ok  	github.com/carlosframework/platform	101.647s
=== root@4 (112 s, from +180 s)
ok  	github.com/carlosframework/platform	101.322s
=== internal_host@0 (147 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	142.622s
=== internal_host@1 (140 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	135.508s
=== internal_host@2 (202 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	197.869s
=== internal_host@3 (308 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	303.346s
=== internal_host@4 (135 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	131.173s
=== internal_host@5 (222 s, from +223 s)
ok  	github.com/carlosframework/platform/internal/host	217.562s
=== internal_console@0 (166 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	159.323s
=== internal_console@1 (175 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	168.713s
=== internal_console@2 (199 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	192.843s
=== internal_console@3 (249 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	241.996s
=== internal_console@4 (204 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	197.437s
=== internal_console@5 (211 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	203.777s
=== internal_console@6 (216 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	209.544s
=== internal_console@7 (216 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	208.994s
=== internal_console@8 (213 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	206.252s
=== internal_console@9 (238 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	231.251s
=== internal_console@10 (222 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	214.953s
=== internal_console@11 (235 s, from +228 s)
ok  	github.com/carlosframework/platform/internal/console	227.719s
=== internal_console@12 (296 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	290.649s
=== internal_console@13 (249 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	242.244s
=== internal_console@14 (239 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	233.674s
=== internal_console@15 (221 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	215.710s
=== internal_console@16 (236 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	230.849s
=== internal_console@17 (195 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	189.827s
=== internal_console@18 (205 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	200.137s
=== internal_console@19 (199 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	193.164s
=== internal_console@20 (226 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	220.227s
=== internal_console@21 (225 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	218.442s
=== internal_console@22 (223 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	215.948s
=== internal_console@23 (223 s, from +229 s)
ok  	github.com/carlosframework/platform/internal/console	215.791s
=== lists: internal_console 227 s, internal_edge 175 s, internal_activator 148 s, internal_host 221 s, root 178 s, internal_grouproll 75 s
=== cpu: the gate used 12983 cpu-seconds in 531 s, about 24.5 of 32 cores; the machine as a whole was 82% busy
=== opentofu ===
opentofu: 39 test files in 11 suites, OpenTofu v1.13.9
  initialised in 15 s
  ok      14 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      30 s  infra/modules/deployment-buckets/tests/data_lifecycle.tftest.hcl  Success! 3 passed, 0 failed.
  ok      18 s  infra/modules/deployment-buckets/tests/db_reads.tftest.hcl  Success! 1 passed, 0 failed.
  ok      15 s  infra/modules/deployment-buckets/tests/evidence.tftest.hcl  Success! 1 passed, 0 failed.
  ok      29 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      91 s  infra/modules/media-engine/tests/media_engine.tftest.hcl  Success! 24 passed, 0 failed.
  ok      28 s  infra/modules/pdf-host/tests/computed.tftest.hcl  Success! 2 passed, 0 failed.
  ok      62 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      20 s  infra/modules/region-host/ingress/tests/fixed-targets/tests/targets.tftest.hcl  Success! 2 passed, 0 failed.
  ok      69 s  infra/modules/region-host/ingress/tests/group_ingress.tftest.hcl  Success! 30 passed, 0 failed.
  ok      47 s  infra/modules/region-host/tests/alert_publish.tftest.hcl  Success! 18 passed, 0 failed.
  ok      44 s  infra/modules/region-host/tests/alerts_topic.tftest.hcl  Success! 16 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/analytics_prune.tftest.hcl  Success! 2 passed, 0 failed.
  ok      17 s  infra/modules/region-host/tests/console_mail.tftest.hcl  Success! 4 passed, 0 failed.
  ok       8 s  infra/modules/region-host/tests/fixed_state_unchanged.tftest.hcl  Success! 1 passed, 0 failed.
  ok      72 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       6 s  infra/modules/region-host/tests/group_isolation.tftest.hcl  Success! 1 passed, 0 failed.
  ok      37 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      30 s  infra/modules/region-host/tests/health_alarms.tftest.hcl  Success! 10 passed, 0 failed.
  ok      14 s  infra/modules/region-host/tests/ingress_drain_read.tftest.hcl  Success! 4 passed, 0 failed.
  ok       7 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       9 s  infra/modules/region-host/tests/mailer_group.tftest.hcl  Success! 2 passed, 0 failed.
  ok      13 s  infra/modules/region-host/tests/managed_fleets/group_refusal.tftest.hcl  Success! 2 passed, 0 failed.
  ok     108 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      19 s  infra/modules/region-host/tests/store_scanning.tftest.hcl  Success! 4 passed, 0 failed.
  ok      31 s  infra/modules/region-host/tests/store_versioning.tftest.hcl  Success! 11 passed, 0 failed.
  ok      16 s  infra/modules/region-host/tests/store_write_credentials.tftest.hcl  Success! 4 passed, 0 failed.
  ok      19 s  infra/modules/region-host/tests/user_data_ignored.tftest.hcl  Success! 3 passed, 0 failed.
  ok      13 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      35 s  infra/modules/scanner-host/tests/scanner_host.tftest.hcl  Success! 14 passed, 0 failed.
opentofu: 39 files in 215 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:32493
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.02s)
        --- 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.037s
=== RUN   TestT4StorageProbeMinio
2026/11/25 21:01:56 moves: T4: STORE: list: operation error S3: ListObjectsV2, https response error StatusCode: 403, RequestID: 18EB658943E9A743, HostID: 4be0875db1d43a29ef43ce5936f29d528da5522684aac1f45b4fd4e5358748cf, 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.044s
=== RUN   TestS3StoreMinioContract
=== RUN   TestS3StoreMinioContract/conditional_get_and_etag_listing
=== RUN   TestS3StoreMinioContract/bump_through_every_mutation_path
--- PASS: TestS3StoreMinioContract (0.04s)
    --- 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.046s
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.04s)
PASS
ok  	github.com/carlosframework/platform/internal/release	0.042s
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.021s
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:_read_under_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_read_elsewhere
=== RUN   TestWriteCredentialContractMinio/refused:_head
=== RUN   TestWriteCredentialContractMinio/refused:_list_uploads
=== RUN   TestWriteCredentialContractMinio/refused:_tag
=== RUN   TestWriteCredentialContractMinio/refused:_put_outside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_beside_the_prefix
=== RUN   TestWriteCredentialContractMinio/refused:_put_to_another_bucket
=== RUN   TestWriteCredentialContractMinio/refused:_list
=== RUN   TestWriteCredentialContractMinio/refused:_delete
=== RUN   TestWriteCredentialContractMinio/refused:_put_tagged
=== RUN   TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag
=== RUN   TestWriteCredentialContractMinio/refused:_copy_from_the_store
=== RUN   TestWriteCredentialContractMinio/refused:_bucket_settings
--- PASS: TestWriteCredentialContractMinio (0.04s)
    --- PASS: TestWriteCredentialContractMinio/put_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/multipart_under_the_prefix (0.01s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_under_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_read_elsewhere (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_head (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list_uploads (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_outside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_beside_the_prefix (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_to_another_bucket (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_list (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_delete (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_tagged (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_put_with_a_platform_tag (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_copy_from_the_store (0.00s)
    --- PASS: TestWriteCredentialContractMinio/refused:_bucket_settings (0.00s)
PASS
ok  	github.com/carlosframework/platform/internal/objstore	0.054s
=== RUN   TestEndToEndMinio
=== RUN   TestEndToEndMinio/plan
=== RUN   TestEndToEndMinio/roll
=== RUN   TestEndToEndMinio/replace
=== RUN   TestEndToEndMinio/remove
--- PASS: TestEndToEndMinio (0.52s)
    --- PASS: TestEndToEndMinio/plan (0.01s)
    --- PASS: TestEndToEndMinio/roll (0.14s)
    --- PASS: TestEndToEndMinio/replace (0.17s)
    --- PASS: TestEndToEndMinio/remove (0.17s)
PASS
ok  	github.com/carlosframework/platform/internal/grouproll	0.528s
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 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/25 21:02:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000002
2026/11/25 21:02:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000002 maxTXID=0000000000000002 size=370
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000002
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000002 txid.db=0000000000000003
2026/11/25 21:02:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000003 maxTXID=0000000000000003 size=454
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000003 txid.db=0000000000000003
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000000 txid.db=0000000000000001
2026/11/25 21:02:05 INFO ltx file uploaded system=store db=source.db replica=file level=0 minTXID=0000000000000001 maxTXID=0000000000000001 size=720
2026/11/25 21:02:05 INFO replica sync system=store db=source.db replica=file txid.replica=0000000000000001 txid.db=0000000000000001
2026/11/25 21:02:05 console: CARLOS_SECRETS_PUBKEY is unset, so no region outside the home can be chosen automatically
2026/11/25 21:02:05 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%3A36433: could not determine target mailbox
    agent.go:136: dbreads: dbr_cu6b5icpfqhuadcnpsw2zo266m: planned 3 files (1544 bytes) and restored to 3 in 14ms
    agent.go:136: dbreads: dbr_cu6b5icpfqhuadcnpsw2zo266m: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/25 21:02:06 console: db read dbr_cu6b5icpfqhuadcnpsw2zo266m: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_yfkahehox2p4oemnu6jcihgjaq: planned 1 files (720 bytes) and restored to 1 in 12ms
    agent.go:136: dbreads: dbr_yfkahehox2p4oemnu6jcihgjaq: output 5 bytes in 1 confirmed chunks in 2ms
2026/11/25 21:02:07 console: db read dbr_yfkahehox2p4oemnu6jcihgjaq: relayed 1 chunks (102 bytes) in 1.005s, ended done
    agent.go:136: dbreads: dbr_hlday2uxjzfwyci3hdyratchwu: planned 3 files (1544 bytes) and held through 3 in 12ms
    agent.go:136: dbreads: dbr_hlday2uxjzfwyci3hdyratchwu: output 1544 bytes in 1 confirmed chunks in 2ms
2026/11/25 21:02:08 console: db read dbr_hlday2uxjzfwyci3hdyratchwu: relayed 1 chunks (1641 bytes) in 1.005s, ended done
=== RUN   TestDBForwardMinio/by_disconnect
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_hkyxgok77jfvpgchl7biaqmxne: planned 3 files (1544 bytes) and restored to 3 in 17ms
2026/11/25 21:02:09 console: db read dbr_hkyxgok77jfvpgchl7biaqmxne: relayed 0 chunks (0 bytes) in 23ms, ended client gone
    agent.go:136: dbreads: dbr_hkyxgok77jfvpgchl7biaqmxne: output 5 bytes in 1 confirmed chunks in 105ms
=== RUN   TestDBForwardMinio/by_timeout
=== NAME  TestDBForwardMinio
    agent.go:136: dbreads: dbr_hfltwx3sn3m5csosfohqgb3qnu: planned 3 files (1544 bytes) and restored to 3 in 14ms
2026/11/25 21:02:29 console: db read dbr_hfltwx3sn3m5csosfohqgb3qnu: relayed 0 chunks (0 bytes) in 19.787s, ended no-result
    agent.go:136: dbreads: dbr_hfltwx3sn3m5csosfohqgb3qnu: output 5 bytes in 1 confirmed chunks in 19.763s
--- PASS: TestDBForwardMinio (23.46s)
    --- PASS: TestDBForwardMinio/by_disconnect (0.24s)
    --- PASS: TestDBForwardMinio/by_timeout (19.90s)
PASS
ok  	github.com/carlosframework/platform/internal/console	23.508s
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.08s)
PASS
ok  	github.com/carlosframework/platform/internal/mediaaws	0.082s
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.58s)
PASS
ok  	github.com/carlosframework/platform/internal/medialocal	0.585s
=== RUN   TestHeldHandoverTwoBoxMinio
2026/11/25 21:02:34 edge: mesh key: minted
2026/11/25 21:02:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 21:02:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 21:02:34 tenant admission is open. accepting tenant work
2026/11/25 21:02:34 activator: HA placement host=shop-2cdf85e2.example.test kind=Place ref=annie reason=roomiest generation=2026-11-25T21:02:34Z lock_generation=0
2026/11/25 21:02:34 lease: t8-2cdf85e2/shop-2cdf85e2.example.test: HA lease acquired in 4ms (first wake)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: started carlos-instance@shop\x2d2cdf85e2.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) 7ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: carlos-instance@shop\x2d2cdf85e2.example.test.service launched in 8ms, healthy 0s later
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: woke in 21ms: checks 0s, lease 5ms, restore 0s, identity 0s, protect 0s, spawn 8ms, replicate 7ms
2026/11/25 21:02:34 lease: t8-2cdf85e2/plain-2cdf85e2.example.test: acquired in 2ms (client 0s, lock read and write 1ms)
2026/11/25 21:02:34 activator: no replica for plain-2cdf85e2.example.test in s3://contract-bucket/t8-2cdf85e2/plain-2cdf85e2.example.test — booting fresh
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test: started carlos-instance@plain\x2d2cdf85e2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 1ms, 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 21:02:34 activator: plain-2cdf85e2.example.test: carlos-instance@plain\x2d2cdf85e2.example.test.service launched in 7ms, healthy 0s later
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test: woke in 51ms: checks 0s, lease 2ms, restore 18ms, identity 0s, protect 0s, spawn 7ms, replicate 23ms
2026/11/25 21:02:34 lease: t8-2cdf85e2/bot0.shop.bac.sidecar.internal: HA lease acquired in 4ms (first wake)
2026/11/25 21:02:34 activator: bot0.shop.bac.sidecar.internal: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 21:02:34 activator: bot0.shop.bac.sidecar.internal: woke in 21ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, settle 0s, replicate 9ms
2026/11/25 21:02:34 activator: next-due probe plain-2cdf85e2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test hibernated
2026/11/25 21:02:34 activator: bot0.shop.bac.sidecar.internal: released with a marker (clean true, txid 1, files 3:86723cd29e364ed66e5dea5b57198f2039776221445ab55479a9d5beab2ea5c7) in 6ms: files 1ms, sync 2ms, record 1ms, marker 2ms
2026/11/25 21:02:34 activator: bot0.shop.bac.sidecar.internal hibernated
2026/11/25 21:02:34 activator: next-due probe shop-2cdf85e2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: released with a marker (clean true, txid 1, files 3:f9fc8a1662f4816af3c5d5af7b207c20c1ef5d1c62f6f2359774b0edb46093b2) in 9ms: files 1ms, sync 5ms, record 1ms, marker 2ms
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test hibernated
2026/11/25 21:02:34 lease: t8-2cdf85e2/shop-2cdf85e2.example.test: HA lease acquired in 3ms (clean marker)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: restored (other-box)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: started carlos-instance@shop\x2d2cdf85e2.example.test.service memory.max=536870912 (build 0s, prepare (dirs 0s, admin token 0s, instance key 0s, env 1ms, control socket 0s, key gate 0s, logs 0s) 1ms, launch file 0s, gate 0s, root start 1ms)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: carlos-instance@shop\x2d2cdf85e2.example.test.service launched in 2ms, healthy 0s later
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: woke in 88ms: checks 0s, lease 4ms, restore 25ms, identity 0s, protect 0s, spawn 2ms, replicate 56ms
2026/11/25 21:02:34 edge: ha-take shop-2cdf85e2.example.test from annie (txn t8-witness, marker generation 1): holder betty, generation 2
2026/11/25 21:02:34 edge: forward shop-2cdf85e2.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:063a42f6fb5e538c09b2e38d6b9c53ac Step:move Result:ok Reasons:[] Fence:t8-witness StartedAt:2026-11-25 21:02:34.635231654 +0000 UTC FinishedAt:2026-11-25 21:02:34.782482129 +0000 UTC Acked:[betty carol] Departed:[] Moved:[{Host:shop-2cdf85e2.example.test Holder:betty Gen:2 Confirmed:take}] Released:[{Host:plain-2cdf85e2.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:132 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-2cdf85e2.example.test <nil> stop plain-2cdf85e2.example.test marker=true clean=true <nil> stop bot0.shop.bac.sidecar.internal marker=true clean=true <nil> releasing shop-2cdf85e2.example.test <nil> stop shop-2cdf85e2.example.test marker=true clean=true <nil> taken shop-2cdf85e2.example.test betty <nil> end-moves]
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/bot0.shop.bac.sidecar.internal/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/bot0.shop.bac.sidecar.internal/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/bot0.shop.bac.sidecar.internal/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/bot0.shop.bac.sidecar.internal/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: DELETE /contract-bucket/t8-2cdf85e2/plain-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/bot0.shop.bac.sidecar.internal/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/bot0.shop.bac.sidecar.internal/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/head.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/generations/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0008/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0007/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0006/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0005/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0004/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/0009/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/files/0/manifest.json
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/files/0/objects/0000000000000001-73c702334ab750593613ff9b58dce6bc28204bb76b14df1f77ff045365b29b60
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/files/0/objects/0000000000000003-df953c94f0d8d5d8eda1e3edb66d7489e2a9040f93d4e204835a1268f325a4fc
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0009/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0001/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/0000/0000000000000001-0000000000000001.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0003/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0000/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: LIST /contract-bucket?t8-2cdf85e2/shop-2cdf85e2.example.test/0002/
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: PUT /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/0000/0000000000000002-0000000000000002.ltx
    hadrain_twobox_minio_linux_test.go:1241: S3 during the drain: GET /contract-bucket/t8-2cdf85e2/shop-2cdf85e2.example.test/lock.json
    hadrain_twobox_minio_linux_test.go:1243: drain took 183ms; S3 calls 49 (DELETE lock=1 GET files=3 GET head=1 GET lock=3 GET replica=2 LIST replica=33 PUT lock=3 PUT replica=3); 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 21:02:34 lease: t8-2cdf85e2/plain-2cdf85e2.example.test: acquired in 2ms (client 0s, lock read and write 2ms)
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test: started carlos-instance@plain\x2d2cdf85e2.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 21:02:34 activator: plain-2cdf85e2.example.test: carlos-instance@plain\x2d2cdf85e2.example.test.service launched in 1ms, healthy 0s later
2026/11/25 21:02:34 lease: /tmp/carlos-minio-contract-JEZiM1/g/dw2644694901/data/instances/plain-2cdf85e2.example.test/plain-2cdf85e2.example.test.db: continuity with the last clean close not proven; snapshot 1-0000000000000001 written before serving
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test: woke in 9ms: checks 0s, lease 2ms, restore 0s, identity 0s, protect 1ms, spawn 2ms, replicate 5ms
2026/11/25 21:02:34 activator: next-due probe shop-2cdf85e2.example.test: decode /api/next-due: invalid character 'b' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test: released with a marker (clean true, txid 2, files 3:f9fc8a1662f4816af3c5d5af7b207c20c1ef5d1c62f6f2359774b0edb46093b2) in 4ms: files 1ms, sync 0s, record 1ms, marker 2ms
2026/11/25 21:02:34 activator: shop-2cdf85e2.example.test hibernated
2026/11/25 21:02:34 tenant admission is closed for shutdown
2026/11/25 21:02:34 activator: next-due probe plain-2cdf85e2.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 21:02:34 activator: plain-2cdf85e2.example.test hibernated
--- PASS: TestHeldHandoverTwoBoxMinio (0.52s)
=== RUN   TestHeldHandoverLostLeaseMinio
2026/11/25 21:02:34 edge: mesh key: minted
2026/11/25 21:02:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 21:02:34 provision: minted sidecar route bot0.shop.bac.sidecar.internal (app "shop" acct "bac" args ["work"])
2026/11/25 21:02:35 tenant admission is open. accepting tenant work
2026/11/25 21:02:35 activator: HA placement host=shop-ab6d78be.example.test kind=Place ref=annie reason=roomiest generation=2026-11-25T21:02:34Z lock_generation=0
2026/11/25 21:02:35 lease: t8-ab6d78be/shop-ab6d78be.example.test: HA lease acquired in 3ms (first wake)
2026/11/25 21:02:35 activator: shop-ab6d78be.example.test: restored (no-marker): first wake, the prefix proven empty, booting fresh
2026/11/25 21:02:35 activator: shop-ab6d78be.example.test: started carlos-instance@shop\x2dab6d78be.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 21:02:35 activator: shop-ab6d78be.example.test: carlos-instance@shop\x2dab6d78be.example.test.service launched in 7ms, healthy 0s later
2026/11/25 21:02:35 activator: shop-ab6d78be.example.test: woke in 68ms: checks 0s, lease 4ms, restore 0s, identity 0s, protect 0s, spawn 7ms, replicate 56ms
2026/11/25 21:02:35 activator: next-due probe shop-ab6d78be.example.test: decode /api/next-due: invalid character 'a' looking for beginning of value — recording none (it sleeps until a request)
2026/11/25 21:02:35 activator: final checkpoint shop-ab6d78be.example.test: lease: release marker owed for s3://contract-bucket/t8-ab6d78be/shop-ab6d78be.example.test/lock.json (If-Match "5f1622f3c24c7134d04f7e9c7506a80a"): lease: write release marker: operation error S3: PutObject, https response error StatusCode: 503, RequestID: , HostID: , api error ServiceUnavailable: witness: refused
2026/11/25 21:02:35 activator: shop-ab6d78be.example.test hibernated
2026/11/25 21:02:35 activator: handover of shop-ab6d78be.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-ab6d78be.example.test client 1 "
    hadrain_twobox_minio_linux_test.go:1486: driver calls: [begin shop-ab6d78be.example.test <nil> releasing shop-ab6d78be.example.test <nil> stop shop-ab6d78be.example.test marker=false clean=false <nil> left shop-ab6d78be.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 21:02:35 tenant admission is closed for shutdown
2026/11/25 21:02:35 http: proxy error: context canceled
--- PASS: TestHeldHandoverLostLeaseMinio (0.33s)
PASS
ok  	github.com/carlosframework/platform/internal/host	0.893s
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 21:02:36 lease: instances/gen-1795640556425000269.shop.example.com: HA lease acquired in 5ms (first wake)
2026/11/25 21:02:36 lease: instances/gen-1795640556425000269.shop.example.com: HA lease acquired in 3ms (holder terminated)
    gentake_minio_test.go:308: a second create-only copy onto instances/gen-1795640556425000269.shop.example.com/g-00000000000000000002/0000/0000000000000001-0000000000000001.ltx: <nil> (destination condition honoured: false)
2026/11/25 21:02:36 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 21:02:36 http: proxy error: context canceled
2026/11/25 21:02:36 http: proxy error: context canceled
2026/11/25 21:02:36 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)"
=== RUN   TestGenerationTakeMinio/switch-412
2026/11/25 21:02:36 lease: instances/gen-1795640556604123602.shop.example.com: HA lease acquired in 4ms (first wake)
2026/11/25 21:02:36 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 21:02:36 lease: instances/gen-1795640556604123602.shop.example.com: HA lease acquired in 3ms (clean marker)
=== RUN   TestGenerationTakeMinio/copy-version
=== RUN   TestGenerationTakeMinio/store-time
2026/11/25 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 3ms (first wake)
2026/11/25 21:02:36 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 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 3ms (clean marker)
2026/11/25 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/25 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/25 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 2ms (unclean marker)
2026/11/25 21:02:36 lease: instances/gen-1795640556704489425.shop.example.com: HA lease acquired in 2ms (unclean marker)
=== RUN   TestGenerationTakeMinio/skew
--- PASS: TestGenerationTakeMinio (0.45s)
    --- PASS: TestGenerationTakeMinio/take (0.18s)
    --- PASS: TestGenerationTakeMinio/switch-412 (0.09s)
    --- PASS: TestGenerationTakeMinio/copy-version (0.01s)
    --- PASS: TestGenerationTakeMinio/store-time (0.15s)
    --- PASS: TestGenerationTakeMinio/skew (0.01s)
PASS
ok  	github.com/carlosframework/platform/internal/lease	0.458s
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

amadan: job cancelled — a newer push superseded it

Intent

Attributed to this commit: 141 g CO₂e (13,824,379 tokens). This is an attribution, not a measurement — usage counted from this commit's own marker forward to the next one on rootfs-netlink-route-1419, never backward from it. A turn that produced more than one commit books all of its tokens to the last one, and a concurrent session on this branch can add to the same figure. Some of it was priced using the shared default rate, because no model-specific factor row exists yet for at least one model involved. The Carbon view has the repo total, which is never derived from this attribution.

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..486ee911e
--- /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 |
+| `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 |
+| `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 |
+| `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 |
+| `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 |
+| `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 |
+
+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` → `4048988d196e11420812abdf8dd7686c0e20b3eebb290f8c15ef0c419099fd64`.
+
+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/internal/host/units/carlos-instance-rootfs-cmd@.service b/internal/host/units/carlos-instance-rootfs-cmd@.service
index 0c12358e2..9ef1ababa 100644
--- a/internal/host/units/carlos-instance-rootfs-cmd@.service
+++ b/internal/host/units/carlos-instance-rootfs-cmd@.service
@@ -187,8 +187,12 @@ 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.
+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..34a614e27 100644
--- a/internal/host/units/carlos-instance-rootfs-gen@.service
+++ b/internal/host/units/carlos-instance-rootfs-gen@.service
@@ -167,8 +167,12 @@ 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.
+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..7c06102db 100644
--- a/internal/host/units/carlos-instance-rootfs-probe.service
+++ b/internal/host/units/carlos-instance-rootfs-probe.service
@@ -162,8 +162,12 @@ 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.
+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..e0002318d 100644
--- a/internal/host/units/carlos-instance-rootfs-tty@.service
+++ b/internal/host/units/carlos-instance-rootfs-tty@.service
@@ -191,8 +191,12 @@ 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.
+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..d55546eef 100644
--- a/internal/host/units/carlos-instance-rootfs-worker@.service
+++ b/internal/host/units/carlos-instance-rootfs-worker@.service
@@ -179,8 +179,12 @@ 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.
+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..fa03125de 100644
--- a/internal/host/units/carlos-instance-rootfs@.service
+++ b/internal/host/units/carlos-instance-rootfs@.service
@@ -209,8 +209,12 @@ 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.
+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..164636f75 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] {
diff --git a/internal/instanceexec/exec.go b/internal/instanceexec/exec.go
index d08388a9a..81332f97b 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")
diff --git a/internal/instanceexec/exec_rootfs_scope_test.go b/internal/instanceexec/exec_rootfs_scope_test.go
new file mode 100644
index 000000000..e4ee8ca18
--- /dev/null
+++ b/internal/instanceexec/exec_rootfs_scope_test.go
@@ -0,0 +1,25 @@
+package instanceexec
+
+import (
+ "errors"
+ "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)
+ }
+}
diff --git a/internal/instanceexec/families_test.go b/internal/instanceexec/families_test.go
index 08b322026..a5f75f1cc 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") {
+ 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..c5aabca4f
--- /dev/null
+++ b/internal/instanceexec/netlink_route_linux.go
@@ -0,0 +1,93 @@
+//go:build linux
+
+package instanceexec
+
+import (
+ "errors"
+ "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)
+ 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. Arguments are
+// read as their low 32 bits (offsets 16 and 32 on these little-endian
+// architectures), as the kernel reads socket(2)'s int family and protocol.
+func netlinkRouteFilter(arch 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, Jf: 5, K: unix.SYS_SOCKET},
+ /* 7 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 16},
+ /* 8 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jf: 3, K: unix.AF_NETLINK},
+ /* 9 */ {Code: unix.BPF_LD | unix.BPF_W | unix.BPF_ABS, K: 32},
+ /* 10 */ {Code: unix.BPF_JMP | unix.BPF_JEQ | unix.BPF_K, Jt: 1, K: unix.NETLINK_ROUTE},
+ /* 11 */ ret(unix.SECCOMP_RET_ERRNO | uint32(unix.EAFNOSUPPORT)),
+ /* 12 */ allow,
+ }
+}
+
+// netlinkAddrDump asks for the box's addresses as getifaddrs does (an
+// RTM_GETADDR dump over NETLINK_ROUTE). Only the rootfs probe calls it.
+func netlinkAddrDump() error {
+ _, err := syscall.NetlinkRIB(syscall.RTM_GETADDR, syscall.AF_UNSPEC)
+ return err
+}
+
+// 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)
+}
diff --git a/internal/instanceexec/netlink_route_linux_test.go b/internal/instanceexec/netlink_route_linux_test.go
new file mode 100644
index 000000000..74b569b23
--- /dev/null
+++ b/internal/instanceexec/netlink_route_linux_test.go
@@ -0,0 +1,136 @@
+//go:build linux
+
+package instanceexec
+
+import (
+ "fmt"
+ "os"
+ "os/exec"
+ "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 == "scope" {
+ if err := ScopeNetlinkRoute(); err != nil {
+ fmt.Println("scope", err)
+ os.Exit(3)
+ }
+ }
+ fmt.Println(netlinkSocketReport())
+ 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 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))
+ 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)
+}
+
+// #1419: after ScopeNetlinkRoute a process opens NETLINK_ROUTE sockets
+// and no other netlink protocol (EAFNOSUPPORT, what a unit without
+// AF_NETLINK answers), inet and unix are untouched, and an exec'd child
+// keeps the scope.
+func TestScopeNetlinkRouteNarrowsNetlinkToRoute(t *testing.T) {
+ before := runNetlinkHelper(t, "plain")
+ if !strings.Contains(before, "route=open") {
+ t.Skipf("this environment refuses NETLINK_ROUTE already: %s", 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 := syscall.EAFNOSUPPORT.Error()
+ for i, line := range []string{lines[0], strings.TrimPrefix(lines[1], "inherited ")} {
+ for _, want := range []string{"route=open", "route-dgram=open", "inet=open", "unix=open"} {
+ if !strings.Contains(line, want) {
+ t.Errorf("line %d lacks %s: %s", i, want, line)
+ }
+ }
+ for p := 1; p < 32; p++ {
+ if !strings.Contains(line, fmt.Sprintf(" p%d=%s ", p, eaf)) {
+ t.Errorf("line %d: netlink protocol %d not refused with %q: %s", i, p, eaf, line)
+ }
+ }
+ if !strings.Contains(line, " phigh="+eaf+" ") {
+ t.Errorf("line %d: protocol 0x10004 not refused: %s", i, line)
+ }
+ }
+}
+
+// The filter ends in ALLOW (the unit's own filters still apply), and a
+// nonnative or x32 call is refused by it too (ENOSYS, never a kill).
+func TestNetlinkRouteFilterRefusesForeignArchitectures(t *testing.T) {
+ f := netlinkRouteFilter(unix.AUDIT_ARCH_X86_64)
+ if len(f) == 0 || f[len(f)-1].Code != unix.BPF_RET|unix.BPF_K || f[len(f)-1].K != unix.SECCOMP_RET_ALLOW {
+ t.Fatalf("filter does not end in ALLOW: %+v", f)
+ }
+ enosys, x32 := 0, false
+ for _, s := range f {
+ if s.Code == unix.BPF_RET|unix.BPF_K && s.K == unix.SECCOMP_RET_KILL_PROCESS {
+ t.Error("the filter kills")
+ }
+ if s.Code == unix.BPF_RET|unix.BPF_K && s.K == unix.SECCOMP_RET_ERRNO|uint32(unix.ENOSYS) {
+ enosys++
+ }
+ if s.Code == unix.BPF_JMP|unix.BPF_JSET|unix.BPF_K && s.K == 0x40000000 {
+ x32 = true
+ }
+ }
+ if enosys != 2 || !x32 {
+ t.Errorf("filter lacks the architecture guard (ENOSYS returns %d, x32 %v)", enosys, x32)
+ }
+}
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..78cc7a56f 100644
--- a/internal/instanceexec/probe_rootfs.go
+++ b/internal/instanceexec/probe_rootfs.go
@@ -33,6 +33,12 @@ 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_GETADDR dump, netlinkOpen opens one netlink socket of a protocol.
+ scopeNetlink func() error
+ netlinkDump func() error
+ netlinkOpen func(proto int) error
}
// The mounts an image root may have (mountsAllowlisted). Every mount
@@ -73,6 +79,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 +127,30 @@ 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 two lines: getifaddrs's dump works over
+// NETLINK_ROUTE, 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.Sprintf("RTM_GETADDR dump: %v", 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)
+}
+
// 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..ab5c50c5d 100644
--- a/internal/instanceexec/probe_rootfs_linux.go
+++ b/internal/instanceexec/probe_rootfs_linux.go
@@ -27,6 +27,9 @@ func productionRootfsProbeEnv() rootfsProbeEnv {
cgroupRoot: cgroupMountpoint,
ownerUID: lstatUID,
mkfile: createThenRemove,
+ scopeNetlink: ScopeNetlinkRoute,
+ netlinkDump: netlinkAddrDump,
+ netlinkOpen: netlinkSocketOpen,
}
}
diff --git a/internal/instanceexec/probe_rootfs_other.go b/internal/instanceexec/probe_rootfs_other.go
index b9af0b665..5b07ad748 100644
--- a/internal/instanceexec/probe_rootfs_other.go
+++ b/internal/instanceexec/probe_rootfs_other.go
@@ -18,5 +18,8 @@ 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 },
}
}
diff --git a/internal/instanceexec/probe_rootfs_test.go b/internal/instanceexec/probe_rootfs_test.go
index 864b84c4b..d326ddce0 100644
--- a/internal/instanceexec/probe_rootfs_test.go
+++ b/internal/instanceexec/probe_rootfs_test.go
@@ -111,6 +111,16 @@ 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 },
+ 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 +204,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"} {
if v := verdict(r, c); v != "ok" {
t.Errorf("%s = %s: %s", c, v, detail(r, c))
}
@@ -695,3 +706,47 @@ 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 syscall.EAFNOSUPPORT } }, "netlink-route", "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"},
+ }
+ 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..34467c0d1 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 4048988d196e11420812abdf8dd7686c0e20b3eebb290f8c15ef0c419099fd64
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..73f00f2a0
--- /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 74a87e7144a37a8fcc2b81dee92b1ba1f65c16611aff2820ffcb129b166f9e42 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 file:external@0 f9386489aea37bfe41f7fd37a60024bb4eb30a78f3f5ce0ebce2aeee6ebadd4d
+@legacy 430f8d7acb19d66406d1d81638811f82151f10a2b08034f92197f584c3230de6 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 file:external@0 89ab602b24b8429b55b8fdda53f6d5f2392b96b32912b47bd799c722ab211332
+@legacy 6adcd0c61352bfe01df171a3143d9943b46da51dfb5b611456d6e005a118028e 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 file:external@0 851de49c196f7f2d0e8c87f73781b0b8d4d9449e32b53d5680503398717404b0
+@legacy 0b4adf629bb1fd1dcc6af1edc6d3632b4ef8dc6be7392e6776a1a118cadefe2d 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 file:external@0 b0f07d655ec7328600b8e7f594cd84aa902557bd83bb88aa40d3f6d3b51726a2
+@legacy 7d2c66fea7dd4c7ebaf961ffb14df0b31792820454a105dfc010ea97ee8e1b69 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 file:external@0 7e62b7af07f10d697412a83a8fa47259c114648473a6735962cbcd2a0480ba9d
+@legacy 58306718bfa29365f969e88061944508bd124f6b76d9e4ce01e09ee23cc32e5f 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 file:external@0 ce9a4f051788921acad19eee2e1c288dd510ee6680d4abc4a10808f365bde04f
+@legacy 022279fbb7015aa8fdfb79b4c3038a209e7abfe83f23d281b072807509daf124 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 file:Syscall@489 314913d060abbb2718e5e95ad73caecfe6254584eb7c1f00482abc95623b2aea
+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 file:external@0 f9386489aea37bfe41f7fd37a60024bb4eb30a78f3f5ce0ebce2aeee6ebadd4d
+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 file:external@0 89ab602b24b8429b55b8fdda53f6d5f2392b96b32912b47bd799c722ab211332
+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 file:external@0 851de49c196f7f2d0e8c87f73781b0b8d4d9449e32b53d5680503398717404b0
+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 file:external@0 b0f07d655ec7328600b8e7f594cd84aa902557bd83bb88aa40d3f6d3b51726a2
+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 file:external@0 7e62b7af07f10d697412a83a8fa47259c114648473a6735962cbcd2a0480ba9d
+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 file:external@0 ce9a4f051788921acad19eee2e1c288dd510ee6680d4abc4a10808f365bde04f
+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 file:Syscall@489 314913d060abbb2718e5e95ad73caecfe6254584eb7c1f00482abc95623b2aea
+@coverage internal/host/units 4bc973ae33dae9b688ef0ec444b5a4a27f9144050dd0c2ae86b3669bfb0ae415
+@coverage internal/instanceexec 919420f7ef9a48cef00225a032d7038ef1527fc50445c1ed21516dc0763a3aac