Repository navigation
fix: isolate enclave allocation mount propagation - #9530
Merged
Merged
Conversation
Make the identity-journaled invocation tmpfs private before creating child binds. Verify private propagation during setup and subsequent storage verification. Preserve exact mount identity, accounting limits, and ordinary fail-closed cleanup. Co-authored-by: Copilot App <[email protected]>
Contributor
Documentation PreviewDocumentation has been built for this PR. To view locally:
Built from commit a23ce59 |
Contributor
There was a problem hiding this comment.
Copilot review overview
🔵 Needs a closer look
The kernel isolation change still requires privileged Linux validation, and the version guidance has an unresolved inconsistency.
Review effort: Balanced
Findings: 1
Open (1)
What changed in this PR
Isolates Cloud Hypervisor enclave allocations from shared mount propagation before creating child mounts.
Changes:
- Makes invocation tmpfs mounts private and verifies propagation.
- Adds fail-closed checks, readiness gates, and regression coverage.
- Documents diagnostics and rollout requirements.
| File | Description |
|---|---|
src/enclave/startup-progress.test.ts |
Tests new readiness gates. |
src/cloud-hypervisor/trusted-enclave-storage.ts |
Establishes and verifies private propagation. |
src/cloud-hypervisor/trusted-enclave-storage.test.ts |
Covers ordering and propagation failures. |
src/cloud-hypervisor/mount-topology.ts |
Adds private-mount assertion. |
src/cloud-hypervisor/mount-topology.test.ts |
Tests propagation classifications. |
src/cloud-hypervisor/host-preflight-schema.json |
Registers checks and failure reason. |
src/cloud-hypervisor/enclave-mount-capture.integration.test.ts |
Adds privileged Linux regression scenarios. |
docs/diagnostics/README.md |
Documents diagnostic checks. |
docs/cloud-hypervisor-foundation.md |
Describes isolation design and rollout. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Contributor
✅ Coverage Check PassedOverall Coverage
📁 Per-file Coverage Changes (3 files)
Coverage comparison generated by |
Clarify the requirements for establishing startup progress and the immutability of specific asset versions. Co-authored-by: Copilot Autofix powered by AI <[email protected]>
Contributor
|
✅ Copilot review passed with no inline comments. @lpcox Add the |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Fix the local shared-peer propagation mechanism supported by the v0.28.42 environment-probe run 37566610268: snapshot entries were zero before one wrapper bind, then multiple distinct mount IDs afterward; the allocation root and artifact parent were overlapping shared peers, with outside peers visible.
After creating and durably capturing the role-sized invocation tmpfs, verify its journal identity and run
mount --make-private <allocation-root>before creating any child layout or bind. Verify the same identity again and require exactly one private mount-table entry. Subsequent storage verification checks private propagation on the allocation root, invocation state, runs, rootfs preparation, artifact parent, and sealed snapshot.This breaks the allocation's shared-peer relationship so nested self-binds do not propagate back through overlapping views of the same backing filesystem. It also prevents incoming propagation through that private allocation. The original evidence supports this mechanism but does not prove the complete historical cause or successful end-to-end guest startup.
Scope and safeguards
/,/run, the shared storage parent, another invocation, or whole-host namespace propagation.--make-privateon the new empty domain before any children exist.storage-propagation-setandstorage-propagationchecks in bounded-runtime and bounded-artifacts (179 catalog IDs total), with fixedstorage-mount-propagationreason. Command errors, successful no-op commands, shared/slave/shared-slave/unbindable residue, absent/duplicate entries, or later propagation changes fail closed.Coverage
Deterministic tests cover command ordering and identity verification before mutation, exactly one allocation-scoped propagation command, set/read failures, residual propagation and missing/ambiguous mounts, no child binds after failed verification, readiness blocking in both bounded scopes, and propagation changes on every later checked mount.
The existing opt-in Linux suite now contrasts a minimal unisolated shared-parent baseline with actual fixed production setup beneath private and shared parents. It asserts duplicate distinct IDs in the baseline, private root/artifact-parent and one snapshot mount in fixed production, unchanged parent propagation, and successful ordinary close. All synthetic shared mounts are inside disposable private namespaces. These Linux probes remain opt-in and unverified on this macOS host; no conformance label or live dispatch was applied.
Validation
Rollout
After merge, publish a new release containing this commit and run the authorized release-pinned script-only environment probe. v0.28.42 is immutable and does not contain this fix. A probe that progresses beyond mount capture may expose later previously unattempted gates; this PR does not claim guest boot, gateway readiness, or complete live acceptance.
The pre-existing untracked
docs/research/and intentionally unmerged sharp fix remain untouched. No release, merge, or workflow dispatch was performed.