Skip to content

crypto/x509: ParseCRL allows CRL files to have duplicate revoked entries and duplicate certificate serial numbers. #73452

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

Open
onepeople158 opened this issue Apr 20, 2025 · 4 comments
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.

Comments

@onepeople158
Copy link

onepeople158 commented Apr 20, 2025

Go version

go version go1.24.2 linux/amd64

Output of go env in your module/workspace:

CRL Issuer: CN=My Root CA,OU=My Root CA,O=My Company,L=San Francisco,ST=California,C=US
This Update Time: 2025-01-01 08:00:00 +0800 CST
Next Update Time: 2025-12-01 08:00:00 +0800 CST
Signature Algorithm: SHA256-RSA
Number of Revoked Certificates: 3

Revoked Entry Details:
============================
Serial Number: 1c80022ef81f2405ee96a612dcb61fe0ac701e5e
Revocation Time: 2025-04-17 18:16:51 +0800 CST
  (No extensions)
----------------------------
Serial Number: 8cb8193ecce671ec00000000582c8a7a
Revocation Time: 2025-04-14 20:00:00 +0800 CST
  Extensions:
    2.5.29.21 (CRL Reason): CessationOfOperation
----------------------------
Serial Number: 8cb8193ecce671ec00000000582c8a7a
Revocation Time: 2025-03-14 20:00:00 +0800 CST
  Extensions:
    2.5.29.21 (CRL Reason): KeyCompromise

CRL Issuer: CN=My Root CA,OU=My Root CA,O=My Company,L=San Francisco,ST=California,C=US
This Update Time: 2025-01-01 08:00:00 +0800 CST
Next Update Time: 2025-12-01 08:00:00 +0800 CST
Signature Algorithm: SHA256-RSA
Number of Revoked Certificates: 2

Revoked Entry Details:
============================
Serial Number: 8cb8193ecce671ec00000000582c8a7a
Revocation Time: 2025-04-14 20:00:00 +0800 CST
  Extensions:
    2.5.29.21 (CRL Reason): CessationOfOperation
----------------------------
Serial Number: 8cb8193ecce671ec00000000582c8a7a
Revocation Time: 2025-04-14 20:00:00 +0800 CST
  Extensions:
    2.5.29.21 (CRL Reason): CessationOfOperation
----------------------------

What did you do?

Hello developer, I successfully parsed a CRL file with duplicate revoked certificate entries or duplicate serial numbers using go. According to RFC 5280:

Each revocation entry is uniquely identified by its serial number.

What did you see happen?

I successfully parsed a CRL file with duplicate revoked certificate entries or duplicate serial numbers using go.

What did you expect to see?

crl_revoked_dublicate.zip
crl_revoked_dublicate_serial.zip

Code:

go.zip

@onepeople158 onepeople158 changed the title crypto/x509:ParseCRL允许CRL文件中具有重复吊销条目和重复证书序列号 crypto/x509: ParseCRL allows CRL files to have duplicate revoked entries and duplicate certificate serial numbers. Apr 20, 2025
@gabyhelp gabyhelp added the BugReport Issues describing a possible bug in the Go implementation. label Apr 20, 2025
@JunyangShao
Copy link
Contributor

@rolandshoemaker

@JunyangShao JunyangShao added the NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. label Apr 21, 2025
@AGWA
Copy link

AGWA commented May 2, 2025

FYI, here is an argument that duplicate serial numbers in CRLs is not actually forbidden by RFC 5280 (I neither endorse nor reject this argument): https://bugzilla.mozilla.org/show_bug.cgi?id=1943379#c7

Here's the CABF issue to update the BRs to explicitly forbid it: cabforum/servercert#589

@onepeople158
Copy link
Author

FYI, here is an argument that duplicate serial numbers in CRLs is not actually forbidden by RFC 5280 (I neither endorse nor reject this argument): https://bugzilla.mozilla.org/show_bug.cgi?id=1943379#c7

Here's the CABF issue to update the BRs to explicitly forbid it: cabforum/servercert#589

Thank you for sharing the detailed analysis and ongoing discussions regarding the interpretation of RFC 5280 and the proposed updates to the CAB Forum Baseline Requirements (BRs).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BugReport Issues describing a possible bug in the Go implementation. NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Projects
None yet
Development

No branches or pull requests

4 participants