Skip to content

Commit 15ecf00

Browse files
committed
xtask: Use insecure firmware for all non-sealed VM tests
The stock OVMF Secure Boot key database (shipped with the Ubuntu runner's edk2/ovmf package) does not include the distro signing keys needed to verify the shim/grub chain for CentOS Stream or Fedora. Previously, only systemd-boot tests explicitly requested --firmware=uefi-insecure while grub tests inherited bcvk's default of uefi-secure, causing UEFI to reject the boot with 'Security Violation'. This worked by coincidence until the CentOS Stream 10 compose re-signed grub2 (2.12-47) with a different certificate (Signing 802 / CA 8 instead of Signing 202 / CA 2), which changed the Authenticode signature and broke whatever fragile verification path was succeeding before. Fix by using --firmware=uefi-insecure for all non-sealed images. Sealed images continue to use uefi-secure with explicitly enrolled test keys. Signed-off-by: Joseph Marrero Corchado <jmarrero@redhat.com> Assisted-by: OpenCode (Claude claude-opus-4-6)
1 parent 9c3e439 commit 15ecf00

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

crates/xtask/src/bcvk.rs

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,14 @@ impl BcvkInstallOpts {
110110
Run 'just generate-secureboot-keys' to generate them."
111111
);
112112
}
113-
} else if matches!(self.bootloader, Some(Bootloader::Systemd)) {
114-
Ok(vec!["--firmware=uefi-insecure".into()])
115113
} else {
116-
Ok(Vec::new())
114+
// Use insecure firmware for all non-sealed images. The stock
115+
// OVMF Secure Boot key database does not include the distro
116+
// signing keys needed to verify shim/grub, so Secure Boot
117+
// verification fails at the firmware level with
118+
// "Security Violation". Sealed images work because they enroll
119+
// custom test keys and use a test-signed systemd-boot.
120+
Ok(vec!["--firmware=uefi-insecure".into()])
117121
}
118122
}
119123
}

0 commit comments

Comments
 (0)