Note: This bug is displayed in read-only format because
the product is no longer active in Red Hat Bugzilla.
RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Description of problem:
This is tracked upstream in https://github.com/keylime/keylime/issues/944
When running the basic attestation scenario on localhost the agent fails to register and the following message is logged by registrar
2022-03-28 05:42:13,737 keylime.tpm INFO TPM2-TOOLS Version: 5.0
2022-03-28 05:42:13,752 keylime.registrar WARNING POST for d432fbb3-d2f1-4a97-9ef7-75bd81c00000 returning 400 response. Error: error parsing asn1 value: ParseError { kind: InvalidSetOrdering, location: ["RawCertificate::tbs_cert", "TbsCertificate::issuer", "0", "2"] }
2022-03-28 05:42:13,752 keylime.registrar WARNING POST for d432fbb3-d2f1-4a97-9ef7-75bd81c00000 returning 400 response. Error: error parsing asn1 value: ParseError { kind: InvalidSetOrdering, location: ["RawCertificate::tbs_cert", "TbsCertificate::issuer", "0", "2"] }
2022-03-28 05:42:13,753 keylime.registrar ERROR error parsing asn1 value: ParseError { kind: InvalidSetOrdering, location: ["RawCertificate::tbs_cert", "TbsCertificate::issuer", "0", "2"] }
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/keylime-6.3.1-py3.9.egg/keylime/registrar_common.py", line 287, in do_POST
ek509 = load_der_x509_certificate(
File "/usr/local/lib64/python3.9/site-packages/cryptography/x509/base.py", line 538, in load_der_x509_certificate
return rust_x509.load_der_x509_certificate(data)
ValueError: error parsing asn1 value: ParseError { kind: InvalidSetOrdering, location: ["RawCertificate::tbs_cert", "TbsCertificate::issuer", "0", "2"] }
I have tested it also with the latest cryptography module available in PIP v36.0.2, same behavior.
TPM EK cert cannot be parsed by cryptography module but it can be parsed by openssl (openssl-3.0.1)
---
The issuer attribute seems non standard: Issuer: CN = Nuvoton TPM Root CA 2110 + O = Nuvoton Technology Corporation + C = TW. Normally those fields should be comma separated not with a +.
The issue is likely in the ASN.1 parser used by cryptography.
Version-Release number of selected component (if applicable):
keylime-6.4.2-2.el9
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.
For information on the advisory (keylime bug fix and enhancement update), and where to find the updated
files, follow the link below.
If the solution does not work for you, open a new bug report.
https://access.redhat.com/errata/RHBA-2022:8189