[BUG] Ancestor promotion expands effective sibling permissions #35
Labels
No labels
alpha-1
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/kernel#35
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
The shared-page-table ancestor helper preserved an inherited NX ceiling but promoted U/S and R/W without propagating those ceilings into existing children. Three independent host controls show that promotion could expand effective sibling access. The validated correction shares one ceiling encoder with unpublished-table editing and preserves every child's original effective U/S, R/W and NX restrictions.
Reproduction
At signed Kernel
133cadf99260128d73f74286303fd8f4cfb117aa, run the three addedactual_parent_promotion_preservescontrols against the unchanged original production helper. The controls own aligned parent/child storage and directly invoke the actual unsafe mutation helper. They independently compare effective access through parent and child before and after promotion, including absent entries, huge/PAT flags, physical backing and global/software bits. All three original controls fail with Cargo status 101 and expanded effective U/S or R/W. Their original source and outputs are retained without an unchanged failing-input retry.This is controlled execution of original production code on exclusive host-owned storage. Original native caller reachability and a practical CPL3 exploit have not been demonstrated. No ext4 CI timeout cause is attributed to this finding.
Expected and actual behavior
Ancestor promotion alone must preserve effective access of every sibling. Only a separately authorized target-leaf edit may broaden access. Present children now inherit absent parent U/S and R/W bits and parent NX; absent children and unrelated child bits remain intact. Active and unpublished mutation use the same encoder.
A read-only parent also controls the recursive child-table alias. The correction temporarily makes that alias writable and invalidates its cached translation before child writes, under the existing table lock, masked interrupts and absence of concurrent userspace. There is no fallible operation or callback in that interval. No CR0.WP disabling, new capability, broad mapping grant or private-root activation is introduced.
Environment and identity
133cadf99260128d73f74286303fd8f4cfb117aa; Integration:092f67ae5a528d7c41f34c72dcc087bc0132b3ce.Evidence and prior checks
The three corrected controls pass. Four strict host configurations pass 854/878 tests with three existing ignored cases; sixteen native binary build and Clippy profiles, formatting and host/native private rustdoc pass without warnings. All 172 Integration helpers pass after fixing the scope of one newly added test assertion; original failed helper output remains retained. Unchanged Rust and profiler sources retain strict validation.
Six corrected native executions satisfy seven maintained contracts: mapping and sparse, lifetime, owned invocation, both allocator checks and ordinary exec-successor across 73 original components. The new native guard snapshots and restores all 512 children, seeds an unselected sibling, caches the read-only recursive alias with CR0.WP enabled and checks actual sibling permissions after the authorized target operation. Complete restoration and GLOBAL invalidation precede backing release. All prior image settings, grants and deadlines remain unchanged. Exact source signatures and retained packaged artifacts verify without image warnings or QEMU stderr.
Integration regression acceptance remains open.
Tracking
Related owned address-space design, Kernel review, Integration review, corrected catalog and Phase 6 completion.
erikinkinen referenced this issue2026-09-23 13:52:24 +02:00
erikinkinen referenced this issue from erix/integration2026-09-23 13:52:28 +02:00
erikinkinen referenced this issue from erix/docs2026-09-23 13:52:30 +02:00