edge: say why /purge caller binding is no boundary on the flat tier
Hunt H2-M4. Only a flat tenant can reach another host's control socket, and a flat tenant already shares the agent's uid, pid namespace and delegated cgroup: it can rewrite a sibling's database and token, signal it, and join its cgroup. A bearer or peer-cgroup check on /purge would not stop it. Comment only; the fix is no co-located flat tenants (H2-M6).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 file changed,
+15
−1
internal/edge/purge.go+15 −1
diff --git a/internal/edge/purge.go b/internal/edge/purge.go| index df9927d74..a1747751e 100644 |
| --- a/internal/edge/purge.go |
| +++ b/internal/edge/purge.go |
| @@ -109,7 +109,21 @@ const purgeAllPath = "*" |
| // |
| // Purge therefore stays UNAUTHENTICATED, deliberately: every app purging |
| // today does it with a bare POST, an auth requirement would break all of |
| -// them at once, and the blast radius above is bounded to a re-fetch. The |
| +// them at once, and the blast radius above is bounded to a re-fetch. |
| +// |
| +// Hunt H2-M4 (2026-11) asked for caller binding here. It would not be a |
| +// boundary. The only callers that can reach another host's control socket |
| +// are flat tenants: a nested instance's namespace holds its own run |
| +// directory and nothing else of /run/carlos (carlos-instance@.service's |
| +// TemporaryFileSystem= and BindPaths=). A flat tenant already runs as the |
| +// agent's uid in the agent's own pid namespace and delegated cgroup, so it |
| +// can read and rewrite a flat sibling's database and env file (its admin |
| +// token included), signal its processes, rebind its listening socket, and |
| +// move itself into the sibling's cgroup, which defeats a peer-cgroup check |
| +// as well as a bearer. Emptying a sibling's cache is the least of that. |
| +// The fix is to never put two tenants on the flat tier together: nested |
| +// by default, and a fresh row on a nested-default box is never minted flat |
| +// (layoutleg.go, hunt H2-M6). The |
| // verbs mount adds do NOT inherit that: schedule.Mount bearer-gates every |
| // one of them on the host's own CARLOS_ADMIN_TOKEN. |
| // |