Repository navigation
test: add adversarial Root race fuzzer - #748
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 28, 2026, 9:28 AM ET / 13:28 UTC (Revision 8). ClawSweeper reviewWhat this changesAdds a standalone filesystem race harness that drives guarded Root operations against concurrent attacker processes and records sentinel effects and coverage for each seed. Merge readiness⛔ Blocked before merge - 6 items remain Keep this PR open. The adversarial Root race harness is absent from current main and v0.21.1, and its cross-platform campaign evidence supports a distinct contribution. Two previously identified, actionable blockers remain. Priority: P2 Review scores
Verification
How this fits togetherRoot is the package's guarded filesystem interface for paths supplied by applications. This harness sends Root operations through changing filesystem aliases and records whether effects escape the intended boundary or coverage remains incomplete. flowchart LR
A[Operations and seeds] --> B[Race harness]
C[Attacker processes] --> D[Changing filesystem aliases]
B --> E[Guarded Root operations]
D --> E
E --> F[Sentinel snapshots]
F --> G[Strict campaign verdict]
Before merge
Findings
Agent review detailsSecurityNeeds attention: The optional Linux campaign executes an unpinned Rustup installer before generating security proof. Review metrics
Merge-risk optionsMaintainer options:
Copy recommended automerge instructionTechnical reviewBest possible solution: Keep the harness, use a provisioned or version-pinned and verified Linux toolchain, and give each backend a supported strict operation list with separate fail-closed checks for unavailable capabilities. Do we have a high-confidence way to reproduce the issue? Yes, from source: the native-off campaign selects no-clobber move although current main requires a native binding, and the Linux script explicitly executes the downloaded installer. The read-only review did not run either script. Is this the best way to solve the issue? No. The adversarial harness is useful, but its setup must use a trusted toolchain and strict operation selection must reflect backend capabilities. Full review comments:
Overall correctness: patch is incorrect AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 6a22d19228d7. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
Acceptance criteria:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (7 earlier review cycles)
|
c6b4737 to
ac814c2
Compare
Add a reusable adversarial Root race harness with separate attacker processes, exact sentinel identity/content snapshots, per-operation effect counts, configurable seeds and attacker shapes, and quiet/oracle controls. It covers parent aliases, retargeting, directory replacement, hardlinks, type flips, and Root-ancestor swaps. appendCreate uses a unique seed/call basename for every attempt so a success cannot merely reopen an existing file; attackers reclaim these names only inside their restored real directories.
Strict runs fail on observed effects or incomplete coverage. Every selected operation must succeed within each seed, helper-unavailable responses remain incomplete even when mixed with other outcomes, copy results must actually be inspected, and attacker batches must overlap the victim interval. Worker start/shutdown handshakes prevent idle or unjoined attackers from producing a clean verdict.
The optional dwell-scale multiplier varies both hostile-state and restored-directory intervals. Default 1 preserves the original 0–0.4 ms timing; scale 20 explores 0–8 ms intervals to exercise longer guarded paths as well as immediate rejection. The scale is recorded, and the strict gates are unchanged. Incomplete fast-loop campaigns remain incomplete and are retained separately.
The original c1529cb harness commit is preserved. Follow-ups address coverage, oracle integrity, worker shutdown, timing variation, and building the matching Windows native binding. Quiet and deliberate-effect oracle controls and independent Codex review through P2 passed. This harness is independently useful and does not certify every schedule or every filesystem boundary.
Current-head CI is green: 38 passing checks, seven skips. The final harness produced complete 60 x 20-second strict campaigns for the combined hardening candidate on Linux openat2/forced fallback and macOS/Windows. Unsupported recursive-directory capability is separately verified fail-closed; it is never counted as successful recursive coverage.