Skip to content

SECURITY: chromium-bin: distrust the compromised eMudhra keys via CADistrustedCertificates policy (CVE-2026-111943) - #961

Merged
bryan-minimal merged 4 commits into
mainfrom
chromium-distrust-emudhra
Oct 22, 2026
Merged

bryan-minimal merged 4 commits into
mainfrom
chromium-distrust-emudhra

Conversation

@bryan-minimal

@bryan-minimal bryan-minimal commented Oct 20, 2026 •

Copy link
Copy Markdown
Member

What's compromised

CVE-2026-111943. The private keys of eight eMudhra intermediate CAs (EM DV/OV/EV TLS CA and EM OV CS CA, generations G3B and G3C) are recoverable from their public certificates (Mozilla bug 2083449). The ca-certificates fix is #948, and sibling PRs cover the other TLS stacks.

Chromium does not use /etc/ssl/certs. On Linux it verifies against its own compiled-in Chrome Root Store, so #948 does nothing for it. Our builds are also exposed:

  • The root is still trusted. Both pinned builds still carry emSign ECC Root CA - G3 in their compiled-in store. That is the only Chrome-trusted root the emSign-issued chains reach. The Sectigo AAA root left the Chrome Root Store long ago.
  • The keys are not blocklisted. I grepped the 32-byte SPKI hashes in all four binaries: snapshot x64, Playwright arm64, CfT headless-shell 155 and ungoogled 155. None of the 8 keys is in the built-in blocklist.
  • No updates arrive. These builds get no CRLSet or root-store component updates.

Chromium fixed this on main today (2026-10-20), and no release carries the fix yet:

  • da63b94c (main@{#1723080}) blocklists the 8 intermediates;
  • 8793082f (main@{#1723181}, Chrome Root Store v43) removes emSign ECC Root CA - G3;
  • CfT Stable 155.0.8059.84, Beta 157.0.8103.6 and Canary 158.0.8113.0 all lack both changes. I checked the source at each tag.

What changes

New package chromium-policies. It installs /etc/chromium/policies/managed/ca-distrusted-certificates.json, which sets the CADistrustedCertificates enterprise policy.

  • Support: the policy definition says supported_on: chrome.*:132-, so Linux is covered, and our builds are 153 and 155.
  • How Chromium applies it: in 155, ProfileNetworkContextService::GetCertificatePolicy extracts each listed certificate's SPKI into distrusted_spkis, with no feature gate. Every certificate with that key is then distrusted for TLS server auth.
  • Contents: 9 certificates.
    • The 8 compromised keys, as their emSign-issued certificates. These are the same 8 certificates Chromium added to its blocklist in da63b94c. Matching is by SPKI, so one certificate per key also covers the Sectigo AAA cross-sign and the ECDSA-malleated twins. Listing all 16 would add nothing.
    • emSign ECC Root CA - G3, mirroring what both Mozilla (NSS 3.131.1, bug 2084101) and Chrome Root Store v43 did.
      • Collateral: every other site under that root stops validating in our Chromium, exactly as in current Firefox and in Chrome once v43 ships.
      • Not listed: emSign Root CA - G1, which Chrome still trusts and which is not involved.
  • Path: Chromium-branded builds read this directory (policy::kPolicyPath in components/policy/core/common/policy_paths.cc). All three Chromium-branded binaries contain the string /etc/chromium/policies: the snapshot x64 build, the Playwright arm64 build and ungoogled-chromium 155. Chrome and CfT branding would read /etc/opt/chrome{,_for_testing}/policies, but nothing in the tree uses those, so they are not shipped.
  • One file per policy key. Chromium merges every *.json in the directory, but a key set in two files is not merged. Future distrust entries therefore go into this file, never into a second one.

chromium-bin. It gets chromium-policies as a runtime dep, plus a policy_installed standalone test. Version and sources are unchanged.

chromium-headless-shell-bin: comment only. ⚠ It stays vulnerable, and nothing at package level can fix it.

  • No policy loader. chrome-headless-shell cannot load platform policy. Chromium deleted headless/lib/browser/policy/: it is present at the 145.0.7632.0 tag and gone by 150.0.7871.46. Even before that, it handled only HeadlessMode, URLBlocklist/Allowlist and RemoteDebuggingAllowed.
  • Checked in the binary. The 155.0.8059.84 binary contains no /etc/.../policies path and no CADistrustedCertificates string.
  • No other lever. I found no flag that distrusts a key. The NSS user DB is per-$HOME and matches whole certificates, not SPKIs.
  • So the dep stays off. Adding chromium-policies here would only look like a fix.
  • Real fixes:
    • bump to the first CfT Stable that carries da63b94c and 8793082f;
    • or move consumers that browse untrusted sites (agent-browser; mermaid-cli renders local diagrams) to chromium --headless from chromium-bin.

Alignment with the canonical denylist (pkgmgr-rs#1020). .github/scripts/chromium_policy_distrust_check.py and the chromium-policy-distrust workflow check that every certificate in the policy has its SPKI SHA-256 listed as an spki line in packages/ca-certificates/distrust.txt (#948). The policy needs whole certificates, so it can't be generated from those hashes. Until #948 merges, distrust.txt is absent and the job warns and passes. It enforces from then on.

Tests

Build-time (build.sh, gates the artifact):

  • The JSON must be {"CADistrustedCertificates": [...]} and nothing else.
  • Every entry must base64-decode to a DER X.509 certificate, and no two entries may share a key.
  • The set of SPKI SHA-256 hashes must equal the 9 expected ones exactly.
  • Five negative controls must be rejected: one key missing, a duplicate key, a non-certificate entry, a misspelled policy name, and an extra policy in the file.

Standalone:

  • chromium-policies.policy_installed re-derives the 9 SPKI hashes from the installed file with openssl.
  • chromium-bin.policy_installed checks that the file is where the browser looks.

Verified locally (no package build, no container):

  • Dry run of build.sh on the real file (jq + LibreSSL 3.3.6): it passes. Three mutants all fail at the expected check: an expected key dropped, the set comparison disabled, and a negative control disabled.
  • Standalone test command: passes on the dry-run output, and fails with one hash altered.
  • Alignment script:
  • Policy cross-checks: every policy certificate's SHA-256 and SPKI matches the incident data, and the root's SHA-256 is 86a1ecba…be6b.
  • Dump: mip dump evaluates on amd64 and arm64.

Online check: not run, needs network. The PR's chromium-bin should reject the emSign chain and still load a normal site:

F="--headless --no-sandbox --disable-gpu --disable-dev-shm-usage --enable-logging=stderr --v=0"
# must print ERR_CERT_* (main's chromium-bin loads the page: that's the control)
/bin/chromium $F --user-data-dir=$(mktemp -d) --dump-dom https://dv-g3b-emudhra.we-have-a-problem.com/ 2>&1 | grep -o -E 'ERR_CERT_[A-Z_]+' | sort -u
# fails even on main (Chrome dropped Sectigo AAA), so it does not prove the fix
/bin/chromium $F --user-data-dir=$(mktemp -d) --dump-dom https://dv-g3b-aaa-emudhra.we-have-a-problem.com/ 2>&1 | grep -o -E 'ERR_CERT_[A-Z_]+' | sort -u
# positive control: must load
/bin/chromium $F --user-data-dir=$(mktemp -d) --dump-dom https://letsencrypt.org/ 2>&1 | grep -c -i "let's encrypt"
# policy visible (may print 0 if chrome://policy renders only in JS; then rely on the first check)
/bin/chromium $F --user-data-dir=$(mktemp -d) --dump-dom chrome://policy 2>&1 | grep -c CADistrustedCertificates

/bin/chromium-headless-shell is expected to still load the first URL, for the reasons above.

🤖 Generated with Claude Code

Summary by CodeRabbit

  • New Features

    • Added managed Chromium policies that distrust nine specified certificate authorities.
    • Chromium now installs and applies the certificate distrust policy.
    • Added validation to ensure policy files contain the expected certificates and format.
  • Bug Fixes

    • Added automated checks that detect mismatches between Chromium’s distrust policy and the system certificate denylist.
  • Documentation

    • Documented the current security limitation affecting the headless Chromium shell.

…erprise policy (CVE-2026-111943)

New package chromium-policies installs
/etc/chromium/policies/managed/ca-distrusted-certificates.json, a
CADistrustedCertificates policy (Chrome 132+, Linux) listing the 8
compromised eMudhra intermediate keys and emSign ECC Root CA - G3.
Chromium matches by SPKI, so one certificate per key covers the emSign
copy, the Sectigo AAA cross-sign and the ECDSA-malleated twins.
build.sh fails unless the file holds exactly those 9 keys, and five
negative controls prove the check can fail.

chromium-bin takes it as a runtime dep; versions and sources unchanged.
chromium-headless-shell-bin cannot read platform policy (no loader since
Chromium ~150; the 155 binary has no policy path or policy name), so it
only gets a comment documenting the gap.

A CI job checks every policy key against the `spki` lines of
packages/ca-certificates/distrust.txt; it warns until #948
lands that file.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal requested a review from a team as a code owner October 20, 2026 23:24
@coderabbitai

coderabbitai Bot commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Warning

Review limit reached

  • Run on-demand review

This review includes 5 billable files and costs up to $1.25.

  • Ask an admin to make reviews automatic

Open in CodeRabbit

Reviews can continue after your included limit without a manual trigger. An admin must approve usage-based billing.

Or wait 7 minutes for your next included review.

Check out review usage here.

View limit details

Limit details: You’ve used all 2 included reviews currently available. Your 55 included PR review attempts over the past 7 days set your current allowance at 2 reviews per hour.

Learn how review limits work.

Review configuration:

⚙️ Run configuration
  • Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: f3e81a27-80fa-44f6-8fd9-e611497050a9
📥 Commits

Reviewing files that changed from the base of the PR and between 439799d and 89b16f2.

📒 Files selected for processing: 5
  • .github/scripts/chromium_policy_distrust_check.py
  • .github/workflows/chromium-policy-distrust.yml
  • packages/chromium-headless-shell-bin/build.ncl
  • packages/chromium-policies/build.ncl
  • packages/chromium-policies/build.sh

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: gominimal/pkgs/.coderabbit.yaml
  • Review profile: CHILL
  • Plan: Essentials
  • Run ID: c79eab6a-a3fa-404b-b1c8-b933e32f7553
📥 Commits

Reviewing files that changed from the base of the PR and between a19e4dc and 439799d.

📒 Files selected for processing: 7
  • .github/scripts/chromium_policy_distrust_check.py
  • .github/workflows/chromium-policy-distrust.yml
  • packages/chromium-bin/build.ncl
  • packages/chromium-headless-shell-bin/build.ncl
  • packages/chromium-policies/build.ncl
  • packages/chromium-policies/build.sh
  • packages/chromium-policies/ca-distrusted-certificates.json

Included review availability: This review used your included allowance. 0 included reviews remain after this review. Your included PR review attempts over the past 7 days set your current allowance at 3 reviews per hour.

📝 Walkthrough

The PR adds a managed Chromium certificate-distrust policy with nine certificates, packages it for chromium-bin, and adds build-time and CI checks against expected SPKI hashes and the certificate denylist. It also documents the remaining mitigation gap in chrome-headless-shell.

Changes: Chromium certificate distrust policy

Layer / File(s) Summary
Define, validate, and install the policy
packages/chromium-policies/ca-distrusted-certificates.json, packages/chromium-policies/build.sh, packages/chromium-policies/build.ncl
The package defines nine certificates, validates policy structure and SPKI hashes, tests rejection of invalid inputs, and installs the validated policy JSON.
Include the policy in chromium-bin
packages/chromium-bin/build.ncl, packages/chromium-headless-shell-bin/build.ncl
chromium-bin adds the policy package as a runtime dependency and tests for the managed policy key. The headless-shell build specification documents that its binary lacks the policy and current root-store mitigations for CVE-2026-111943.
Check policy alignment in CI
.github/scripts/chromium_policy_distrust_check.py, .github/workflows/chromium-policy-distrust.yml
The checker parses policy certificates and compares their SPKI hashes with the denylist. The workflow runs the check on relevant pull requests and manual dispatches.

Priority: ⬆️ High

Estimated code review effort: 4 (Complex) | ~45 minutes

Change: Bug fix

Sequence Diagram(s)

sequenceDiagram
  participant chromium-policies
  participant build.sh
  participant ManagedPolicy
  participant chromium-bin
  chromium-policies->>build.sh: Runs policy validation and installation
  build.sh->>ManagedPolicy: Installs validated policy JSON
  chromium-bin->>ManagedPolicy: Includes the policy package at runtime
Loading

Possibly related issues

  • gominimal/pkgmgr-rs#1028 — Covers the same headless-shell CVE exposure and references the policy mitigation for chromium-bin and the remaining headless-shell gap.
  • gominimal/pkgmgr-rs#1022 — Tracks the CVE response and identifies chromium-policies as the Chromium mitigation implemented and connected to chromium-bin.

Suggested reviewers: mitodrummer, 0chroma

Merge Risk: ⚪ Minimal · up to 43979

The policy and its validation checks are ready for normal merge checks. The documented headless-shell mitigation gap remains outside this policy’s coverage.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (5 skipped: 5… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Description Check Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check Passed The title clearly identifies the security change, the affected Chromium package, the CADistrustedCertificates policy, the compromised eMudhra keys, and the related CVE.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 37.50% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 8 functions across 2 files. (5 skipped: 5 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mitodrummer mitodrummer 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.

Approving with nits. Verified by computation: all 9 entries decode to the 8 eMudhra intermediates (EM DV/OV/EV TLS CA and OV CS CA, G3B and G3C) plus emSign ECC Root CA - G3. The 8 intermediates match Chromium's da63b94c blocklist by certificate SHA-256 and SPKI SHA-256; the root is byte-identical to the one removed in 8793082f. The SPKI set in build.sh, the standalone test and the Python checker agree, and the checker reports OK against the now-merged distrust.txt from #948. By reading Chromium 155: the CADistrustedCertificates loop in ProfileNetworkContextService has no feature gate, policy_paths.cc reads /etc/chromium/policies for Chromium branding, and headless/lib/browser/policy is gone by 150, so the headless-shell claim holds. build.sh's five negative controls each exercise a distinct branch and none can pass vacuously.

Should fix

  • chromium_policy_distrust_check.py / chromium-policy-distrust.yml: the "distrust.txt absent, warn and exit 0" branch is now a silent-disable hole since #948 merged. If the file is renamed or moved the guard goes green with only a warning annotation. Make absence an ::error:: exit 1.
  • CI has only run the warn path (both runs predate #948). Update the branch and confirm the job logs the OK line.
  • chromium-headless-shell-bin stays vulnerable and is what agent-browser drives against untrusted sites. Open a tracking issue whose trigger is the first CfT Stable carrying da63b94c and 8793082f (Chrome expects its root store update in Stable 2026-10-27), so the comment isn't the only record.

Note: the in-browser proof (emSign chain rejected, letsencrypt loads, negative control without the dep connects) is in #960's arm64 end-to-end run.

Nits

  • chromium-policies/build.ncl standalone test repeats build.sh's 9 hashes; drift fails loudly, but there are two places to edit and the test prints no diff on failure.
  • build.sh: the summary line hard-codes "5 negative controls"; the SPKI hash comes from openssl's re-encoded key while Chromium and the Python script hash raw bytes (they agree for these 9).
  • Checker: a non-string list entry raises an uncaught TypeError (still non-zero, but no ::error:: annotation).
  • Workflow checkout lacks persist-credentials: false (matches sibling workflows).

bryan-minimal and others added 2 commits October 21, 2026 14:01
Review follow-ups (mitodrummer):
- chromium_policy_distrust_check.py: a missing distrust.txt is now an
  ::error:: and exit 1, not a warning and exit 0 (#948 has merged, so
  absence means the file moved and the guard must not go green). A
  non-string CADistrustedCertificates entry is an ::error:: annotation
  instead of an uncaught TypeError.
- workflow: persist-credentials: false on the checkout; drop the
  "warns until #948" comment.
- chromium-policies standalone test prints a diff on mismatch; comment
  that the 9 hashes are repeated from build.sh.
- build.sh counts its negative controls instead of hard-coding 5, and
  notes the SPKI hash method difference (openssl re-encoded key vs the
  certificate's raw SPKI bytes; equal for all 9, checked).
- chromium-headless-shell-bin: cite gominimal/pkgmgr-rs#1028, the
  tracker for the unmitigated headless shell.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Picks up #948 (distrust.txt) so the policy check runs its enforcing path.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal

Copy link
Copy Markdown
Member Author

Thanks @mitodrummer. All points addressed in 226374a, plus a merge of main (439799d) that brings in #948.

Should fix

Nits

  • Standalone test. It now prints a diff (expected vs installed) on mismatch. I kept the 9 hashes in two places rather than deriving them, because the standalone test cannot read build.sh. Comments in both files now point at each other.
  • build.sh summary. The negative-control count is computed (NEG_CONTROLS), not hard-coded as 5.
  • SPKI hash method. There is a comment on EXPECTED_SPKIS: build.sh and the test hash openssl's re-encoded key (x509 -pubkey | pkey -pubin -outform DER), while Chromium and the Python checker hash the certificate's own SPKI bytes. They agree for canonical DER. I re-checked all 9 both ways (identical sets), and a non-canonical future entry would show up as a mismatch.
  • Non-string entry. Now an ::error:: annotation (CADistrustedCertificates[0] is int, not a base64 string), exit 1, instead of a TypeError.
  • persist-credentials. persist-credentials: false is on the checkout (it shows in the run log above).

minimal build for 439799d is queued behind a world rebuild on the build-bot. I'll add the result when it lands.

🤖 Generated with Claude Code

@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 22, 2026
@bryan-minimal
bryan-minimal removed this pull request from the merge queue due to a manual request Oct 22, 2026
@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 22, 2026
@github-merge-queue
github-merge-queue Bot removed this pull request from the merge queue due to a conflict with the base branch Oct 22, 2026
…ith #960)

#960 merged first carrying an earlier copy of this branch (2b4583a), so the
add/add conflicts are that copy against this branch's review-fix commit
226374a. Resolved to exactly main + 226374a (verified identical to a
cherry-pick of 226374a onto origin/main): chromium-bin/build.ncl is main's
(ungoogled, #960); the checker, workflow, chromium-policies and the
headless-shell comment carry 226374a's changes. The checker passes against
main's distrust.txt (9/9 policy keys are spki entries).

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@bryan-minimal
bryan-minimal added this pull request to the merge queue Oct 22, 2026
Merged via the queue into main with commit e6990f9 Oct 22, 2026
12 checks passed
@bryan-minimal
bryan-minimal deleted the chromium-distrust-emudhra branch October 22, 2026 00:35
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