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

Clarify use creating and verifying TPM attestation statements. #2193

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

mwiseman-byid
Copy link

@mwiseman-byid mwiseman-byid commented Oct 30, 2024

Closes #1925

Addressed potential implementation errors in TPM Attestation

Implementation commitment:

Addressed potential implementation errors in TPM Attestation
Addressed potential privacy issues

Documentation and checks

  • Affects privacy
  • Affects security
  • Updated explainer (link

Preview | Diff

@sbweeden sbweeden self-requested a review October 30, 2024 13:28
Copy link
Contributor

@sbweeden sbweeden left a comment

Choose a reason for hiding this comment

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

Few suggestions inline, open for discussion.

index.bs Show resolved Hide resolved
whose `name` field contains a valid Name for |pubArea|, as computed using the procedure specified in [[!TPMv2-Part1]] section 16 using the nameAlg in the |pubArea|.

Note: The hash algorithm is also included within the attested `name`
field of the TPMS_CERTIFY_INFO structure and will also match nameAlg in |pubArea| when returned by the TPM.
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggest changing "will also match" to "MUST also match", thereby making this normative and an error if the RP detects that the hash algorithm is different in these two locations.

Copy link
Author

Choose a reason for hiding this comment

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

By making this a note, this is an informative statement so not sure if we can make this normative. This clarification, in fact, is what I believe is the source of the original concern that there was a possibility these would be different, when, in fact, the TPM never changes the algorithm. Making this check a MUST alludes that the TPM might return these different. That said, as the algId in the Name is not protected it is possible for software (local or in transit) to change it but the worse case would be a DOS attack (unless someone finds a pre-image attack). With that said, I'm open to the suggestion if you still believe that's needed.

Copy link
Contributor

Choose a reason for hiding this comment

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

The problem I have with lowercase "will also match" is that it's suggestive, without providing guidance to the RP as to what to do if its observed that the values are not the same in both locations. I'm not going to die on this hill though.

section 31.2, i.e., `qualifiedSigner`, `clockInfo` and `firmwareVersion` are ignored.
These fields MAY be used as an input to risk engines.
Depending on the properties of the |aikCert| key used, these fields may be obfuscated.
If valid, these MAY be used as an input to risk engines.
Copy link
Contributor

Choose a reason for hiding this comment

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

How does the RP determine if the fields are valid or not?

Copy link
Author

Choose a reason for hiding this comment

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

The content of these fields is determined by which TPM hierarchy the AK is in. (tl;dr: If the AK is in the Endorsement hierarchy the fields are valid, if the AK is in the Storage hierarchy, the fields are random - this is for privacy reasons). To provide information about where the AK is may be a privacy concern so this is not provided in the protocol. The properties of the AK (including whether to even trust it) are out of scope for this protocol and it would be up to the RP to know that out of band.

@@ -6582,6 +6591,11 @@ TPM [=attestation certificate=] MUST have the following fields/extensions:

- The Subject Alternative Name extension MUST be set as defined in [[!TPMv2-EK-Profile]] section 3.2.9.

Note: Previous versions of [[!TPMv2-EK-Profile]] allowed the inclusion of an optional attribute,
called HardwareModuleName, that contains the TPM serial number in the EK certificate.
HardwareModuleName SHOULD NOT be placed in in the [=attestation certificate=]
Copy link
Contributor

Choose a reason for hiding this comment

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

I suggest changing "SHOULD NOT" to "MUST NOT" for privacy preserving reasons.

Copy link
Author

Choose a reason for hiding this comment

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

Agree MUST NOT would be my preference. However, my concern with MUST NOT is if there are any existing implementation that followed the original wording, MUST NOT would make those existing implementations (if >0) non-compliant which would not be their fault. I'm OK with the guidance of the WG on this.

@simoneonofri
Copy link
Contributor

@mwiseman-byid, you should have received an email from IPR Bot asking for your commitment to this PR, as you're not part of this specific W3C Group.

I am available if you need more information.

@simoneonofri
Copy link
Contributor

@mwiseman-byid, the bot is happy. So, from IPR perspective, we're done.

@nadalin
Copy link
Contributor

nadalin commented Nov 5, 2024 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

TPM attestation verification steps inconsistent with FIDO conformance testing tool
5 participants