[BUG] Ancestor promotion expands effective sibling permissions #35

Open
opened 2026-09-23 13:52:20 +02:00 by erikinkinen · 0 comments
Owner

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 added actual_parent_promotion_preserves controls 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

  • Original Kernel: 133cadf99260128d73f74286303fd8f4cfb117aa; Integration: 092f67ae5a528d7c41f34c72dcc087bc0132b3ce.
  • Linux x86_64 host, Rust 1.97.1, strict warnings and original pinned dependency objects.
  • Host controls retain exclusive local table storage and grant no guest endpoint.
  • Corrected native mapping probe: original 60-second scenario, one CPU, explicit TCG and OVMF, original grants and marker contracts plus ordered unique ANCESTOR_ACCESS_PRESERVED.
  • Last known working ancestor-access implementation: not established.

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.

## 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](https://git.erikinkinen.fi/erix/kernel/commit/e4f8436bc32162c70120430f90f1b6327f4f0025) 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 added `actual_parent_promotion_preserves` controls 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 - Original Kernel: `133cadf99260128d73f74286303fd8f4cfb117aa`; Integration: `092f67ae5a528d7c41f34c72dcc087bc0132b3ce`. - Linux x86_64 host, Rust 1.97.1, strict warnings and original pinned dependency objects. - Host controls retain exclusive local table storage and grant no guest endpoint. - Corrected native mapping probe: original 60-second scenario, one CPU, explicit TCG and OVMF, original grants and marker contracts plus ordered unique ANCESTOR_ACCESS_PRESERVED. - Last known working ancestor-access implementation: not established. ## 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](https://git.erikinkinen.fi/erix/kernel/issues/22), [Kernel review](https://git.erikinkinen.fi/erix/kernel/pulls/3), [Integration review](https://git.erikinkinen.fi/erix/integration/pulls/12), [corrected catalog](https://git.erikinkinen.fi/erix/integration/commit/f62574436dc98c95ea6eb5b470baf29cde29b796) and [Phase 6 completion](https://git.erikinkinen.fi/erix/integration/issues/65).
erikinkinen added this to the Alpha 1 milestone 2026-10-30 09:34:28 +01:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
erix/kernel#35
No description provided.