Skip to content

feat(linux): add execution boundary and containment lab - #14

Merged
stacknil merged 2 commits into
mainfrom
stacknil/linux-execution-boundary
Oct 31, 2026
Merged

stacknil merged 2 commits into
mainfrom
stacknil/linux-execution-boundary

Conversation

@stacknil

@stacknil stacknil commented Oct 29, 2026 •

Copy link
Copy Markdown
Owner

Problem

A successful spawn, numeric PID or process-group kill does not establish a successful exec or complete descendant containment. This standalone C++20 lab exercises those distinctions with bounded, locally compiled synthetic fixtures.

Invariant

Reports separate attempted setup, acknowledged controls and observed outcomes. Strict unsupported whole-tree requests refuse before fork. No production sandbox, EDR or arbitrary-tree containment guarantee is claimed.

Design decision

Use gated fork/execveat, pidfd tracking and exact waiting, a post-exec fixture witness, monotonic deadlines and cancellation, bounded nonblocking output capture, and observed child reaping. Process-group cleanup covers cooperating descendants under documented exclusive-supervisor preconditions. Resource limits, conditional Landlock and a narrow seccomp experiment remain independently reported. A separate Python oracle checks manifests and rejects false claims.

Threat and failure model

Tests cover synthetic launch failures, races, resource failures, inherited descriptors, interrupted cleanup and contradictory reports. Fixed fixtures run under external watchdog/resource bounds. Detached descendants are not executed without verified secondary containment.

Rejected alternatives

  • Numeric PID retargeting: cannot preserve identity after reaping.
  • Treating successful group termination as whole-tree containment: descendants can change session.
  • Treating supported kernel features as installed controls: actual setup confirmation is required.

Compatibility

The four existing saved-evidence labs and their contracts remain unchanged. The original signed contribution is 66f5afe. Scoped hosted CI is the separate signed DCO commit a496df7; the original commit and all 23 accepted files are unchanged.

Validation

Independent source and fresh native Linux reviews accepted the local core with documented limits:

  • GCC CTest: 2/2.
  • Clang CTest: 2/2.
  • ASan/UBSan CTest: 2/2.
  • Negative controls: 21/21 rejected.
  • Native Landlock ABI 7: tested.
  • Cgroup delegation: unavailable.
  • E09 detached descendant: NOT_RUN.
  • Strict whole-tree requests: refused before fork.

Hosted qualification at a496df7:

Ubuntu 24.04 workers reported kernel 7.0.0-1017-azure and Landlock ABI 8 with the full profile exercised. Cgroup delegation was unavailable; E09 remained NOT_RUN; strict whole-tree requests refused. Hosted sanitizer qualification was NOT_RUN; the local ASan/UBSan result above is separate. CTest success does not imply every optional scenario ran.

CI uses read-only contents permission, non-root execution, no sudo or package installation, fixed job/test timeouts and build parallelism 2. Checkout does not retain credentials. Logs disclose actual conditional results. The existing Python CI is unchanged.

Rollback

The lab is isolated under projects/linux-exec-boundary; withdrawing it and its separate scoped workflow leaves the existing lab interfaces intact.

READY_FOR_MERGE_REVIEW after hosted qualification and read-only content/signature/check audit. Kept draft for maintainer review under the boundary-change policy. No unresolved review threads or blocking reviews were present at audit time; no applicable main protection/rules were configured. Merge is not authorized.

Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.com>
Signed-off-by: stacknil <219124580+stacknil@users.noreply.github.com>
@stacknil
stacknil marked this pull request as ready for review October 31, 2026 07:02
@stacknil
stacknil merged commit 7476b92 into main Oct 31, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant