Repository navigation
Drop the compromised emSign CA from every trust path - #4
Merged
Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Removes trust in emSign ECC Root CA - G3 and in the emSign intermediates whose private keys have leaked, across every TLS path in the backend.
The backend trusts certificates through four sources, and each needed its own change.
Compiled-in roots.
webpki-roots1.0.7 (the Nostr relay path) moves to 1.0.10, the first release without G3. The Electrum client usedwebpki-roots0.25.4, a line that will never get the fix, so the patchedelectrum-clientfork now depends on 1.0.10 and its pinned rev moves to that commit, taggedblake2b-extended-headers-v2.webpki-root-certsmoves to 1.0.10 as well; it is not linked on Linux, but it is in the lockfile.The verifier.
rustls-webpkimoves to 0.103.16, which rejects any certificate path containing one of the eight leaked emSign intermediate keys, whatever trust anchors are configured. That covers the rustls paths that mix in system roots.The system store.
reqwestuses native-tls here (resend-rsenables it), so ntfy, Telegram, email, webhooks, exchange rates and the other HTTP clients verify against the image'sca-certificates, and the Nostr relays add the same store to their roots. The 1.7.0 image ships20250419~deb12u1, which still trusts G3 and AAA Certificate Services.ca-certificatesis now pinned to20250419~deb12u2, which drops both. The pin also invalidates the cachedapt-getlayer, which would otherwise be reused because the base image digest and the instruction text are unchanged.Electrum. canary leaves
validate_domainat its default oftrue, so everyssl://server is checked against the compiled-in store. Moving from 0.25.4 to 1.0.10 also syncs that store to Mozilla's current set: 147 anchors become 120, removing roots Mozilla has distrusted or retired, including the Entrust and AffirmTrust roots, DigiCert Global Root CA, GlobalSign Root CA and AAA Certificate Services. ISRG Root X1 and X2 remain. Anssl://Electrum server whose chain ends only at a removed root will now fail verification.backend/osv-scanner.tomloverrideswebpki-roots0.26.11 only. That version is the compatibility shimtokio-tungsteniterequires; its whole implementation ispub use parent::TLS_SERVER_ROOTS, re-exporting the 1.0.10 locked beside it. RUSTSEC-2026-0381 matches every release below 1.0.10, so the advisory flags the shim by version alone. The override is scoped to that exact version, so a realwebpki-roots1.x below 1.0.10 still fails the scan.Verified on the built image:
ca-certificatesis20250419~deb12u2, and none of the 148 certificates in/etc/ssl/certs/ca-certificates.crtmatches the G3 or AAA public key. Trivy reports no findings. Livessl://handshakes withvalidate_domain = trueagainst the pinned rev behave as before: a server with a publicly trusted chain completes the handshake and a call, and two servers presenting self-signed certificates are rejected identically to the previous rev.