Research / Security and information flow

P41 · experience · draft

Reach-Completeness: One Bug Class Behind a Campaign of Critical Authority Holes

partial experience Security and information flow

State of the work. The completeness harness, the jail path enumeration and the extern reach declaration are shipped with tests; the hole count and the claim that the harness would have caught the original holes are not backed by a replay.

This is a draft, not peer reviewed. Repository references link to revl at commit 45bec431f.

Planned to be combined with P11 (Confining Undo on a Hostile Filesystem) into a single paper.

Pitch

Almost every critical hole in a capability language's security features had the same shape, a fold that visits one way authority crosses a boundary and misses another, and listing the crossings against the folds in a table turns "did we cover them all" from a review habit into a CI test.

Abstract

We report on an adversarial review campaign over the shipped security features of a typed capability language, run in three waves in late August and early September 2026. The project's notes count roughly 14 critical holes in the 2026-08-31 review passes (design note 414) and roughly 18 across the three waves (roadmap; the two figures are not reconciled). The seven instances the design note lists had one shape: an authority-derivation surface (an approval-class fold, a reach sweep, a resource refusal at a process seam, an install-origin resolver) was keyed on one crossing kind and silently missed an alternate, so a capability was reached but not seen. We describe the class, give the seven instances the design note lists and the closed list in the roadmap, and present the response: a reach-completeness harness that enumerates crossing kinds and authority surfaces, forces every surface to classify every kind as in scope or exempt with a written reason, and asserts each in-scope cell with a differential (the surface's answer must change when the kind is removed). The shipped harness has 6 crossing kinds, 9 surfaces and 35 in-scope cells. We then apply the same lens to two later pieces of work, a filesystem confinement audit that found three path families bypassing a "single choke point", and a series of secret-registry walk defects across five backends. The second has a recurring failure worth reporting: a fix that bounded a walk by depth was itself the disclosure. We state what the harness does not do: it covers only crossing kinds someone already thought of.

Problem and claim

Capability and sandbox systems are usually argued sound by a mediation story: every access goes through a monitor. Audits of such systems keep finding the same defect, that the story names one path and the system has another. In revl the monitors are folds over a composition: the approval class fold, the policy reach, the audit boundary, the untrusted-author sweep, the distribution seam refusal, the taint origin fold. Each was written against the crossing its author had in mind.

The claim is narrow and checkable. (1) The defects found in the 2026-08-31 review waves are instances of one class, and the design note lists seven concrete ones (docs/design/414-reach-completeness.md:11-31). (2) The class is mechanically checkable for the known crossing kinds by a table of kinds against surfaces in which every cell is a decision, and the harness that does this ships as a test file (tests/test_reach_completeness.py; not executed for this draft). (3) The class recurs below the level of crossing kinds, in walks over value shapes, and the same discipline (enumerate, force a decision per cell) is what the later fixes converge on.

We do not claim the harness finds unknown crossing kinds. The design note says so itself: "A crossing kind nobody has thought of is still out of its reach" (docs/design/414-reach-completeness.md:99-103).

Contributions

  1. A statement of the class and a list of its instances from three review waves, each pointing at a fix that is on main (seven in the design note, the landed list at docs/v2.0-roadmap.md:100-120).
  2. The harness design (10 crossing kinds by 7 surfaces, each cell in scope or N/A with a reason) and the shipped version (6 kinds by 9 surfaces) with totality meta-tests and differential in-scope assertions (tests/test_reach_completeness.py:556, :697, :711, :725, :757).
  3. A filesystem confinement case study: a docstring claimed one choke point, an audit found three path families around it plus a check-to-use window, and the fix replaces the claim with an enumeration, PATH_FAMILIES, and a scan test that fails if a mutating syscall is reached by any other route (backends/python/revl_fs_workspace.py:20-60, :246; tests/test_fs_confinement_families.py:89-145).
  4. A reach declaration on externs, extern emission(confined: param), with a diff that flags a confined extern becoming unconfined or moving its bound (src/revl/parser.py:1673, src/revl/audit_diff.py:379-413).
  5. A lower-level instance study: the secret-registry walk defects, lettered (a) to (r) in the roadmap, where the same "walk visits one shape and misses another" appears per backend, including a depth cap that doubled as the confidentiality bound.

Evidence on main

Claimpath:line or testStatusNote
The review found one bug class, about 18 critical holes closed across three wavesdocs/v2.0-roadmap.md:94-100, CHANGELOG.md:343-349shipped (as documentation)The roadmap says "~18" at docs/v2.0-roadmap.md:98; the design note at docs/design/414-reach-completeness.md:5 says "~14" for the 2026-08-31 passes. The changelog lines give the three waves and no count. No per-hole list sums to 18 in the tree
Seven concrete instances of the classdocs/design/414-reach-completeness.md:11-31shipped (as documentation)Includes membership-versus-subset, the spawn seam, the transitive closure, the nested resource, the same-tier seam, the .. forge
Harness exists with 6 crossing kindstests/test_reach_completeness.py:74-81 (CROSSING_KINDS)shippedThe design note proposed 10 kinds (docs/design/414-reach-completeness.md:36-53); the shipped file has 6
9 surfaces, 35 in-scope cellstests/test_reach_completeness.py:556-690shippedCounted from the SURFACES table: 9 entries, 35 IN_SCOPE values out of 54 cells
Totality: each surface classifies every kind; every kind covered; every exemption has a reasontests/test_reach_completeness.py:697, :711, :725shipped
Differential per in-scope celltests/test_reach_completeness.py:757, :778, :796, :820, :833, :881, :997shippedModule docstring states the rule (:30-40)
Fixtures exercise every kindtests/test_reach_completeness.py:953shipped
Three surfaces agree on a shared zootests/test_reach_completeness.py:962shippedIncludes a fix where two surfaces named the same extern in different namespaces
Residual wave from the capstone review, three of four closed in the treedocs/v2.0-roadmap.md:132-148shipped (as documentation)Written as consolidated on 2026-09-10 against the tree
The fourth residual (the WAL writer sees only kind 1) is now closed for free host externsbackends/python/runtime.py:1386-1400, backends/python/replay.py:1556-1566, backends/python/emit.py:2553-2570, tests/test_crash_recovery.py:767shippedThe roadmap paragraph at docs/v2.0-roadmap.md:142-149 still calls it open and predates the fix
Filesystem jail: choke-point claim replaced by an enumerationbackends/python/revl_fs_workspace.py:20-60, :246, :2276shipped (py), partial (ts)
Scan test fails on a mutating syscall reached around a guardtests/test_fs_confinement_families.py:111, :133, :145shipped6 tests in the file
Seven findings, executed escapes as regressionsdocs/v2.0-roadmap.md:1612-1620, tests/test_fs_confinement_escapes.pyshipped (py), partial (ts)The ts tier is "NARROWED, NOT CLOSED" for one finding (node has no *at() syscall). 15 tests in the escapes file
Extern reach declaration and weakening diffsrc/revl/parser.py:1673, src/revl/audit_diff.py:379-413shippedThe roadmap archive row says landed 2026-08-30
Secret-registry walk defects (a) to (r) fixed per backenddocs/v2.0-roadmap.md:1597-1606; backends/rust/test_rust_secret_registry.py; tests/test_seam_leak_gaps_815.pypartialEvery item except (k) is marked fixed. (k) is "FOUND, NOT FIXED" (docs/v2.0-roadmap.md:1599)

Numbers that exist

Paper outline

  1. Introduction: capability systems fail by omission; the monitor that watches one door.
  2. Setting: what a crossing, a surface and a fold are in revl, in one page and one figure.
  3. The campaign and the class: three waves, the seven instances, the common shape.
  4. The harness: kinds, surfaces, cells, totality tests, differential cells. Design-versus-shipped differences stated.
  5. Case study A, the jail: a false "single choke point" claim, three families, the enumeration and the scan test.
  6. Case study B, the secret walks: cycles, depth as disclosure, variant payloads, Map entries, declared shapes. The self-recurrence: a fix note exempted two backends and was wrong for both.
  7. Reach declarations and the weakening diff.
  8. What it does not catch: unknown kinds, and what the review passes still found afterwards.
  9. Related work and lessons.

Threats to validity and limits

Fact-check

Claims in this draft were checked against revl main at commit 45bec431f: 36 checked, 5 corrected.

Cite this draft

@misc{revlp41,
  author       = {Thomas Moussajee},
  title        = {Reach-Completeness: One Bug Class Behind a Campaign of Critical Authority Holes},
  year         = {2026},
  howpublished = {\url{https://inso1337.github.io/revl/research/P41.html}},
  note         = {Research draft, not peer reviewed. Written against revl commit 45bec431f. Licensed CC BY 4.0.}
}

Text licensed CC BY 4.0, author Thomas Moussajee.

← All research drafts