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

secboot: check legacy path for keyring when reading the primary key #14966

Open
wants to merge 1 commit into
base: fde-manager-features
Choose a base branch
from

Conversation

valentindavid
Copy link
Contributor

No description provided.

@valentindavid valentindavid added Run nested The PR also runs tests inluded in nested suite FDE Manager Pull requests that target FDE manager branch labels Jan 23, 2025
@valentindavid valentindavid marked this pull request as ready for review January 23, 2025 12:29
Copy link

codecov bot commented Jan 23, 2025

Codecov Report

Attention: Patch coverage is 79.41176% with 7 lines in your changes missing coverage. Please review.

Please upload report for BASE (fde-manager-features@af9b482). Learn more about missing BASE report.

Files with missing lines Patch % Lines
secboot/secboot_sb.go 70.83% 5 Missing and 2 partials ⚠️
Additional details and impacted files
@@                   Coverage Diff                   @@
##             fde-manager-features   #14966   +/-   ##
=======================================================
  Coverage                        ?   77.96%           
=======================================================
  Files                           ?     1139           
  Lines                           ?   153830           
  Branches                        ?        0           
=======================================================
  Hits                            ?   119937           
  Misses                          ?    26448           
  Partials                        ?     7445           
Flag Coverage Δ
unittests 77.96% <79.41%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@valentindavid valentindavid requested review from pedronis and bboozzoo and removed request for pedronis January 23, 2025 12:48
Copy link
Collaborator

@pedronis pedronis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thank you

}

// GetPrimaryKeyDigest retrieve the primary key for a disk from the
// keyring and returns it digest. If the path given does not match
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

typo: s/it/its/

@valentindavid valentindavid force-pushed the valentindavid/fallback-partuuid branch from 05b58eb to 2ae271a Compare January 23, 2025 15:40
In the case we update snapd with and old kernel, then reseal, the FDE
state might be not set because we did not find the primary key from
the initrd that set it in the legacy path. So if we do not find the
key in the keyring, we should try and see if we find it in the old
path.
@valentindavid valentindavid force-pushed the valentindavid/fallback-partuuid branch from 2ae271a to b0a5f1f Compare January 24, 2025 15:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
FDE Manager Pull requests that target FDE manager branch Run nested The PR also runs tests inluded in nested suite
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants