fix: honest isolation docs, syscall cap checks, QEMU CI smoke - #92
Open
undivisible wants to merge 2 commits into
Open
fix: honest isolation docs, syscall cap checks, QEMU CI smoke#92undivisible wants to merge 2 commits into
undivisible wants to merge 2 commits into
Conversation
Domains still clone the 4 GiB identity map and run at CPL0. Record that in architecture/README/SCI schema, drop the ghost elf-loader notes, and stop tracking wrangler/QEMU leftover paths.
Wire cap-check on serial and channel syscalls, mint a per-domain cap on SCI load, fail closed on domain-create errors, unpublish CR3 stubs after binding them in the kernel, and run a QEMU smoke plus a pinned inauguration ref in GitHub CI.
Bugbot couldn't run - usage limit reachedBugbot is counted against Cursor usage for this user or team, and this run hit a usage or spend limit. A user or team admin can review and increase usage limits in the Cursor dashboard. (requestId: serverGenReqId_69c8f5c6-953c-4910-9c81-91df6c641268) |
|
Tick the box to add this pull request to the merge queue (same as
|
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.
Stop treating cloned identity maps as isolation, and land the reviewable hardening we can actually verify.
Isolation
iretare still required; this PR does not pretend they exist.cr3_read/cr3_writeinto globals atdomain-initand zeros0x4058/0x4060. Guests remain ring 0, so this is a published-gadget removal, not a privilege boundary.linux-init/ NVMe storage no longer fall back to domain 1 ondomain-createfailure.invoke1(load64(0x4060), ...).Capabilities
sys-write/sys-readrequirecap-serial; channel syscalls requirecap-graph.sys-cap-checkmay only query the caller’s current cap. mint/revoke stay-1.sci-load-fileusesSCI-GUEST-GRANTS, notrealm-grants.sys-writeof addresses below the shared-page window is rejected. Hardening asserts the cap and CR3-unpublish behavior.CI
persist-credentials: false, compiler pinned to2e3bf26(matchesvendor/inauguration),nasm+qemu-system-x86,scripts/check-qemu-smoke.shon the built image.scripts/check-all.shwraps the host gates + QEMU boot + audit hardening.Follow-ups
Verified locally:
check-architecture-boundaries,check-spdp-protocol,check-qemu-smoke,check-audit-fixes,check-qemu-bootagainst the new kernel.Note
Medium Risk
Changes kernel domain switching, published CR3 gadgets, and syscall capability enforcement—security-sensitive paths—though scope is bounded to verifiable gates rather than claiming full isolation.
Overview
This PR stops presenting memory domains as isolation and documents that guests still share a cloned 4 GiB identity map and run at CPL0. It adds the syscall and loader hardening that can be enforced and tested today, plus CI that builds the kernel and runs a QEMU smoke gate.
Domain / CR3:
domain-initbindscr3_read/cr3_writeinto kernel globals and clears the published stubs at0x4058/0x4060. Domain switches and preempt ticks go throughcr3-writeand refreshcurrent-capper domain.linux-initand NVMe storage startup no longer fall back to domain 1 whendomain-createfails.Capabilities: SCI loads mint a cap and bind it to the domain (
sci-bind-domain-cap), validate image bounds, and useSCI-GUEST-GRANTSfor file loads (notrealm-grants).sys-write/sys-readrequirecap-serial; channel syscalls requirecap-graph; guest buffers below the shared-page window are rejected.sys-cap-checkmay only query the caller’s current cap; mint/revoke stay-1. Shellhardeningandcheck-architecture-boundariesassert these behaviors.CI / scripts: Replaces the reusable inauguration workflow with an in-repo kernel job (pinned compiler
2e3bf26,nasm,qemu-system-x86,persist-credentials: false). Addscheck-qemu-smoke.sh,check-all.sh, and optionalKERNEL_BINreuse incheck-qemu-boot.sh. Website CI pins Bun / v86 / wrangler versions.Reviewed by Cursor Bugbot for commit b43ad1c. Configure here.