Skip to content

Add lint to check for email addresses in Subject but not in SAN (prohibited by RFC 5280 section 4.1.2.6)#1026

Merged
christopher-henderson merged 4 commits into
zmap:masterfrom
defacto64:email_not_in_san
Mar 14, 2026
Merged

Add lint to check for email addresses in Subject but not in SAN (prohibited by RFC 5280 section 4.1.2.6)#1026
christopher-henderson merged 4 commits into
zmap:masterfrom
defacto64:email_not_in_san

Conversation

@defacto64

Copy link
Copy Markdown
Contributor

Reflecting on a recent incident, I realized that ZLint doesn't detect violations of RFC 5280 section 4.1.2.6 regarding email addresses:

Conforming implementations generating new certificates with electronic mail addresses MUST use the rfc822Name in the subject alternative name extension (Section 4.2.1.6) to describe such identities.

Therefore, if a certificate contains an email address in the Subject field (which is deprecated, but not strictly prohibited), the same email address MUST also be present in the SAN extension.

One might think this issue only affects S/MIME certificates, but that's not the case: there are in fact quite a few TLS Server certificates out there that contain email addresses -- even trusted and recently issued ones.

It's one thing the presence of an email inside the SAN (this is forbidden by the CABF BRs for TLS Server certificates, and there's already a lint that checks for this); it's another thing the presence of an email outside the SAN that is not also in the SAN: this is forbidden, for any type of certificate, by RFC 5280 (actually since RFC 2459), and that's what the lint proposed here is about.

@defacto64

Copy link
Copy Markdown
Contributor Author

It looks like I got an unexpected HTTP error in the integration test that should be fixable by redoing it, but I don't think I can do that myself...

@christopher-henderson christopher-henderson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Thank you! And yes, the integration test had a bit of flakiness there - thank you for your patience.

}
},
"e_subj_email_not_in_san": {
"ErrCount": 16576

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I was a bit skeptical of this, but it is not unprecedented to have a requirement that is (relatively) violated by the a chunk of the corpus.

@christopher-henderson christopher-henderson merged commit 48f6dc7 into zmap:master Mar 14, 2026
4 checks passed
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

Successfully merging this pull request may close these issues.

2 participants