efi: support HP pre-OS PCR measurements - #556
Open
ebrig wants to merge 2 commits into
Open
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.
ebrig
marked this pull request as ready for review
July 26, 2026 12:57
Author
|
@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.
ebrig
force-pushed
the
hp-preboot-dma-pcr7
branch
from
July 26, 2026 13:42
71236d4 to
ef00edc
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.
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