[BUG] Ordinary mappings can replace the supervisor local-controller alias #40
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#40
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 former low LAPIC alias overlapped the ordinary user mapping domain. A Kernel controller consumer interpreted the physical APIC base as a virtual pointer, so an otherwise admitted mapping could replace the backing used by that consumer. The coordinated correction is natively validated and published.
Reproduction
An original host control admits and cleans up a managed-frame mapping at the former alias. A separate single-CPU native diagnostic observes the supervisor leaf, activates owned RAM there, restores the exact original leaf and disposes all temporary CSpace, VSpace and table owners before its intentional failure. It keeps interrupts masked and does not access MMIO through the replaced alias. The original failed execution is retained without retry.
Expected and actual behavior
Expected: ordinary mapping authority must not replace an address used by a privileged controller consumer. Observed: the original supervisor leaf changes from controller backing to owned RAM and restores exactly. This confirms leaf replacement, not an original CPL3 exploit or actual device access. The correction prepares one permanent supervisor Kernel-image alias before APs and baseline capture, validates enabled xAPIC mode, physical identity and strong-UC PAT policy, and gives each fixed-register view short CPU-local interrupt/table custody. The view is neither Send nor Sync. Bootloader removes its low IOAPIC/LAPIC aliases and masks interrupts before final CR3. Former low addresses remain available for ordinary RAM; no arbitrary user-domain exclusion is introduced.
Environment and identity
Original producer/consumer graph: Kernel
ba0ed5b2ccand Bootloader acc1e734f79366e965b7ab7cd41496afddc6b1fe. Corrected executable graph: Kernel6908d2ec82, Bootloader ec00005c324ae05dc6f2faf57c496185d297726b, Integration dcaa6df2e5ad30b7cf6313c880c6c8d51b47096f. Native x86-64 QEMU/OVMF; original 60/120-second scenario limits.Evidence and prior checks
The strengthened lifetime contract denies the exact high controller alias from real CPL3, maps ordinary RAM at the former low address, reads the actual controller ID and verifies shared/private supervisor leaves through protection, unmap and grant disposal. Every earlier capability grant, witness and cleanup condition remains required. The corrected graph passes four SMP profiles plus seven maintained mapping, lifetime, invocation, allocator and ordinary exec-successor contracts across ten actual native executions. Mapping/isolation and sparse use their identical runtime capture with both original marker contracts. All original limits remain required. Source signatures and original normally stripped packaged Kernels verify; image warnings and QEMU stderr are absent. Four strict Kernel configurations pass 914/938 tests with three existing ignored cases, and eighteen native build/binary Clippy profiles and private rustdoc pass without warnings. Bootloader passes all four host/UEFI configurations with 34 unit and seven standalone tests, signing controls and four Python fixture suites. Integration retains all 172 helper and 100 Rust crate/fixture inputs from their complete validation. The complete manual passes 45 tests and 2,445 pages without final warnings or overflow.
Tracking
The validated coordinated changes are published in Kernel, Bootloader, Integration and the manual. Owning Kernel PR 3, Bootloader PR 3, Integration PR 12, owned address-space work and Phase 6 completion retain the broader acceptance work. Publication CI at 2026-09-24T12:49:44.573423+00:00: bootloader: 144 success, 143 success; kernel: 697 success, 696 success; docs: 1058 success, 1057 success; integration: 1778 waiting, 1777 waiting. Complete successful bootloader/kernel/docs logs retained and reviewed: 12 logs, 1,848,864 bytes, zero final warnings. Initial TeX reference warnings precede clean final passes. Original failed inputs have not been rerun; the open startup-silence report is unaffected. Full Integration regression review remains pending; keep this report open until that evidence is complete. No merge, release, performance improvement or full guest-build acceptance is claimed.
erikinkinen referenced this issue2026-09-24 14:43:13 +02:00
erikinkinen referenced this issue2026-09-24 14:43:18 +02:00
erikinkinen referenced this issue from erix/bootloader2026-09-24 14:43:22 +02:00
erikinkinen referenced this issue from erix/integration2026-09-24 14:43:31 +02:00
erikinkinen referenced this issue from erix/docs2026-09-24 14:43:40 +02:00