Skip to content

initrd: Consume signed fwupd capsules - #2191

Draft
Sean-StarLabs wants to merge 2 commits into
linuxboot:masterfrom
StarLabsLtd:sean/heads-fwupd-cod-20260826
Draft

initrd: Consume signed fwupd capsules#2191
Sean-StarLabs wants to merge 2 commits into
linuxboot:masterfrom
StarLabsLtd:sean/heads-fwupd-cod-20260826

Conversation

@Sean-StarLabs

Copy link
Copy Markdown

Draft / RFC

Add a board-gated path for consuming firmware staged by fwupd in EFI/UpdateCapsule. The consumer validates the EFI capsule, exact package contents, board and capsule GUID, generation, ROM size and hash, and a detached signature from an isolated vendor keyring before calling a board-selected writer.

Rejected requests are quarantined. Accepted requests are renamed to .applying before the writer runs and removed only after a successful write.

Add an independent TPM2 QEMU fixture with a disposable public key, mock file-backed writer, and stable SMBIOS identity. Physical boards remain disabled.

Runtime validation

  • Booted the exact committed QEMU ROM under QEMU/TCG with swtpm and a FAT ESP containing a signed capsule with a full 16 MiB firmware payload.
  • Observed the mock writer accept the payload and the consumer remove the capsule after success.
  • Exercised the host functional suite: valid capsule accepted; oversized capsule, rollback, wrong signed GUID, wrong board, tampered signature, wrong header GUID, and malformed header rejected.

WIP follow-up

This is based directly on current linuxboot/heads master and has no dependency on the Star Labs board series.

Production enablement still requires per-board capsule GUIDs, embedded production public keys, monotonic generation policy, physical flash writers, a persistent completion/failure result contract, and protected-flash hardware validation.

Companion fwupd Draft PR: fwupd/fwupd#10910.

Allow boards to consume firmware staged by fwupd on a FAT ESP. Validate
the EFI capsule before passing its ROM to a board-selected writer.

Authenticate an exact manifest and payload with an isolated vendor
keyring. Bind each package to its board and capsule GUID, enforce bounded
sizes, and require a newer generation to prevent rollback.

Quarantine rejected requests and mark accepted requests as applying
before invoking the writer. Remove a request only after a successful
write, then reboot according to board policy.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Add a TPM2 QEMU board for exercising the fwupd capsule handoff with a
disposable public key and a file-backed mock writer.

Give the VM a stable SMBIOS identity that the companion fwupd proof of
concept can match. Confirmation and reboot are bypassed only for this
non-flashing fixture; physical boards remain disabled.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
@tlaurion

tlaurion commented Aug 26, 2026

Copy link
Copy Markdown
Collaborator

CC @pietrushnic @macpijan (feel free to ping proper internal resource for review)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants