Beware of Applications Misusing Root Stores
blog.mozilla.org
blog.mozilla.org
S/MIME and HTTPS are quite different types of services, the former still usually relying on long-lived certificates whilst the latter is moving to shorter and shorter certificate validity, lessening the impact of a breach. Using S/MIME certificates to validate TLS might even allow a website to use the certificate of some random email address in your company to do a man-in-the-middle attack on your certificate, if the app's implementation was written badly enough.
--
Offtopic: speaking of root stores and Mozilla, I'm still miffed about Firefox's decisions about the subject on Android. They removed the old root certificate management/installation pages, put a switch to enable the system's user certificate store in about:config and then removed the ability to use about:config from the stable release of Firefox for Android.
I've seen a commit message saying that they moved the setting to allow the certificates the user explicitly installed on their system to work inside Firefox into a secret developer menu. I found that thread because I was looking into why my phone would randomly reset the about:config setting every day (because of a bug? because of the change? who even knows).
My intranet websites work on pretty much every browser other than Firefox on my phone. It's really annoying.
It used SSL/TLS and S/MIME roots to verify code signing and timestamping responses. When Symantec, which was removed for TLS trust, was also removed for S/MIME, NuGet broke, because it was no longer able to verify the TSA signature.
As covered in https://github.com/NuGet/Home/issues/10504 , this then led some Linux distros, notably Debian/Ubuntu, to re-add Symantec.
Any application using the ca-certificates package thus end up trusting CAs that Mozilla does not trust, despite being derived from the Mozilla Root Store.
So the news is already out there, this was just a reminder to folks to not do silly things like Microsoft did.
Could the file be split to retroactively fix everyone doing this?
Best would be if they shipped a reference parsing library for whatever format they do use is. :-)
RE: CA Lists: Your CA list should be as short as it can be. The public CA list should be the public CA list, and you should use Mozilla's HTTPS list or Google's Chrome Root Store... but these lists are public lists for public infrastructure, and what you should use for communicating with services you don't control.
Every company should have a CA. Possibly every division of every company. Don't throw them all in the same file. You should, as a client, make use of TLS Contexts: You should specify for every HTTPS Client a specific CA, which for internal services should be your own CA.
As a server, client certificate auth is pretty rare (but it shouldn't be). When you do have it, you don't always have control over the client's root CA, but you shouldn't blindly trust it, either. You must verify that the claims on the client certificate match the claims on the CA, but also that the claims on the CA match your actual trust of the CA. The latter shouldn't be done at runtime, but during configuration. You shouldn't accept blind root signing certificates; You should accept from your clients intermediate CAs with appropriate constraints baked in.
This brings into the equation another important problem: You shouldn't have complex claims on client certificates.
I'm watching closely the SPIFFE project [1], which I believe is well intentioned but don't believe has got it right. I've also got my own project, KubeTLS[2] which implements a simple claims system - Which is appropriate in very limited constraints, but I believe those constraints also match most businesses real-world needs.
[1] https://spiffe.io/ [2] https://gitlab.com/gauntletwizard_net/kubetls
Parties like Apple use x509/PKI certificates for code signing. A third-party application COULD use this trust DB for code signing verification. If an application is signed with a (root) cert trusted by this DB, it is allowed.
Mozilla is saying woah: we only validate CA's TLS Server and S/MIME requirements (for CAs in our root DB). They don't validate that an arbitrary CA in their root DB has proper code signing certificate issuance procedures. So this theoretically application is in the wrong and they consider it a high severity vulnerability.
But I agree, there's an open question about _who_ is using the DB this way.
Some roots in Mozilla's store are trusted for TLS only, some for S/MIME only, and some for both. The blog post is about applications which are using Mozilla's root store to verify certificates which are for a different purpose than the root is trusted for.
For example, NuGet uses Mozilla's root store to verify code signing certificates, which is obviously wrong because none of the roots in Mozilla's store are trusted for the purpose of code signing: https://github.com/NuGet/Announcements/issues/56
Rather, it's about well-intentioned apps using Mozilla's root store in their own https client, but doing it incorrectly so they don't get the security guarantees they think they are getting.