Skip to content

Refresh enclave TLS trust after eMudhra intermediate compromise - #1185

Merged
AnthonyRonning merged 3 commits into
masterfrom
codex-emudhra-trust-maple
Oct 21, 2026
Merged

AnthonyRonning merged 3 commits into
masterfrom
codex-emudhra-trust-maple

Conversation

@AnthonyRonning

@AnthonyRonning AnthonyRonning commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Refresh the enclave's generated CA bundle from NSS 3.126 to 3.131.1 and update the Rust TLS root/verifier packages after the eMudhra intermediate-key compromise. Keep the pinned Nix framework and kernel derivation unchanged.

Reviewed version delta

  • The exact generated NSS full and TLS bundles remove only three eMudhra roots: emSign Root CA - C1, emSign ECC Root CA - C3, and emSign ECC Root CA - G3. No roots are added; the other generated certificate blocks are unchanged. Clients relying solely on those anchors may need a different trusted chain.
  • rustls-webpki 0.103.14 → 0.103.16 adds distrust of the eight affected intermediate public keys, including cross-signed chains. Its AWS-LC ML-DSA FIPS metadata also changes; this app selects Ring for its Rust TLS provider.
  • webpki-roots and webpki-root-certs 1.0.8 → 1.0.10. The compiled webpki-roots set removes emSign ECC G3 and Atos TrustedRoot 2011, adds SECOM TLS ECC/RSA 2024 and Telia EC/RSA v3, and retains emSign C1/C3/G1. This set is distinct from the generated NSS bundle; the verifier update covers the affected intermediate keys.

Version delta and compatibility

  • NSS 3.131.1 supplies only newer certdata to the enclave CA derivation (3.126 → 3.131.1); this PR does not upgrade the NSS library, Nixpkgs pin, or kernel. Upstream also moves Izenpe.com's existing 2026-04-15 server-distrust date to the correct certificate object (Mozilla bug 2017322). The locally realized old/new OpenSSL bundle entries for Izenpe are byte-identical; the corrected date reaches Nix's p11-kit output, while this EIF selects the OpenSSL PEM bundle. That PEM output does not encode an issuance-date cutoff, a pre-existing format limit rather than a regression from this PR.
  • rustls-webpki 0.103.16 (from 0.103.14) adds an eight-key SPKI blocklist at certificate path building, including cross-signed paths (implementation and tests); 0.103.15 only changed docs.rs metadata. Its new non-exhaustive CertDistrusted error takes rustls 0.23.46's existing generic CertificateError::Other mapping, so a rejected chain may have a generic outward TLS diagnostic.
  • webpki-roots and webpki-root-certs 1.0.8 → 1.0.10 update static roots: 1.0.9 adds four Telia/SECOM TLS roots and removes Atos TrustedRoot 2011; 1.0.10 removes emSign ECC G3. Chains depending on removed roots or the blocked keys will fail intentionally where those trust paths are selected. The selected user-ramdisk CA gate is build-input evidence; final EIF extraction, compiled Rustls trust behavior, and deployed TLS remain separate release checks.

PR-only EIF rootfs diagnostic

Signed commit e83a5cfd3a36015db015485dff0075b9ac7c5767 adds a fail-closed check after each unsigned Dev/Prod PR candidate build. Signed commit 7841ea20508fc49b56b62016c90b633f56cf0b32 handles a cached final EIF: Nix can substitute that output without materializing its user ramdisk input. The verifier now finds the unique direct user-ramdisk derivation in the EIF's inputs.drvs, checks its output against the path in ramdisksArgs, and explicitly realizes that exact input with nix build --no-link. Nix may substitute the ramdisk or build it if no substitute is available.

The check inspects the selected user-initramfs CPIO, verifies Nitro init's /cmd selects /bin/entrypoint, resolves the entrypoint's CA path, and hashes the CA bytes inside the archive. Those archived bytes are the primary CA evidence. If the separate CA store path is materialized, its bytes must match the archive; otherwise the report says not_materialized. The archived bundle must omit the three affected emSign roots. If Comodo AAA remains in the full bundle, the check requires it to be absent from ordinary TLS PEM roots and explicitly rejected by OpenSSL for server trust. The check also matches candidate EIF/PCR bytes, checksums, and handoff data to the Nix output and PR merge-ref SHA, then prints hashes, comparison status, and PCRs in the job summary.

This is a no-upload PR diagnostic: it produces no GitHub artifact, signed or attested release handoff, approval, or deployment. Existing Nix cache behavior can still retain build outputs. It inspects the user ramdisk input consumed by the EIF builder, not a separately extracted final EIF. OpenSSL purpose and ordinary-PEM checks do not establish the compiled Rustls client's runtime trust behavior.

Validation and current evidence

  • Original signed commit d7cf6d20670ce32328f05cb6f2a161fc7912396d received independent code and dependency review: GO for candidate CI.
  • The original exact old/new generated CA-bundle Nix check passed, asserting the three-root removal, zero additions, and unchanged Comodo AAA email/TLS purpose behavior in those generated artifacts.
  • Original local flake checks, formatting, warnings-as-errors Clippy, and 865 Rust tests passed; 33 local-DB tests were ignored by the existing test setup. The EIF derivation still selects the same kernel derivation.
  • At previous head d7cf6d2, hosted CI passed Dev and Prod unsigned EIF candidate builds, backend format/lint/tests, Nix checks/package, SDK integration, and Rust advisory checks. Those candidate hashes belong to that previous head.
  • At intermediate head e83a5cfd, both hosted candidate jobs fetched the cached final EIF and then failed because its user ramdisk was absent locally. This exposed an input-realization assumption in the diagnostic; it was not a CA trust finding.
  • At current head 7841ea205, the local focused diagnostic suite (11 tests), workflow suite (55 tests), targeted Darwin Nix workflow check, and repository pre-commit suite (486 tests) passed. Hosted Dev and Prod ARM64 candidate jobs also passed the build and user-ramdisk CA gate; both steps executed. Candidate EIF SHA-256: Dev 0d306732feb0735b64b872b3048092764a9835cba84ce0cf6a2b31192217391d; Prod 8c1eb439803f47c1fa4339e1c4b981c4e0a38b5a072d4b4a147efc0e2bfc97c7.
  • Both archived CA bundles contain 169 certificates and hash to 81ffe9877138a9e9bee56e067479a5abd59c65cdbb310d830b13108e1afe4e33. The gate excludes emSign C1/C3/G3 and reports comodo_aaa_tls_policy=retained_rejected_for_openssl_tls. Both jobs report ca_store_comparison=not_materialized: the separate Nix store CA object was absent, so archive-to-store byte comparison did not run. This is unsigned PR merge-ref/input-ramdisk evidence, not final EIF extraction, master release/attestation, approval, or runtime TLS proof.
  • At the final PR head, OpenSecret format/lint/tests, OpenSecret Nix checks/application package, and SDK integration passed. All other applicable PR checks passed; EIF/PCR approval-match jobs were intentionally skipped because this PR does not edit approval files. The exact head 7841ea20508fc49b56b62016c90b633f56cf0b32 merged as master commit 7c408ea52228ba55d8c31ab72148963cf44f3d0f.

Release gates

The master release build and its downloadable artifact/attestation, output/rootfs inspection, measured PCR and protected approval updates, legacy PCR mirror publication, encrypted origin/app smokes, and a separately controlled deployment remain required. This PR does not establish live trust behavior or evidence of an attack. Do not deploy based on PR candidate checks.

@AnthonyRonning
AnthonyRonning marked this pull request as ready for review October 21, 2026 00:04
@AnthonyRonning
AnthonyRonning merged commit 7c408ea into master Oct 21, 2026
34 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.

1 participant