Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix secure boot issue when measuring the kernel #51

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

aplanas
Copy link
Contributor

@aplanas aplanas commented Feb 26, 2024

When secure boot is enabled, the device path for the kernel (PCR4) is not filled in the event log. This makes the kernel not measured and the current hash of the event log reused.

This PR provides an heuristic to detect this situation, and use the next kernel parameter as a basis to build a new candidate that will be measured.

Build on top of #47

The debug output can be missleading, as print information about the
current event log, but not about the measured element, that can be
different as in the kernel case.

Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Alberto Planas <aplanas@suse.com>
If the new EFI image is in a new place, the image information stored in
the parsed event should be updated, so the rehash will use this
information instead of the one from the event log.

Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Alberto Planas <aplanas@suse.com>
Signed-off-by: Alberto Planas <aplanas@suse.com>
@aplanas
Copy link
Contributor Author

aplanas commented Feb 26, 2024

@aplanas aplanas force-pushed the fix_bsc1219807 branch 2 times, most recently from 4fedbf8 to e669dac Compare February 27, 2024 07:33
Signed-off-by: Alberto Planas <aplanas@suse.com>
@aplanas
Copy link
Contributor Author

aplanas commented Feb 27, 2024

Communicated to shim via rhboot/shim#642

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.

None yet

1 participant