[BUG] Boot source retirement omits explicit GLOBAL translation invalidation #38
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#38
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
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.
erikinkinen referenced this issue2026-09-23 17:50:51 +02:00
erikinkinen referenced this issue from erix/integration2026-09-23 17:51:00 +02:00
erikinkinen referenced this issue from erix/docs2026-09-23 17:51:05 +02:00