Skip to content

DCAP attestation - bail on non-up-to-date TCB status#46

Open
ameba23 wants to merge 3 commits into
mainfrom
peg/bail-on-non-up-to-date-tcb
Open

DCAP attestation - bail on non-up-to-date TCB status#46
ameba23 wants to merge 3 commits into
mainfrom
peg/bail-on-non-up-to-date-tcb

Conversation

@ameba23
Copy link
Copy Markdown
Collaborator

@ameba23 ameba23 commented May 29, 2026

During DCAP attestation verification, TCB status can have the following possible values:

  • UpToDate
  • SWHardeningNeeded
  • ConfigurationNeeded
  • ConfigurationAndSWHardeningNeeded
  • OutOfDate
  • OutOfDateConfigurationNeeded
  • Revoked

dcap-qvl's verify function will reject an attestation if the status is 'Revoked' and succeed otherwise, giving us the status information and possible advisory IDs in the VerifiedReport.

Out current policy is to log a warning if the status is not 'UpToDate' and proceed with success anyway.

This PR changes that behavior to bail with an error if the status is not 'UpToDate'.

This is the most conservative approach, but it could possibly mean that configurations are rejected which are considered safe by the cloud provider.

A possible alternative approach to this would be to check TCB status in our PCCS implementation, so out of date collateral is rejected before the point of attestation verification. But i think keeping it part of the attestation verifier is best, because it means it is not dependent on using our internal PCCS.

Note: It has been suggested to have a minimum time window for rejecting out of date TCB, so that providers have time to update before attestations are rejected. But i can't see a way we can get the date on which the TCB expired, without observing ourselves when attestations with the TCB are no longer accepted, which we could do as part of the PCCS implementation.

We do have access to various dates associated with collateral - but as far as i can see, none of these necessarily tell us when collateral became out of date:

  • tcbDate - is the date associated with the TCB level, not the expiry date
  • issueDate and nextUpdate - are the freshness window of the collateral document, not the TCB - so collateral with OutOfDate TCB status may still have a nextUpdate date in the future.

verifier.verify(&input, &collateral, now)?;
let verified_report =
verifier
.dangerous_verify_with_tcb_override(&input, &collateral, now, |tcb_info| tcb_info)?;
Copy link
Copy Markdown
Collaborator Author

@ameba23 ameba23 Jun 1, 2026

Choose a reason for hiding this comment

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

This change is not strictly relevant to the PR, but just to ensure that the mock verifier uses the exact same method as the non-mock verifier.

Ok(measurements)
}

fn ensure_up_to_date_tcb(
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I'd drop a comment here that "revoked" status is rejected by qvl so this only removes the other two non-up-to-date statuses

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