Closed Bug 1874054 Opened 2 years ago Closed 2 years ago

prevent loading known roots as third party certificates

Categories

(Core :: Security: PSM, enhancement, P1)

enhancement

Tracking

()

RESOLVED FIXED
123 Branch
Tracking Status
firefox123 --- fixed

People

(Reporter: keeler, Assigned: keeler)

References

Details

(Whiteboard: [psm-assigned])

Attachments

(2 external files)

If the platform code to discover third party certificates ever imports a certificate that is already a built-in root, bad things can happen. Bad thing 1: if the "third party" certificate is used as an intermediate when it's really a built-in trust anchor, certificates issued from that root will not verify correctly because the root's trust will be "inherits trust" and there will usually be no valid issuer for that root (see e.g. bug 1873724). Bad thing 2: if the "third party" certificate is used as a root and the user has edited the default settings to not trust that root, it will unexpectedly be trusted again. We should avoid importing already-known built-in roots from the OS (ideally, we'd check all other modules so as to not override their settings as well, but that's slow and we don't want to do that at startup).

If the platform code to discover third party certificates ever imports a
certificate that is already a built-in root, bad things can happen, so this
patch prevents that.

Bad thing 1: if the "third party" certificate is used as an intermediate when
it's really a built-in trust anchor, certificates issued from that root will
not verify correctly because the root's trust will be "inherits trust" and
there will usually be no valid issuer for that root (see e.g. bug 1873724).

Bad thing 2: if the "third party" certificate is used as a root and the user
has edited the default settings to not trust that root, it will unexpectedly be
trusted again.

Ideally, we'd check all loaded modules (in particular, the softoken) so as to
not override their settings as well, but that's slow and we don't want to do
that at startup.

Depends on D198213

Blocks: 1871011
Pushed by dkeeler@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/6c1d1d21bf66 use nsTArray instead of Vector for enterprise certs r=jschanck https://hg.mozilla.org/integration/autoland/rev/0fb8ac147b3b prevent loading known built-in roots as third party certificates from the OS r=jschanck
Status: NEW → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 123 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: