Skip to content

fix: reject compromised eMudhra keys in Rust TLS builds - #179246

Merged
joshavant merged 1 commit into
mainfrom
remediation/emudhra-rust-tls-2026-10-21
Oct 21, 2026
Merged

joshavant merged 1 commit into
mainfrom
remediation/emudhra-rust-tls-2026-10-21

Conversation

@joshavant

@joshavant joshavant commented Oct 21, 2026 •

Copy link
Copy Markdown
Collaborator

What Problem This Solves

Rust builds still select WebPKI and root data released before the disclosed eMudhra intermediate-key compromise.

User Impact

Rebuilt standard WebPKI clients reject the disclosed incident chains even with the old affected CA roots present. The updated root dataset also distrusts emSign ECC G3, including legitimate chains relying exclusively on that anchor. Existing installed binaries need a subsequent build and release; native platform verifiers and explicit leaf-pin policies retain their separate contracts.

Why This Change Was Made

Regenerate the two owned locks with compatible rustls-webpki 0.103.16 and desktop webpki-root-certs 1.0.10. Only the three selected version/checksum entries change. No manifest, override or dependency fork is added.

Evidence

  • Cargo 1.99.1 generated each lock with precise updates; desktop cargo metadata --locked --no-deps passes.
  • Actual selected Rustls/WebPKI verification against all twelve public incident chains and an affected 150-root CA store: old lock accepts 12/12; updated lock accepts 0/12, all rejected as CertDistrusted.
  • cargo test --manifest-path crates/Cargo.toml --locked --workspace: 147 tests passed, plus doc tests.
  • Independent autoreview found no actionable P0–P2 findings; registry checksums and dependency minimum Rust versions match. git diff --check passes.

Proof ran in a task-owned, secretless Linux arm64 UTM guest. Native desktop packaging and its OS-specific verifier paths remain for owning CI/platform validation. No image/release publication, deployment or restart is included.

Landing qualification

Exact-head CI completed. The failed core tooling typecheck reports TS2345 at test/scripts/ci-changed-node-test-plan.test.ts:813:33 and :891:33: CompactNodeTestShard lacks the required configs field. These calls entered main in 0f750efb137b20adf321409d3e30291363cb75e7 before either PR; the failure classifier compared against an earlier scheduled main run. Inspection of the actual CI merge checkout confirms the failing test, planner, dependency and workflow inputs are identical to its main parent. Only that inherited failure and its aggregate CI gate are red. The native pre-existing-failure landing route retains those failed results; it does not claim green CI. Independent security and other enforced gates still apply.

The Linux, macOS and Windows desktop jobs and Windows installer check passed on this head. The retained verifier output contains twelve Ok(ServerCertVerified(())) results before the change and twelve Err(InvalidCertificate(Other(OtherError(CertDistrusted)))) results after it, using the affected 150-root data. This exercises the selected standard WebPKI verifier. An authenticated Gateway flow or a different native/custom verifier was not exercised. The advisory request for additional application transport evidence remains a stated qualification, rather than an identified defect in this compatible lock update. Existing installed binaries still need replacement builds through their release owners.

@clawsweeper

clawsweeper Bot commented Oct 21, 2026 •

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

ClawSweeper review complete

ClawSweeper finished reviewing this revision. The review result is being finalized.

View the workflow run.

@clawsweeper clawsweeper Bot added clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. P1 High-priority user-facing bug, regression, or broken workflow. merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask. and removed clawsweeper:intake:bug Preliminary submission classification; full source review pending. clawsweeper:intake:needs-environment Preliminary submission classification; full source review pending. clawsweeper:intake:needs-repro Preliminary submission classification; full source review pending. labels Oct 21, 2026
@clawsweeper

clawsweeper Bot commented Oct 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs real behavior proof before merge.

What this changes

Updates Rust WebPKI verification and desktop root certificates to distrust the disclosed eMudhra incident keys and emSign ECC G3 root.

Example: A standard WebPKI client validates an incident chain using the affected CA store.

  • Before: The PR reports that rustls-webpki 0.103.15 accepts all 12 incident chains.
  • After: The PR reports that 0.103.16 rejects all 12 with CertDistrusted.

Review scores

Measure Result What it means
Overall readiness 🧂 unranked krab (1/6) The dependency patch is minimal and source-supported, but the required final-effect authority proof is absent.
Proof confidence 🧂 unranked krab (1/6) Real behavior proof is necessary before merge. See Before merge.
Patch quality 🦐 gold shrimp (3/6) Security review found an item that needs attention.

Product

Kind: Bug fix · Worth it: Yes · Fix scope: Complete
User problem: Rebuilt standard Rust WebPKI clients can trust certificate chains containing the disclosed incident keys.
Reason: Upstream implements targeted security distrust, and the maintainer-authored PR explicitly records its compatibility cost and separate native/pinned trust contracts.

Merge readiness

⛔ Blocked before merge - 3 items remain

Keep this PR open: it is maintainer-authored, addresses a verified upstream security change, and contains a minimal lockfile update with no identified code defect.

Priority: P1
Reviewed head: fbf25294c4fa0147f354f1e116bb8a5cc7f093cd

Before merge

  • Add real behavior proof - Authority-chain proof required: The body reports actual Rustls/WebPKI verification in a secretless Linux arm64 guest, changing incident-chain acceptance from 12/12 to 0/12, but supplies no production-connection trace showing an allowed peer succeeds and a distrusted peer is rejected before application data or credentials leave OpenClaw. Provide redacted logs or terminal output through the real connection owner or an authorized production-path harness; redact keys, IPs, and non-public endpoints. After adding proof, update the PR body, then request a new review with @clawsweeper re-review. The PR author or someone with repository write access can request it.
  • Resolve security review attention item - No supply-chain regression was identified, but final-effect authority evidence remains incomplete.
  • Resolve merge risk - Before merge, establish that the changed TLS peer-admission policy rejects distrusted peers at OpenClaw's application-data boundary while allowing an unaffected peer.

Findings

None.

Tests

  • Missing end-to-end proof: The reported direct verifier comparison does not show an unaffected peer succeeding and a distrusted peer being rejected before application writes through the production Rust connection owner.
Agent review details

How this fits together

The shared Rust Gateway client and Tauri desktop dependency graphs supply TLS verification for network connections; certificate chains enter the verifier, and successful verification permits application traffic under the selected trust policy.

flowchart TD
  A[Remote TLS peer] --> B[Rust TLS client]
  B --> C[Selected trust policy]
  C --> D[WebPKI verification]
  C --> E[Native policy or explicit pin]
  D --> F[Reject or permit application traffic]
  E --> F
Loading

Technical review

Best possible solution:

Retain the minimal upstream lockfile updates and complete the authority-boundary evidence before merging through the existing CI gates.

Do we have a high-confidence way to reproduce the issue?

Current-main locks select the older verifier, and upstream source confirms the new release adds explicit incident-key rejection; the reported 12-chain comparison was not independently executed during this read-only review.

Is this the best way to solve the issue?

Updating the existing dependency owners is the smallest complete fix for the stated standard-WebPKI scope, without adding a fork, override, or competing trust implementation.

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning medium; reviewed against bbfdaf4795f8.

Merge-risk options

Maintainer options:

  1. Complete production-boundary verification (recommended)
    Supply a redacted production-path trace showing an unaffected peer succeeds and an incident-chain peer is rejected before HTTP or Gateway credentials are sent.

Provenance checked

  • Desktop rustls-webpki selection keeps the original intent (c77420a: The prior dependency refresh selected compatible stable desktop dependencies; no intentional requirement to retain the older verifier was found.)
  • Desktop root certificate dataset changes intended behavior with a stated reason (acd92f6: The repository dependency refresh updated native dependency graphs while preserving documented compatibility holds.)
  • Shared Rust verifier selection keeps the original intent (d0f40a8: The prior refresh advanced eligible dependencies and security-fixed Rustls while retaining existing compatibility contracts.)

Testing

Proof path: unit tests only.

Security

Needs attention: No supply-chain regression was identified, but final-effect authority evidence remains incomplete.

Evidence

What I checked:

  • Verified introduced patch: The pinned introduction changes only version and registry checksum fields for rustls-webpki in both locks and webpki-root-certs in the desktop lock. (apps/linux/src-tauri/Cargo.lock:3831, fbf25294c4fa)
  • Authoritative verifier contract: The patch selects this dependency, so its verification contract determines the change. Release 0.103.16 installs a static SPKI distrust list in verify_for_usage and checks certificate paths and trust anchors before accepting them. (src/verify_cert.rs:62, 8ecdcc76f56b)
  • Root distrust and accepted compatibility tradeoff: The selected root dataset removes emSign ECC Root CA G3. The maintainer-authored PR explicitly accepts that legitimate chains relying exclusively on this anchor also lose trust; no additional product approval is needed. (webpki-root-certs/src/lib.rs, 70760478b9d3)
  • Registry integrity and toolchain compatibility: Both selected versions are unyanked, their registry checksums match the patch, and both declare Rust 1.71 minimums, below the desktop manifest's Rust 1.97.1 minimum.
  • Current main still needs the update: Fetched main selects rustls-webpki 0.103.15 and desktop webpki-root-certs 1.0.9; the central dependency update is not implemented there. (crates/Cargo.lock:638, bbfdaf4795f8)
  • Trust selection and application boundary: System-root connections use the standard TLS connector, while explicit pins and native certificate policies have separate owners. Gateway connect parameters are prepared and sent after transport connection succeeds. (crates/openclaw-gateway-client/src/session.rs:508, fbf25294c4fa)

Likely related people:

  • Vincent Koc: Raw commit fc52265 adds apps/linux/src-tauri/Cargo.lock:3689 relative to its recorded parents. This identifies author metadata, not feature responsibility or a PR merger. (role: source-line author; confidence: medium; commits: fc52265f8406; files: apps/linux/src-tauri/Cargo.lock)

PR surface

Source 0, Other 0. Total 0 across 2 files. Added test files: 0.

View PR surface stats
Area Files Added Removed Net
Source 1 4 4 0
Tests 0 0 0 0
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 1 2 2 0
Total 2 6 6 0

Labels

Label changes:

  • add P1: Current main still selects dependencies predating the disclosed intermediate-key distrust update.
  • add merge-risk: 🚨 compatibility: Removing emSign ECC G3 also rejects legitimate chains relying exclusively on that root; the maintainer-authored PR explicitly accepts this tradeoff.
  • add merge-risk: 🚨 security-boundary: The dependency update changes TLS peer admission, and supplied evidence does not establish rejection before application-data transmission.
  • add rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • add status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Label justifications:

  • P1: Current main still selects dependencies predating the disclosed intermediate-key distrust update.
  • merge-risk: 🚨 security-boundary: The dependency update changes TLS peer admission, and supplied evidence does not establish rejection before application-data transmission.
  • merge-risk: 🚨 compatibility: Removing emSign ECC G3 also rejects legitimate chains relying exclusively on that root; the maintainer-authored PR explicitly accepts this tradeoff.
  • rating: 🧂 unranked krab: Overall readiness is 🧂 unranked krab; proof is 🧂 unranked krab and patch quality is 🦐 gold shrimp.
  • status: 📣 needs proof: The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Show an unaffected TLS peer succeeding and an incident-chain peer rejected through the production connection owner before any HTTP or Gateway credentials are sent.

Rating scale

6/6 🦀 challenger crab · 5/6 🦞 diamond lobster · 4/6 🐚 platinum hermit · 3/6 🦐 gold shrimp · 2/6 🦪 silver shellfish · 1/6 🧂 unranked krab. Overall follows the weaker of proof and patch quality; ✨ marks media proof (a screenshot, video, or linked artifact) that directly shows the changed behavior.

Workflow

ClawSweeper edits this one comment on every review. Comment @clawsweeper re-review for a fresh review only. Repair and merge execution lanes are retired.

Reviewed October 21, 2026, 4:07 AM ET / 08:07 UTC.

@joshavant
joshavant merged commit 01eef92 into main Oct 21, 2026
118 of 121 checks passed
@joshavant
joshavant deleted the remediation/emudhra-rust-tls-2026-10-21 branch October 21, 2026 09:05
@joshavant

Copy link
Copy Markdown
Collaborator Author

Merged via explicitly authorized admin squash with attributed pre-existing CI failures.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: linux merge-risk: 🚨 compatibility 🚨 May break existing users, config, migrations, defaults, or upgrade paths. merge-risk: 🚨 security-boundary 🚨 May affect sandboxing, authorization, credentials, or sensitive data. P1 High-priority user-facing bug, regression, or broken workflow. rating: 🧂 unranked krab Not merge-ready due to missing proof or serious correctness/safety concerns. size: XS status: 📣 needs proof The PR needs real behavior proof before ClawSweeper can clear the contributor ask.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant