-
Notifications
You must be signed in to change notification settings - Fork 71
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
Be much stricter when processing Attested COS State #246
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Signed-off-by: Joe Richey <joerichey@google.com>
This was referenced Sep 10, 2022
alexmwu
approved these changes
Sep 12, 2022
jkl73
approved these changes
Sep 12, 2022
Signed-off-by: Joe Richey <joerichey@google.com>
"found more than one" is more accurate as the events don't actually have to be duplicates to cause an issue. Signed-off-by: Joe Richey <joerichey@google.com>
jessieqliu
approved these changes
Sep 12, 2022
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.
LGTM, some minor changes
Signed-off-by: Joe Richey <joerichey@google.com>
alexmwu
added a commit
to alexmwu/go-tpm-tools
that referenced
this pull request
Dec 16, 2022
Breaking Changes: New Features: Add IsHardened in launch spec: google#244 Add container logging redirect policy: google#249 Add SEV-SNP attestation support: google#240 Integrity-protect stateful partition on CS image: google#251 Retry launcher OIDC token refresh with backoff: google#261 Change restart policy behavior to reboot: google#260 Add ability to GetGCEInstanceInfo from a certificate: google#267 Bug Fixes: COS event log: require CEL events to use PCR13, add a launch separator, and don't skip unknown events: google#246 Measure LaunchSeparator event: google#247 Skip unallocated PCR selections when reading all PCRs: google#258 Remove gRPC client and use of insecure credentials: google#262 Fix server.VerifyAttestation proto merging(google#263) and defer of os.Exit(google#264): google#265 Other Changes: Add fake verifier client: google#234 Update CI Go Version to 1.19: google#241 Add launcher integration testing support: google#255 Test multi-writer PD creation disabled: google#256 Update go-sev-guest dependency to v0.2.6: google#259 Change OIDC retry policy to hourly and add jitter to refresh time: google#266 Add wrapper cloudbuild workflow to trigger image build and testing: google#269
Merged
alexmwu
added a commit
that referenced
this pull request
Dec 16, 2022
Breaking Changes: New Features: Add IsHardened in launch spec: #244 Add container logging redirect policy: #249 Add SEV-SNP attestation support: #240 Integrity-protect stateful partition on CS image: #251 Retry launcher OIDC token refresh with backoff: #261 Change restart policy behavior to reboot: #260 Add ability to GetGCEInstanceInfo from a certificate: #267 Bug Fixes: COS event log: require CEL events to use PCR13, add a launch separator, and don't skip unknown events: #246 Measure LaunchSeparator event: #247 Skip unallocated PCR selections when reading all PCRs: #258 Remove gRPC client and use of insecure credentials: #262 Fix server.VerifyAttestation proto merging(#263) and defer of os.Exit(#264): #265 Other Changes: Add fake verifier client: #234 Update CI Go Version to 1.19: #241 Add launcher integration testing support: #255 Test multi-writer PD creation disabled: #256 Update go-sev-guest dependency to v0.2.6: #259 Change OIDC retry policy to hourly and add jitter to refresh time: #266 Add wrapper cloudbuild workflow to trigger image build and testing: #269
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Currently in
getVerifiedCosState
we do two things that are bad from a security perspective:record.Content.Type != cel.CosEventType
)(1) is an issue because after a container launchers, we assume that a breakout is possible. So a malicious user can:
MachineState
.(2) is an issue because the
record.Content.Type
hasn't (yet) been verified in the loop. This means that a malicious user can:MachineState
This change:
AttestedCosState
from PCR 13 dataAttestedCosState
after a separator event is seen.ImageRefType
,ImageDigestType
, orImageIDType
EnvVarType
events are present if multiple environment variables are overridden.This fixes the worst of the issues described above. Note, this doesn't change the client-side launcher at all. #247 will change the launcher code to actually measure in the
LaunchSeparator
event. Until then, a container breakout can cause some of theAttestedCosState
to be wrong, but it cannot modifyimage_reference
,image_digest
, orimage_id
.I also had to modify our tests somewhat, including adding
test.SkipForRealTPM(t)
as we can only run some of our tests against PCR13, which cannot be reset on a Real TPM.Signed-off-by: Joe Richey joerichey@google.com