Repository navigation
Conversation
…eck its kernel Only the install medium said whether Secure Boot checked the kernel. The installed system never did, nor that the firmware was in setup mode, where any program running as root can enrol keys of its own: a machine left with Secure Boot off after a diagnostic boot, or with its keys cleared halfway through an enrolment, looked no different from one that enforces it. secureboot-notice.sh, sourced by sysinit as microcode-notice.sh is, reads the firmware's SetupMode and SecureBoot variables and writes one line to /run/issue.d, which agetty prints above every login prompt: setup mode, Secure Boot off, or no SecureBoot variable at all, said as unknown rather than as off. A release build's line names the step that turns Secure Boot on; a development build's says it is expected, as its key is never enrolled in real firmware, so the line never asks for that key to be. Enforced, there is no line. tools/tests/secureboot-notice.sh holds each case under sh, bash and dash on stand-in variables. In the zones suite the boot's notice matches what the firmware's own variables say, and on variables standing in for an enforced Secure Boot it goes.
This branch has not been deployed
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.
The audit's install-secureboot:7. Only the install medium said whether Secure Boot checked the kernel (
medium-banner.sh). The installed system never did, nor that the firmware was in setup mode, where any program running as root can enrol keys of its own. A machine left with Secure Boot off after a diagnostic boot, or with its keys cleared halfway through an enrolment, looked no different from one that enforces it.build/service-scripts/secureboot-notice.shis sourced by sysinit right aftermicrocode-notice.sh, the same way. It writes one line to/run/issue.d/kryptik-secureboot.issue, which agetty prints above every login prompt:The advice after it comes from
/etc/kryptik-image.json'ssigned_boot:production): "add kryptik-sb.der to the firmware's db and turn Secure Boot on (the guide's section 1)".release-keys.sh).Checks:
tools/tests/secureboot-notice.shcovers every case above under sh, bash and dash, on stand-in efivarfs files and image identities, plus sysinit's. …; secureboot_notice || true. 19 pass, run here.secureboot-noticechecks that the boot's line matches what the firmware's own variables say (its OVMF store is clean, so setup mode). On variables standing in for Secure Boot enforced, the line goes. The boot's own line is then restored.The suites boot mostly with clean OVMF stores, so their serial consoles gain this line above each login prompt. I checked the suites' expectations near the prompt: medium-shell's banner match, update-test's own issue.d file, state-test's prompt ordering, and vm-drive's
login:waits. None matches its text.Base: zbook-batch-4 (#656), whose #620 and #654 also edit sysinit.sh. The
servicesstage-04 step comes after the images' base, so no image is rebuilt. Tectonix: 5808 → 5812, no violations.