Repository navigation
A slot the firmware was told to boot is not taken for the committed one - #226
Merged
Merged
Conversation
…ne: with no trial on record, boot-success reads the committed slot off the ESP at every boot, and a slot that runs and is not it is recorded as uncommitted, its entries forgotten, and rebooted from once. The earlier release stays bootable for rollback, and a firmware entry set from outside booted it with nothing noticing
DevomB
marked this pull request as ready for review
October 7, 2026 04:04
This was referenced Oct 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
After any applied update the earlier release stays on the disk, bootable: rollback needs it, its kernel is signed, its root verifies. A firmware entry or
BootNextnaming\EFI\kryptik\kryptik-<other>.efi, set from firmware setup or from another system, boots it. boot-success looked at the ESP's committed slot only on a degraded state, so on a normal boot it found no trial, recordedok, and left the entry in place.What that gave someone who can set firmware variables and nothing else: a silent return to a release whose defects have since been fixed, at every boot if
BootOrderwas used. The nextkryptik-update applywould then take the newer, committed slot as its target, and its refusal of a downgrade compares against the older version that runs.Found by reading; not reproduced on a machine. That a firmware boots such an entry is how UEFI works, not something this tree shows.
Based on #224, now in main; the branch merges into main b69b728 without conflict.
The change, in
build/service-scripts/boot-success.sh:uncommitted <slot>, neverok. Its firmware entries are forgotten, the committed slot gets its own, and the machine reboots, once.What it does not do: stop someone who rewrites the ESP itself, since the committed slot's name there is not signed. The signed manifest kept for the clock's floor (#181) could give a second opinion from inside the state partition; that is not built here.
kryptik-updateis unchanged. A person who booted the earlier slot on purpose from the firmware's menu is sent back once; the ways to return to an earlier release arekryptik-update rollbackandkryptik-recover --commit-slotfrom the medium.Tests:
tools/tests/boot-success.shgains the cases (reported, entries forgotten, one reboot, no second, none while the entries cannot be removed, cleared by a boot of the committed slot, an ESP naming nothing or nonsense). A plain boot's expected calls now hold the read of the ESP. No suite boots the other slot without a trial; the update suite in the Distro run is the proof that none of its trials, rollbacks or recoveries is taken for one.Distro run 37350816683 at 4aa080d: every acceptance part green (install, update, production, integrity and zones, inputs, build, boot and desktop). CI green.