efi: support HP pre-OS PCR measurements - #556
Conversation
Some firmware extends vendor-defined events into PCR2 after EV_SEPARATOR but before the initial OS loader is authorized or launched. Continue replaying those events within that pre-OS interval so generated profiles match the TPM, and apply the same boundary in preinstall validation.
|
@chrisccoulson @valentindavid, would either of you be able to review this when you have a chance? |
HP firmware can measure enabled SVM and DMA protection settings into PCR7 as an EV_EFI_ACTION before the Secure Boot variables. Recognize only the exact protected configuration, validate its digest, replay it once in the profile, and mirror the acceptance rule in preinstall validation.
71236d4 to
ef00edc
Compare
|
Hi @ebrig , thank you for this PR. Could you please send the BIOS measurement of your platform ( Could you please also agree on the Canonical contributor licence agreement? |
|
I implemented this PR on my AMD Thinkpad x13 g3. Works well. |
|
@ebrig could you continue this PR? Or would it be ok if I took over via a new PR? |
|
Thanks, @frederic-hoerni. I’ve signed the Canonical contributor licence agreement. Attached is a gzip-compressed copy of the requested raw SHA-256 of the uncompressed log:
@ironhalik, thank you for testing this on the AMD ThinkPad X13 Gen 3. Yes, I’m continuing this PR, so there’s no need to open a replacement PR. The PR is ready for continued review. Please let me know if any additional logs, tests, or changes would help. |
Summary
HP firmware can produce two pre-OS measurements that are not currently represented in generated EFI PCR profiles:
EV_SEPARATOR, but before the initial OS loader is authorized or launchedEV_EFI_ACTIONin PCR7 containing the enabled SVM and DMA protection configuration when additional DMA settings are measured to PCR7This causes the generated profile to diverge from the TPM values and prevents a resealed key from unlocking normally.
This change:
Hardware validation
Tested on an HP ZBook Ultra G1a 14 inch Mobile Workstation PC with BIOS X89 01.05.07 (2026-05-05), using:
After resealing with the patched package, TPM-passphrase unlock succeeded across a reboot.
Tests
GOTOOLCHAIN=go1.23.12 ./run-tests --with-mssimgo build ./...with Go 1.18.10 and Go 1.23.12go vetwith Go 1.18.10 and Go 1.23.12