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

TPM registration responses in v1.6.33 appear to have invalid cert path #618

Closed
4 of 17 tasks
MasterKale opened this issue Aug 22, 2021 · 19 comments
Closed
4 of 17 tasks

Comments

@MasterKale
Copy link

FIRST PRE CHECK

  • I SOLEMNLY SWEAR THAT I HAVE SEARCHED DOCUMENTATION AND WAS NOT ABLE TO RESOLVE MY ISSUE

What protocol are you implementing?

  • FIDO2 Server
  • CTAP2.0
  • CTAP2.1
  • UAF 1.1
  • U2F 1.1
  • U2F 1.2

NOTE: UAF 1.0 certification have been officially sunset. U2F 1.2 only supported version of U2F.

What is your implementation class?

  • Security Key / FIDO2 / U2F authenticators
  • Server
  • UAF Client-ASM-Authenticator combo
  • UAF Client
  • UAF ASM-Authenticator

If you are platform authenticator vendor, please email conformance-tools@fidoalliance.org

What is the version of the tool are you using?

v1.6.33

What is the OS and the version are you running?

For desktop tools

  • OSX
  • Windows
  • Linux

For UAF mobile tools

  • iOS
  • Android

Issue description

I'm running MakeCredential: Platform tests and the TPM tests in particular seem to have trouble with validating the certificate path, starting with the first two certs in x5c:

Getting statement for a7d6d93a-8a0d-11e8-9a94-a6cf71072f73
Sub. Iss.: /C=US/ST=MY/L=Wakefield/O=FIDO Alliance/OU=CWG/CN=FIDO Fake TPM Root Certificate Authority 2018/E=conformance-tools@fidoalliance.org
Iss. Sub.: /CN=Sample Attestation Root/O=FIDO Alliance/OU=UAF TWG,/L=Palo Alto/ST=CA/C=US
RP - attestation: Could not validate certificate path with any metadata root certificates (TPM)

Getting statement for f244b67e-5364-4fd5-9f90-c396227317db
Successfully validated attestation with metadata

Getting statement for a7d6d93a-8a0d-11e8-9a94-a6cf71072f73
Sub. Iss.: /C=US/ST=MY/L=Wakefield/O=FIDO Alliance/OU=CWG/CN=FIDO Fake TPM Root Certificate Authority 2018/E=conformance-tools@fidoalliance.org
Iss. Sub.: /CN=Sample Attestation Root/O=FIDO Alliance/OU=UAF TWG,/L=Palo Alto/ST=CA/C=US
RP - attestation: Could not validate certificate path with any metadata root certificates (TPM)

Getting statement for a7d6d93a-8a0d-11e8-9a94-a6cf71072f73
Sub. Iss.: /C=US/ST=MY/L=Wakefield/O=FIDO Alliance/OU=CWG/CN=FIDO Fake TPM Root Certificate Authority 2018/E=conformance-tools@fidoalliance.org
Iss. Sub.: /CN=Sample Attestation Root/O=FIDO Alliance/OU=UAF TWG,/L=Palo Alto/ST=CA/C=US
RP - attestation: Could not validate certificate path with any metadata root certificates (TPM)

Getting statement for a7d6d93a-8a0d-11e8-9a94-a6cf71072f73
Sub. Iss.: /C=US/ST=MY/L=Wakefield/O=FIDO Alliance/OU=CWG/CN=FIDO Fake TPM Root Certificate Authority 2018/E=conformance-tools@fidoalliance.org
Iss. Sub.: /CN=Sample Attestation Root/O=FIDO Alliance/OU=UAF TWG,/L=Palo Alto/ST=CA/C=US
RP - attestation: Could not validate certificate path with any metadata root certificates (TPM)

Getting statement for a7d6d93a-8a0d-11e8-9a94-a6cf71072f73
Sub. Iss.: /C=US/ST=MY/L=Wakefield/O=FIDO Alliance/OU=CWG/CN=FIDO Fake TPM Root Certificate Authority 2018/E=conformance-tools@fidoalliance.org
Iss. Sub.: /CN=Sample Attestation Root/O=FIDO Alliance/OU=UAF TWG,/L=Palo Alto/ST=CA/C=US
RP - attestation: Could not validate certificate path with any metadata root certificates (TPM)

The cert path is invalid based just on the first two certificates - the root cert is never evaluated in the above failures.

Here's a cert chain I pulled from one of the failures:

-----BEGIN CERTIFICATE-----
MIIFCTCCA/GgAwIBAgIPBFOW4i8bG5QOgEXkIYOOMA0GCSqGSIb3DQEBCwUAMEEx
PzA9BgNVBAMTNk5DVS1OVEMtS0VZSUQtRkY5OTAzMzhFMTg3MDc5QTZDRDZBMDNB
REM1NzIzNzQ0NUY2QTQ5QTAeFw0xODAyMDEwMDAwMDB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Z3ajnuQ94PR7
aMzH33nUSBr8fHYDrqOBb58pxGqHJRyX/6NQME4wHQYDVR0OBBYEFPoHA3CLhxFb
C0It7zE4w8hk5EJ/MB8GA1UdIwQYMBaAFPoHA3CLhxFbC0It7zE4w8hk5EJ/MAwG
A1UdEwQFMAMBAf8wCgYIKoZIzj0EAwIDSAAwRQIhAJ06QSXt9ihIbEKYKIjsPkri
VdLIgtfsbDSu7ErJfzr4AiBqoYCZf0+zI55aQeAHjIzA9Xm63rruAxBZ9ps9z2XN
lQ==
-----END CERTIFICATE-----
@ynojima
Copy link

ynojima commented May 14, 2022

@herrjemand As far as I check with v1.6.46, this issue still exists.

@yackermann
Copy link
Collaborator

@aseigler
Copy link

v1.6.48 didn't help. Same issue.

@aseigler
Copy link

The CRL at this URL: https://pki.certinfra.fidoalliance.org/tpm/crl/FIDO%20Fake%20TPM%20Root%20Certificate%20Authority%202018.crl

$ openssl crl -in 'FIDO Fake TPM Root Certificate Authority 2018.crl' -text
Certificate Revocation List (CRL):
        Version 2 (0x1)
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, ST = MY, L = Wakefield, O = FIDO Alliance, OU = CWG, CN = FIDO Fake TPM Root Certificate Authority 2018, emailAddress = conformance-tools@fidoalliance.org
        Last Update: Feb  1 00:00:00 2018 GMT
        Next Update: Feb  1 00:00:00 2020 GMT
        CRL extensions:
            X509v3 CRL Number:
                1
            X509v3 Authority Key Identifier:
                keyid:43:11:16:99:9A:EE:9D:50:37:C2:4F:FE:E2:5B:15:C9:09:33:3F:32

Is signed with this from the conformance metadata file Virtual RSA PKCS 1.5 SHA256 FIDO2 Conformance Testing CTAP2 Authenticator with TPM Attestation.json under attestationRootCertificates:

$ openssl x509 -in tpmroot.cer -text
Certificate:
    Data:
        Version: 3 (0x2)
        Serial Number:
            8b:c2:5c:12:8b:13:42:d2
        Signature Algorithm: sha256WithRSAEncryption
        Issuer: C = US, ST = MY, L = Wakefield, O = FIDO Alliance, OU = CWG, CN = FIDO Fake TPM Root Certificate Authority 2018, emailAddress = conformance-tools@fidoalliance.org
        Validity
            Not Before: Apr 25 05:45:38 2019 GMT
            Not After : Sep 10 05:45:38 2046 GMT
        Subject: C = US, ST = MY, L = Wakefield, O = FIDO Alliance, OU = CWG, CN = FIDO Fake TPM Root Certificate Authority 2018, emailAddress = conformance-tools@fidoalliance.org
        Subject Public Key Info:
            Public Key Algorithm: rsaEncryption
                RSA Public-Key: (4096 bit)
                Modulus:
                `snipped for brevity`
                Exponent: 65537 (0x10001)
        X509v3 extensions:
            X509v3 Basic Constraints: critical
                CA:TRUE
            X509v3 Key Usage: critical
                Digital Signature, Certificate Sign
            X509v3 Subject Key Identifier:
                43:11:16:99:9A:EE:9D:50:37:C2:4F:FE:E2:5B:15:C9:09:33:3F:32

The authority key identifier on the CRL matches the subject key identifier on the certificate, but the X509v3 Key Usage extension only has digitalSignature and keyCertSign, it is missing cRLSign which means it cannot be accepted as a CRL signer.

Additionally, the CRL in question and the one at https://pki.certinfra.fidoalliance.org/tpm/crl/NCU-NTC-KEYID-FF990338E187079A6CD6A03ADC57237445F6A49A.crl are currently expired.

@ThaminduDilshan
Copy link

@herrjemand any update regarding this test failure? Seems not fixed with v1.6.48

@Spomky
Copy link

Spomky commented Jul 12, 2022

What about the v1.7.0?

@aseigler
Copy link

This is still an issue in v1.7.2, same issue as I outlined prior above.

@yackermann
Copy link
Collaborator

yackermann commented Jul 21, 2022 via email

@aseigler
Copy link

Did you update metadata?
Yes, didn't change anything. The second cert in the attestationRootCertificates in the Virtual RSA PKCS 1.5 SHA256 FIDO2 Conformance Testing CTAP2 Authenticator with TPM Attestation.json file is the CRL signer for https://pki.certinfra.fidoalliance.org/tpm/crl/FIDO%20Fake%20TPM%20Root%20Certificate%20Authority%202018.crl and the cert does not have cRLSign key usage set, meaning it is not allowed to sign the CRL. Additionally, the CRL is expired.

@aseigler
Copy link

image

image

@yackermann yackermann reopened this Jul 25, 2022
@ThaminduDilshan
Copy link

Any update on resolution for this issue?

@Kieun
Copy link
Member

Kieun commented Oct 6, 2022

Still has same issue in v1.7.6

  • All certificate path validation for the tpm attestation fails.
  • Plus, Android safetynet attestation also fails to verify the trust chain.

Screen Shot 2022-10-06 at 5 48 30 PM

Screen Shot 2022-10-06 at 5 48 39 PM

@Kieun
Copy link
Member

Kieun commented Nov 2, 2022

@herrjemand is there any update on this issue? This issue blocks our interop testing plans.

@yackermann
Copy link
Collaborator

@Kieun
Copy link
Member

Kieun commented Nov 30, 2022

@herrjemand let me check them again. Anyway, thanks for your effort. I'll give you the feedbacks.

@ptravers-byid
Copy link

@herrjemand we are still seeing the same issue with the certificates in 1.7.7

@Milton-Ch
Copy link

@herrjemand
Testing with version 1.7.7 I usually pass all tests with TPM.
But from 1.7.8 onwards I have the same problem with certificates as reported in this issue.

@Kieun
Copy link
Member

Kieun commented May 26, 2023

This issue seems to be resolved in v1.7.11.

@yackermann
Copy link
Collaborator

Based on the recent feedback this issue resolved since 1.7.10

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

No branches or pull requests

9 participants