Repository navigation
[WIP] [amd64-v6.18.55-generic] Secure Boot: dm-verity platform keyring, lockdown, signed kexec - #299
Draft
eriknordmark wants to merge 4 commits into
Conversation
eriknordmark
force-pushed
the
eve-secureboot-6.18.55
branch
from
October 19, 2026 16:32
bd149df to
6dec8d4
Compare
eriknordmark
force-pushed
the
eve-secureboot-6.18.55
branch
from
October 31, 2026 06:42
6dec8d4 to
8a37442
Compare
eriknordmark
added a commit
to eriknordmark/eve
that referenced
this pull request
Nov 4, 2026
Builds amd64 core (HV=kvm) against the locally built eve-kernel from eriknordmark/eve-kernel eve-secureboot-6.18.55 (lf-edge/eve-kernel#299) until that PR merges. Pinned in kernel-version.mk so the EVE version carries no kernel suffix. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Test build for the two-stage GRUB Secure Boot design on 6.18: dm-verity with root hash signatures checked against the platform keyring (UEFI db), kernel lockdown forced to integrity, and signature-verified kexec. In common.fragment so core, rt and hwe all get them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011spdBMTKxFnMYus9k6gZc6 Signed-off-by: eriknordmark <erik@zededa.com>
PREEMPT_RT turns EFI_DISABLE_RUNTIME on by default, which leaves the rt kernel without the UEFI db certificates in the .platform keyring and without efi-pstore. Under Secure Boot that keyring is what dm-verity root hash signatures and kexec images are verified against, so rt could not boot a signed rootfs. Firmware calls are not preemptible, so rt pays some latency when one runs; they happen at boot, on variable access and on panic, and efi=noruntime still turns them off per device. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011spdBMTKxFnMYus9k6gZc6 Signed-off-by: eriknordmark <erik@zededa.com>
hwe built efi-pstore as a module, so a panic in the initrd, such as a rejected dm-verity root hash, came before the backend registered and left no record for the fallback boot to report. Core and rt already built it in. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011spdBMTKxFnMYus9k6gZc6
Without shim's MOKvar config table, the kernel reads MokListRT, MokListXRT and MokIgnoreDB as ordinary UEFI variables. On a system that boots without shim, root can create them through efivarfs, and on the next boot MokListRT certificates land in the platform keyring, which dm-verity root hash signatures and kexec_file trust, while MokIgnoreDB drops db from it. shim creates all three as volatile on every boot, so ignore a non-volatile copy, as efi_get_secureboot() does for MokSBStateRT since commit 5f56a74 ("efi: libstub: check Shim mode using MokSBStateRT"). Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011spdBMTKxFnMYus9k6gZc6
eriknordmark
added a commit
to eriknordmark/eve
that referenced
this pull request
Nov 12, 2026
Builds amd64 core (HV=kvm) and hwe (HV=k) against locally built eve-kernels from eriknordmark/eve-kernel eve-secureboot-6.18.55 (lf-edge/eve-kernel#299) on 92df24b15f57, until that PR merges. Pinned in kernel-version.mk so the EVE version carries no kernel suffix. Signed-off-by: eriknordmark <erik@zededa.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
eriknordmark
force-pushed
the
eve-secureboot-6.18.55
branch
from
November 12, 2026 17:24
8a37442 to
3640e78
Compare
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.
Description
Kernel side of the two-stage GRUB Secure Boot design (UEFI db + GPG). Under Secure Boot the kernel locks down to integrity, verifies the rootfs dm-verity root hash signature against the UEFI db certificates in the platform keyring, and loads kexec images only with a valid signature. The options are in
common.fragment, so core, rt and hwe all get them.MokListRT,MokListXRTandMokIgnoreDBare ignored. EVE boots without shim, so root could otherwise create them through efivarfs and add certificates to the platform keyring, or drop db from it, on the next boot.KEXEC_SIG_FORCEon images whose kernel has no db signature. It is needed only if EVE keeps kdump rather than moving to pstore.How to test and validate this PR
Boot EVE with this kernel in QEMU with OVMF Secure Boot (db enrolled) and swtpm, with a dm-verity rootfs whose root hash is signed by a db key, on each of core, rt and hwe:
/sys/kernel/security/lockdownshows[integrity], dmesg showsintegrity: Loading X.509 certificate: UEFI:dbandpstore: Registered efi_pstore.Root hash verification failed (-ENOKEY).data block … is corruptedand an I/O error on read./sys/fs/pstore.All four pass on core, rt and hwe built from this branch.
🤖 Generated with Claude Code
https://claude.ai/code/session_011spdBMTKxFnMYus9k6gZc6