generated from erix/meta
[BUG] Kernel jump argument moves omit their register constraints #6
Labels
No labels
bug
ci
docs
duplicate
enhancement
help wanted
invalid
performance
phase-6
question
refactor
security
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
erix/bootloader#6
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 x86_64
jump_to_kernelassembly assigns its handoff pointer and length to RDI and RSI using sequential moves, while describing those operands and the jump target as arbitrary input registers. The compiler is not told that those moves overwrite registers. A permitted allocation can therefore destroy a later input before it is used.Reproduction
Inspect
src/transition.rsat Bootloadere7fa39357a38c21529cccfd16cf3446eb07e8aa5. The block emitsmov rdi, {handoff_ptr},mov rsi, {handoff_size}andjmp {entry}while all four operands usein(reg). The source contract permits an argument or jump operand to occupy a register overwritten by an earlier instruction.This is an assembly-constraint review finding. No Bootloader VM failure is attributed to it, and no hosted jump or privileged instruction was executed to investigate it.
Expected and actual behavior
Expected: the compiler preserves the independently supplied entry address, stack top, handoff pointer and exact serialized length through the nonreturning transfer. RDI and RSI must contain the existing two argument values at kernel entry.
Actual: the assembly contract omits the destination-register effects of its argument moves. Correctness depends on the compiler choosing a nonconflicting allocation. The current successful boots do not establish correctness for every permitted allocation or future compiler build.
Environment and identity
e7fa39357a38c21529cccfd16cf3446eb07e8aa5.Evidence and prior checks
The finding follows inspection of the concrete initial userspace argument overwrite in Kernel issue 10. Bootloader has the same undeclared sequential-register-write pattern, with an additional live jump-target operand. Bind RDI and RSI explicitly, remove the corresponding moves, inspect the resulting UEFI instructions, and retain full strict checks and actual kernel-ingress VM validation. Keep source-level evidence distinct from an observed VM failure.
Validation checkpoint — 14 September 2026: Signed Bootloader
3a99ba23cad27d7db4b87919425fc44d6e5db71bpasses strict development/release default/all host and UEFI checks, 34 units, seven standalone tests, all four Python suites and private rustdoc. CI 137 and 138 pass with four complete logs and zero warning candidates. Both final Integration7cc0593e101b2e0ca42f24d4fa189dd96cb1455cnative VMs enter the kernel and complete their unchanged oracles with empty stderr. No observed Bootloader failure is attributed to the former register-constraint defect.Tracking
Related: the component authority audit #2, Bootloader PR 3, Integration issue 50 and Kernel issue 10. Correction, signed publication and matching VM evidence remain pending.