balena-os / meta-balena

A collection of Yocto layers used to build balenaOS images
https://www.balena.io/os
971 stars 115 forks source link

PCR 7 sealing fixes #3408

Closed jakogut closed 2 months ago

jakogut commented 3 months ago
A missing semi-colon caused the firmware_measures_efibins function to
return an exit code of one, which the 0-signed-update hostapp-update
hook interpreted as "this firmware does not measure EFI binaries into
PCR 7", as opposed to zero, indicating "this firmware *does* measure EFI
binaries into PCR 7", or two, indicating "the TPM event log is
unavailable and it's impossible to tell."

Taking the wrong branch in this conditional led to an inappropriate
policy being created to seal the LUKS passphrase, which could not be
unlocked on the next boot, as in QEMU with edk2, EFI binaries *are*
measured into PCR 7.

Manual tests:

Reviewer Guidelines

jakogut commented 2 months ago

@resin-jenkins retest this please