-
Notifications
You must be signed in to change notification settings - Fork 19
efi/preinstall: Update PCRProfileOptionsFlags #481
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
base: master
Are you sure you want to change the base?
efi/preinstall: Update PCRProfileOptionsFlags #481
Conversation
fb26b17 to
bec8f72
Compare
|
Note that as with the other PRs that make some changes to |
bec8f72 to
68bfe14
Compare
This updates PCRProfileOptionsFlags, such that: - There are now individual options to include each PCR if not already included (PCRProfileOptionLockTo*). - PCRProfileOptionsMostSecure includes all of the new PCRProfileOptionLockTo* options. - PCRProfileOptionTrustCAsForAddonDrivers and PCRProfileOptionTrustCAsForBootCode have been renamed to - PCRProfileOptionTrustSecureBootAuthoritiesForAddonDrivers and PCRProfileOptionTrustSecureBootAuthoritiesForBootCode. They can only be used if the active CAs are not recognized. They can't be used to omit PCRs 2 or 4 from the profile if the CA is recognized and explicitly distrusted, so that users can't use these options to create insecure profiles. - PCRProfileOptionDistrustVARSuppliedNonHostCode is gone because it is superceded by PCRProfileOptionLockToDriversAndApps. Fixes: FR-12150
68bfe14 to
321eeb1
Compare
pedronis
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did a pass, some small comments
| if flags&auth.Trust != flags { | ||
| return authoritiesNotTrusted | ||
| } | ||
| certFound = true |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
isn't this more authFound than cert found?
| } | ||
| trust &= certTrust | ||
| if !certFound { | ||
| return authoritiesTrustUnknown |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe this should have a comment that the authority of this cert is not in the data set
|
|
||
| var str string | ||
| switch flag { | ||
| case PCRProfileOptionMostSecure: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this value is now always exploded in the relevant flags?
| {pcr: internal_efi.BootManagerConfigPCR, unsupportedFlag: NoBootManagerConfigProfileSupport}, | ||
| {pcr: internal_efi.SecureBootPolicyPCR, unsupportedFlag: NoSecureBootPolicyProfileSupport, opt: secboot_efi.WithSecureBootPolicyProfile}, | ||
| } { | ||
| if _, exists := pcrs[data.pcr]; exists { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think here s/exists/required/ would be a bit clearer
ernestl
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks
This updates PCRProfileOptionsFlags, such that:
included (
PCRProfileOptionLockTo*).PCRProfileOptionsMostSecureincludes all of the newPCRProfileOptionLockTo*options.PCRProfileOptionTrustCAsForAddonDriversandPCRProfileOptionTrustCAsForBootCodehave been renamed toPCRProfileOptionTrustSecureBootAuthoritiesForAddonDriversandPCRProfileOptionTrustSecureBootAuthoritiesForBootCode. They can onlybe used if the active CAs are not recognized. They can't be used to
omit PCRs 2 or 4 from the profile if the CA is recognized and explicitly
distrusted, so that users can't use these options to create insecure
profiles.
PCRProfileOptionDistrustVARSuppliedNonHostCodeis gone because it issuperceded by
PCRProfileOptionLockToDriversAndApps.Fixes: FR-12150