Commit Graph
1 Commits
Author SHA1 Message Date
Joseph MaglyandClaude Opus 5.5 5e451b7a92 fix(mcp): fail closed on interpreters whose loader the sandbox can't mount
The MCP worker sandbox mounts interpreter libraries from standard (FHS)
locations only. A Nix-built interpreter's dynamic loader lives under
/nix/store, so bubblewrap failed with an opaque execvp error.

- New obliteratus/mcp_runtime_layout.py reads the interpreter's ELF
  PT_INTERP loader with a bounded program-header parse; malformed or
  non-ELF binaries fail closed.
- _runtime_paths refuses with "unsupported interpreter layout" when the
  loader isn't among the mounted paths; FHS and static interpreters are
  unchanged. runtime_layout_supported() reports the reason.
- The real bubblewrap boundary test skips with that reason on
  unsupported layouts, as it already does without bubblewrap; on FHS
  interpreters it still runs. Mount-construction and supervisor tests
  no longer depend on the host loader layout.
- Unit tests cover real and synthetic ELF loaders, static binaries,
  non-ELF and truncated input, refusal and acceptance.

Full non-FHS support (mounting the runtime closure) is tracked in #521.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-17 12:16:36 -05:00