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

SecurityPkg/SecureBootConfigDxe: require reset on all SB changes #137

Merged
merged 1 commit into from
Jun 14, 2024

Conversation

SergiiDmytruk
Copy link
Member

Enrolling or removing any signature should require a reset to avoid booting a system with some weird value of PCR-7. The PCR is extended on writes into SecureBoot-related variables (see SecureBootHook() in SecurityPkg/DxeImageVerificationLib) and then right before booting (in TcgDxe or Tcg2Dxe in OnReadyToBoot() handler), meaning that editing SecureBoot configuration and continuing boot process without a reset results in an unexpected value of PCR-7 even if the end result of changes is the same as it would be without any changes.

Now reset is required in the following cases as well:

  • enrolling/deletion of a KEK signature
  • enrolling/deletion of a DB signature
  • enrolling/deletion of a DBX signature (one or all of them)
  • enrolling/deletion of a DBT signature

Addition cases are handled in VFR while deletion options are checkboxes generated in C and that's where the flags get set (number of updated places is fewer than number of handled cases because functions are shared by menus).

Enrolling or removing any signature should require a reset to avoid
booting a system with some weird value of PCR-7.  The PCR is extended
on writes into SecureBoot-related variables (see SecureBootHook() in
SecurityPkg/DxeImageVerificationLib) and then right before booting (in
TcgDxe or Tcg2Dxe in OnReadyToBoot() handler), meaning that editing
SecureBoot configuration and continuing boot process without a reset
results in an unexpected value of PCR-7 even if the end result of
changes is the same as it would be without any changes.

Now reset is required in the following cases as well:
 * enrolling/deletion of a KEK signature
 * enrolling/deletion of a DB signature
 * enrolling/deletion of a DBX signature (one or all of them)
 * enrolling/deletion of a DBT signature

Addition cases are handled in VFR while deletion options are checkboxes
generated in C and that's where the flags get set (number of updated
places is fewer than number of handled cases because functions are
shared by menus).

Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
@miczyg1 miczyg1 merged commit 9756808 into dasharo Jun 14, 2024
3 checks passed
@miczyg1 miczyg1 deleted the reset-on-all-sb-changes branch June 14, 2024 14:00
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.

2 participants