{
 "schema_version": "1.0",
 "page_kind": "article",
 "pack_kind": "generate",
 "slug": "what-a-sandbox-actually-fences",
 "title": "What a sandbox actually fences",
 "dek": "Bubblewrap is the fence many Linux tools put around an AI agent: we pointed hostile code at two fences of our own and wrote down what held, the pieces of kernel state that crossed a namespace anyway, the records that leaked more than the fence did, and the hole in the sandbox tool itself that Ubuntu fixed and then unfixed, with the fix beside each.",
 "published": "2026-11-28",
 "series": [
  "guide"
 ],
 "licence": "CC BY 4.0",
 "status": "pending-judge",
 "pack_note": "no judge is seated, so every chip is held",
 "notice": "items with published:false are held and are not this page's published words",
 "source": {
  "url": "https://research.strata2signal.com/what-a-sandbox-actually-fences/",
  "md_url": "https://research.strata2signal.com/what-a-sandbox-actually-fences/index.md",
  "md_sha": "2ce2322e3dc41c6723d4e6e31ff1dc0fbe792d5693652f978fbe786ed3d5792f",
  "html_sha": "dcd290b6ad539e9e6ed6ad2cf81e56de342df79ae024acb28603bee500dc853b",
  "anchors_sha": "ee17149f12e65d86d95796b5f3833027cb2eb9e57c1c94e5789289152b3a144a"
 },
 "short": {
  "paragraph": "Bubblewrap (bwrap) builds a sandbox out of Linux namespaces, and its own README says it \"is not a complete, ready-made sandbox with a specific security policy\". We built two fences for a local coding model, one for reading our code and one for editing a copy of it, and had our auditing agents attack them with 58 hostile argument shapes and an 80-item battery of hostile code. The namespaces held: nothing escaped the copy, reached the network or wrote outside its scratch. Four things crossed anyway, because they belong to the user or to what a process inherits, not to the namespace: the environment of the sandbox's first process (4,710 bytes of it, our canary included, until bwrap was started with a bare environment: 19 bytes), the session keyring (a planted key was readable inside until the sandbox joined a fresh one), the per-user process count (charged to the user box-wide, with no limit inside until the sandbox set its own) and tmpfs inodes (400,000 empty files in 0.8 seconds, bounded only by the unit's memory cap). The worst leak was outside the fence: a model's text rode into the records we read between sessions, and a forged test pass read as a plain pass. Ubuntu's AppArmor layer was blamed for a failure a read-only /proc had caused. And the installed bwrap on Ubuntu 26.04 carries a setup-time hole, CVE-2026-87766, whose fix Ubuntu published and withdrew within about five hours on 2026-09-17; our fences no longer depend on it. Every attack was written by our own agents and run as stand-in model code; no figure on this page comes from a live model.",
  "from_dek": false,
  "counts": {
   "words": 4289,
   "minutes": 19,
   "tables": 4,
   "kit": false
  },
  "bullets": []
 },
 "sections": [
  {
   "id": "eyes-never-hands",
   "heading": "Eyes, never hands",
   "level": 2,
   "span": [
    3086,
    3794
   ],
   "chunks": [
    [
     3086,
     3794
    ]
   ],
   "chars": 708,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "what-bubblewrap-gives-you",
   "heading": "What bubblewrap gives you",
   "level": 2,
   "span": [
    3794,
    5893
   ],
   "chunks": [
    [
     3794,
     5893
    ]
   ],
   "chars": 2099,
   "digest": "bubblewrap uses linux namespaces to isolate programs. the user namespace allows unprivileged programs to build mount tables. the text describes how various namespaces hide system state and how specific flags like --clearenv and --as-pid-1 affect the sandbox.",
   "digest_skipped": null
  },
  {
   "id": "what-crosses-a-namespace-anyway",
   "heading": "What crosses a namespace anyway",
   "level": 2,
   "span": [
    5893,
    9523
   ],
   "chunks": [
    [
     5893,
     9523
    ]
   ],
   "chars": 3630,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "ubuntus-apparmor-layer",
   "heading": "Ubuntu's AppArmor layer",
   "level": 2,
   "span": [
    9523,
    11330
   ],
   "chunks": [
    [
     9523,
     11330
    ]
   ],
   "chars": 1807,
   "digest": "ubuntu restricts unprivileged user namespaces through AppArmor. the text describes how AppArmor profiles affect bubblewrap and notes that a read-only /proc caused a CUDA failure, which was not caused by the AppArmor profile itself.",
   "digest_skipped": null
  },
  {
   "id": "the-read-only-root-that-broke-cuda",
   "heading": "The read-only root that broke CUDA",
   "level": 2,
   "span": [
    11330,
    13079
   ],
   "chunks": [
    [
     11330,
     13079
    ]
   ],
   "chars": 1749,
   "digest": "a read-only root using --ro-bind / / caused cuInit to return 304, CUDA_ERROR_OPERATING_SYSTEM. the text provides a grid showing that a writable /proc fixes this, while a writable /sys does not, and notes that the engine fence works with stock bwrap.",
   "digest_skipped": null
  },
  {
   "id": "the-tools-inside-the-fence",
   "heading": "The tools inside the fence",
   "level": 2,
   "span": [
    13079,
    14619
   ],
   "chunks": [
    [
     13079,
     14619
    ]
   ],
   "chars": 1540,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "the-paperwork-leaks",
   "heading": "The paperwork leaks",
   "level": 2,
   "span": [
    14619,
    16879
   ],
   "chunks": [
    [
     14619,
     16879
    ]
   ],
   "chars": 2260,
   "digest": "the text identifies three leaks in the sandbox loop: model text entering operational records, deeply nested replies crashing the record writer, and model code forging a pass. fixes include using enums, bounding strings, and requiring a strong-model read of diffs.",
   "digest_skipped": null
  },
  {
   "id": "hands-in-a-throwaway-copy",
   "heading": "Hands, in a throwaway copy",
   "level": 2,
   "span": [
    16879,
    18628
   ],
   "chunks": [
    [
     16879,
     18628
    ]
   ],
   "chars": 1749,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "the-hole-in-the-sandbox-tool-itself",
   "heading": "The hole in the sandbox tool itself",
   "level": 2,
   "span": [
    18628,
    22460
   ],
   "chunks": [
    [
     18628,
     22460
    ]
   ],
   "chars": 3832,
   "digest": "CVE-2026-87766 involves bubblewrap following symlinks during setup, allowing host file creation. the text describes how the authors mitigated this by refusing destinations beneath host binds or links, ensuring the fences do not depend on the box's bwrap being fixed.",
   "digest_skipped": null
  },
  {
   "id": "check-your-own-fence",
   "heading": "Check your own fence",
   "level": 2,
   "span": [
    22460,
    23799
   ],
   "chunks": [
    [
     22460,
     23799
    ]
   ],
   "chars": 1339,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "what-this-cannot-say",
   "heading": "What this cannot say",
   "level": 2,
   "span": [
    23799,
    24935
   ],
   "chunks": [
    [
     23799,
     24935
    ]
   ],
   "chars": 1136,
   "digest": null,
   "digest_skipped": null
  },
  {
   "id": "who-ran-this-and-thanks",
   "heading": "Who ran this, and thanks",
   "level": 2,
   "span": [
    24935,
    25794
   ],
   "chunks": [
    [
     24935,
     25794
    ]
   ],
   "chars": 859,
   "digest": null,
   "digest_skipped": "credits"
  },
  {
   "id": "sources",
   "heading": "Sources",
   "level": 2,
   "span": [
    25794,
    31131
   ],
   "chunks": [
    [
     25794,
     31131
    ]
   ],
   "chars": 5337,
   "digest": "the sources section lists the documentation, software versions, and records used to compile the article, including linux man-pages, git, systemd, and the cuda driver api.",
   "digest_skipped": null
  }
 ],
 "chips": [
  {
   "id": "c-9aa5500f",
   "q": "how do the eyes and hands fences differ in purpose?",
   "a": "The eyes fence provides a read-only snapshot of a repository for findings, while the hands fence allows a model to edit a throwaway copy of an app and run tests. Both serve as measurement tools rather than tools for making changes.",
   "cites": [
    "eyes-never-hands"
   ],
   "published": false,
   "publish_state": "held",
   "quote": "",
   "quote_cite": ""
  },
  {
   "id": "c-6c42be87",
   "q": "what caused cuda initialization to fail in the engine fence?",
   "a": "The failure was caused by a read-only /proc filesystem resulting from a recursive bind. While device files were writable, the cuInit call returned 304, CUDA_ERROR_OPERATING_SYSTEM, because an OS call failed.",
   "cites": [
    "the-read-only-root-that-broke-cuda"
   ],
   "published": false,
   "publish_state": "held",
   "quote": "",
   "quote_cite": ""
  },
  {
   "id": "c-b49464f4",
   "q": "how did the audit address potential git command escapes?",
   "a": "The audit found that certain git configurations could trigger external programs. The fix involved using --submodule=short on diffing verbs and pinning several git configurations, such as core.hooksPath=/dev/null, to prevent unauthorized execution.",
   "cites": [
    "the-tools-inside-the-fence"
   ],
   "published": false,
   "publish_state": "held",
   "quote": "",
   "quote_cite": ""
  },
  {
   "id": "c-cba965cd",
   "q": "what risks exist when reading model output in operational records?",
   "a": "Model text can leak into operational files, potentially including prompt-injection paths or causing crashes through deeply nested replies. Fixes include using enums and counts in records and bounding strings to prevent recursion errors.",
   "cites": [
    "the-paperwork-leaks"
   ],
   "published": false,
   "publish_state": "held",
   "quote": "",
   "quote_cite": ""
  }
 ],
 "related": [
  {
   "slug": "why-our-deepseek-night-measured-nothing",
   "why": "shares ground with § The read-only root that broke CUDA · § The bisection"
  },
  {
   "slug": "when-a-model-does-not-fit-in-plain-words",
   "why": "shares ground with § The paperwork leaks · § What pushes a model off the card"
  },
  {
   "slug": "mixture-of-experts-in-plain-words",
   "why": "shares ground with § The paperwork leaks · § Two numbers on every model card"
  }
 ],
 "thanks": "## Who ran this, and thanks {#who-ran-this-and-thanks}\n\nThanks to the bubblewrap project, to Ubuntu's security team and the AppArmor project, to the Linux kernel's maintainers and the writers of its manual pages, to the systemd and git projects, and to NVIDIA for the CUDA driver. Software this page stood on: Ubuntu 26.04.1 LTS's stock `bwrap` 0.11.1 (package 0.11.1-1ubuntu0.3) and its `bwrap-userns-restrict` profile, systemd 259, git 2.53.0, Python 3 and the CUDA 13.4 toolkit's header. The manuals quoted are the online ones, which describe newer versions than this laptop runs: Linux man-pages 6.19, systemd 262 and git 2.56.0. A small human team ruled on each fence and each fold and ran the card probes on the server by hand; a fleet of AI agents built the fences, wrote the attacks, kept the records and drafted this page under that team's rulings.",
 "kit": null,
 "seat_class": {
  "writer": "gemma-class",
  "judge": null,
  "writer_runtime": "vllm"
 },
 "bench": {
  "bullets_written": 3,
  "bullets_kept": 0,
  "digests_written": 12,
  "digests_kept": 6,
  "chips_written": 8,
  "chips_kept": 4,
  "chips_grounded": 0,
  "chips_published": 0,
  "dropped_by": {
   "new_noun": 0,
   "figure": 1,
   "length": 0,
   "cite": 0,
   "judge": 0,
   "quote": 0,
   "directive": 0,
   "redaction": 1,
   "profanity": 0,
   "identifier": 0,
   "bare_figure": 0,
   "house_voice": 0,
   "editorial": 0,
   "hand-edit": 11
  },
  "new_noun_tokens_checked": [
   "0",
   "1's",
   "304",
   "4",
   "6000",
   "710",
   "96",
   "AppArmor",
   "CUDA",
   "CUDAERROROPERATINGSYSTEM",
   "CVE-2026-87766",
   "Edition",
   "GB",
   "IPC",
   "Linux",
   "NVIDIA",
   "OS",
   "PRO",
   "RTX",
   "V",
   "Workstation",
   "as-pid-1"
  ],
  "new_noun_tokens_withheld": 1,
  "figure_definition": "v3",
  "figure_boundary": "guarded",
  "drops": [
   {
    "kind": "bullet",
    "reason": "redaction",
    "item": null,
    "item_chars": 87,
    "withheld": "a string carrying a fenced literal",
    "detail": ""
   },
   {
    "kind": "bullet",
    "reason": "figure",
    "item": "the probe's walk found writable directories in 0",
    "detail": "terminal token carries no figure"
   },
   {
    "kind": "bullet",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 63,
    "text_sha": "0269220783ce",
    "figure": "4,710",
    "withheld": "one bullet removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "until bwrap was started with a bare environment: 19 bytes",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: until bwrap was started with a bare environment: 19 bytes. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 246,
    "text_sha": "64e2276ef96a",
    "section": "eyes-never-hands",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "That measurement is not this page's subject.",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: That measurement is not this page's subject. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 262,
    "text_sha": "f79a286321bc",
    "section": "what-crosses-a-namespace-anyway",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Unchanged; bounded by the unit, not the sandbox",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Unchanged; bounded by the unit, not the sandbox. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 258,
    "text_sha": "e6663a7fa096",
    "section": "the-tools-inside-the-fence",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "on every diffing verb; the belt now also pins",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: on every diffing verb; the belt now also pins. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 215,
    "text_sha": "a111e7bc3779",
    "section": "hands-in-a-throwaway-copy",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Regular files in the task's allowed folders of the copy",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Regular files in the task's allowed folders of the copy. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 203,
    "text_sha": "051b1550a3ae",
    "section": "check-your-own-fence",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Read pid 1's environment: refused, or a few bytes with nothing of yours in them.",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Read pid 1's environment: refused, or a few bytes with nothing of yours in them. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "digest",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 226,
    "text_sha": "748c43b9d50f",
    "section": "what-this-cannot-say",
    "withheld": "one section digest removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Every attack was written by our auditing agents and run as stand-in model code.",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Every attack was written by our auditing agents and run as stand-in model code. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "chip",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 268,
    "text_sha": "593f99f79dc1",
    "chip_id": "c-a815abe8",
    "withheld": "one chip removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Not probed; set for completeness",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Not probed; set for completeness. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "chip",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 265,
    "text_sha": "137a54ff4cd4",
    "chip_id": "c-621d8ac5",
    "withheld": "one chip removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Table 2 is what our audits found crossing, with the fix and the measurement after it",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Table 2 is what our audits found crossing, with the fix and the measurement after it. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "chip",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 244,
    "text_sha": "ded0db778234",
    "chip_id": "c-883f8ed1",
    "withheld": "one chip removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "What that breaks, by our reading, is a sandbox inside a sandbox",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: What that breaks, by our reading, is a sandbox inside a sandbox. Not a gate drop, and recorded here so the ledger adds up."
   },
   {
    "kind": "chip",
    "reason": "hand-edit",
    "item": null,
    "item_chars": 257,
    "text_sha": "209247cddf9f",
    "chip_id": "c-be4b28a8",
    "withheld": "one chip removed from this pack by hand",
    "removed_utc": "2026-11-24",
    "why": "Upstream fixed it in 0.12.0 on 2026-08-26",
    "detail": "removed from this pack by hand on 2026-11-24 (UTC), after the writer ran and after the gates had counted: Upstream fixed it in 0.12.0 on 2026-08-26. Not a gate drop, and recorded here so the ledger adds up."
   }
  ]
 },
 "generated_utc": "2026-11-24T17:48:40Z"
}
