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

Non-compliance with RFC-5280 (X.509 Certificate Standard Specification) #4770

Open
joyantaDebnath opened this issue Jul 12, 2021 · 2 comments
Labels
bug size-s Estimated task size: small (~2d)

Comments

@joyantaDebnath
Copy link

joyantaDebnath commented Jul 12, 2021

We tested certificate chain validation logic of mbedTLS v2.25.0 using the cert_app application and found following bugs.

  1. (Now fixed by Fix false success return code in mbedtls_x509_string_to_names() #7849) It allows empty DirectoryString (e.g., "") in Distinguished name structures of Issuer and Subject name. (RFC 5280 non-compliant)
  2. It does not prohibit deprecated IA5String in DirectoryString. (RFC 5280 non-compliant)
  3. It allows unnecessary bits in Key Usage Extension. These bits do not represent any standard certificate purpose. (RFC 5280 non-compliant)
  4. You should not allow 0 (zero) as certificate serial number. RFC 5280 says,
    “The serial number MUST be a positive integer assigned by the CA to each certificate...CAs MUST force the serial Number to be a non-negative integer...Non-conforming CAs may issue certificates with serial numbers that are negative or zero. Certificate users SHOULD be prepared to gracefully handle such certificates.”
@davidhorstmann-arm
Copy link
Contributor

Issue (1) was fixed by #7849, which ensures that the DN contains at least 1 AttributeType=AttributeValue pair.

@joyantaDebnath
Copy link
Author

It does not look like issue (1) is fixed properly. Do you reject the certificate when the value of common name (for example) attribute in RDN is an empty string ("")?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug size-s Estimated task size: small (~2d)
Projects
None yet
Development

No branches or pull requests

7 participants