[BUG] Boot source retirement omits explicit GLOBAL translation invalidation #38

Open
opened 2026-09-23 17:50:46 +02:00 by erikinkinen · 0 comments
Owner

Summary

Boot-source retirement changed retained and removable page-table leaves, then relied on a CR3 reload without explicit address invalidation. Under GLOBAL/PGE cache assumptions, that reload need not withdraw the previous translation. The correction invalidates every changed address before the existing final synchronization. Complete preflight, error ordering and the root-only no-input retirement contract remain unchanged.

Reproduction

At signed Kernel 04f7365c993df61e2982ca1329e03b0e68fb8187, four controlled host tests execute complete extracted production retirement and alignment function bodies, preserving every statement and adapting only native/host cfg selection. Independent boxed entries receive actual volatile PTE stores. A separate architectural cache model preserves GLOBAL translations across CR3 reload. Removed-GLOBAL and retained-GLOBAL assertions fail; non-global removal and missing-second-page preflight controls pass. The single original execution returns status 101 with two passes and two failures. Original source hashes, output streams and status are retained without an unchanged failing-input retry.

This is a controlled cache-model reproduction. Original native execution, ordinary boot GLOBAL/PGE reachability and a user-visible authority exploit are not established. The reviewed bootloader page builder does not set GLOBAL on its ordinary leaves. Intel SDM Volume 3A section 4.10.4.1 specifies the relevant minimum invalidation guarantees; hardware may also discard additional cached translations. An original native pass would therefore not prove the omitted invalidation correct. Primary specification.

Expected and actual behavior

Successful retirement must invalidate every changed address before exclusion ends. Retained backing loses USER access; removable backing becomes absent. In the original controlled model, PTE storage changes correctly but prior GLOBAL access remains cached. Explicit address invalidation now covers both loops. Whole-set preparation refusal leaves requested mappings unchanged. Existing final CR3 synchronization remains in place; no allocation, fallible commit operation, caller selector or grant is added.

Environment and identity

Linux x86_64 and Rust 1.97.1; original signed Kernel 04f7365c993df61e2982ca1329e03b0e68fb8187. The original fixture substitutes host table storage, exclusion and cache operations, so it is not an original guest exploit. Corrected native execution uses the maintained early one-CPU mapping scenario, explicitly enabled PGE, excluded interrupts and its original 60-second limit. Scratch backing remains exclusively owned until exact alias restoration.

Evidence and prior checks

All four corrected production-body cache controls and three existing boot-blob host controls pass. Four full strict Kernel configurations pass 872/896 tests with three existing ignored cases. Sixteen native build/Clippy selections, formatting and host/native private rustdoc pass without warnings. The initial new-probe needless_range_loop Clippy failure is retained and corrected with iterator/enumerate, without suppression.

The native probe primes two real GLOBAL aliases. Retained-source retirement is observed through a hardware accessed-bit refill; removable-source retirement is followed by absent-leaf installation of distinct retained backing and a replacement-pattern read. No intervening helper invalidates the observed alias. It restores every original entry before freeing any backing and only then emits BOOT_SOURCE_INVALIDATION_OK. Both maintained mapping contracts require this ordered unique marker and all prior witnesses. The fixture creates no capabilities or process roots.

All 172 Integration helpers pass. Unchanged Integration crate sources retain their strict orchestration 320/321-test matrices and profiler five-test dev/release matrices, Clippy and private rustdoc. Six exact-source native executions satisfy seven maintained contracts, including both allocator scenarios and ordinary exec-successor across 73 components. Source signatures and packaged artifacts verify without image warnings or QEMU stderr. Every prior grant, marker and deadline remains required. The manual passes 45 tests and complete 2,437-page generation; all 453,040 word bounds and changed rendered pages are reviewed without final warnings or overflow.

Integration regression acceptance remains open. Coherent retirement of all private roots and the supervisor baseline, actual root activation and complete external toolchain/EriX guest rebuilding remain open.

Tracking

Related owned address-space design, Kernel review, Integration review, manual review, corrected catalog and Phase 6 completion.

## Summary Boot-source retirement changed retained and removable page-table leaves, then relied on a CR3 reload without explicit address invalidation. Under GLOBAL/PGE cache assumptions, that reload need not withdraw the previous translation. The [correction](https://git.erikinkinen.fi/erix/kernel/commit/ebe06e860ddb9f2a7f931ef06664c3f06f9ceef2) invalidates every changed address before the existing final synchronization. Complete preflight, error ordering and the root-only no-input retirement contract remain unchanged. ## Reproduction At signed Kernel `04f7365c993df61e2982ca1329e03b0e68fb8187`, four controlled host tests execute complete extracted production retirement and alignment function bodies, preserving every statement and adapting only native/host cfg selection. Independent boxed entries receive actual volatile PTE stores. A separate architectural cache model preserves GLOBAL translations across CR3 reload. Removed-GLOBAL and retained-GLOBAL assertions fail; non-global removal and missing-second-page preflight controls pass. The single original execution returns status 101 with two passes and two failures. Original source hashes, output streams and status are retained without an unchanged failing-input retry. This is a controlled cache-model reproduction. Original native execution, ordinary boot GLOBAL/PGE reachability and a user-visible authority exploit are not established. The reviewed bootloader page builder does not set GLOBAL on its ordinary leaves. Intel SDM Volume 3A section 4.10.4.1 specifies the relevant minimum invalidation guarantees; hardware may also discard additional cached translations. An original native pass would therefore not prove the omitted invalidation correct. [Primary specification](https://cdrdv2-public.intel.com/671190/253668-sdm-vol-3a.pdf). ## Expected and actual behavior Successful retirement must invalidate every changed address before exclusion ends. Retained backing loses USER access; removable backing becomes absent. In the original controlled model, PTE storage changes correctly but prior GLOBAL access remains cached. Explicit address invalidation now covers both loops. Whole-set preparation refusal leaves requested mappings unchanged. Existing final CR3 synchronization remains in place; no allocation, fallible commit operation, caller selector or grant is added. ## Environment and identity Linux x86_64 and Rust 1.97.1; original signed Kernel `04f7365c993df61e2982ca1329e03b0e68fb8187`. The original fixture substitutes host table storage, exclusion and cache operations, so it is not an original guest exploit. Corrected native execution uses the maintained early one-CPU mapping scenario, explicitly enabled PGE, excluded interrupts and its original 60-second limit. Scratch backing remains exclusively owned until exact alias restoration. ## Evidence and prior checks All four corrected production-body cache controls and three existing boot-blob host controls pass. Four full strict Kernel configurations pass 872/896 tests with three existing ignored cases. Sixteen native build/Clippy selections, formatting and host/native private rustdoc pass without warnings. The initial new-probe needless_range_loop Clippy failure is retained and corrected with iterator/enumerate, without suppression. The native probe primes two real GLOBAL aliases. Retained-source retirement is observed through a hardware accessed-bit refill; removable-source retirement is followed by absent-leaf installation of distinct retained backing and a replacement-pattern read. No intervening helper invalidates the observed alias. It restores every original entry before freeing any backing and only then emits BOOT_SOURCE_INVALIDATION_OK. Both maintained mapping contracts require this ordered unique marker and all prior witnesses. The fixture creates no capabilities or process roots. All 172 Integration helpers pass. Unchanged Integration crate sources retain their strict orchestration 320/321-test matrices and profiler five-test dev/release matrices, Clippy and private rustdoc. Six exact-source native executions satisfy seven maintained contracts, including both allocator scenarios and ordinary exec-successor across 73 components. Source signatures and packaged artifacts verify without image warnings or QEMU stderr. Every prior grant, marker and deadline remains required. The [manual](https://git.erikinkinen.fi/erix/docs/commit/aa19d1a20f0bbc45d0ec441bbc9578e4ba39c927) passes 45 tests and complete 2,437-page generation; all 453,040 word bounds and changed rendered pages are reviewed without final warnings or overflow. Integration regression acceptance remains open. Coherent retirement of all private roots and the supervisor baseline, actual root activation and complete external toolchain/EriX guest rebuilding remain 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), [manual review](https://git.erikinkinen.fi/erix/docs/pulls/4), [corrected catalog](https://git.erikinkinen.fi/erix/integration/commit/78e201476232208e2d972810ca9f75cb0b9a70bd) 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:29 +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#38
No description provided.