Codex app-server panics on iSH when the aws-lc provider lacks ECDSA P-521

Open 💬 1 comment Opened Aug 18, 2026 by jacklv-coder

Summary

codex-app-server terminates during startup on an iSH-based ARM64 embedded Linux runtime when the successfully installed aws-lc rustls provider exposes a reduced signature-verification algorithm set that does not contain ECDSA_NISTP521_SHA512.

Environment

  • Codex source: rust-v0.147.0
  • binary target: aarch64-unknown-linux-musl
  • runtime: iSH ARM64 embedded in an iOS app
  • device: iPhone

Reproduction

  1. Build codex-app-server for aarch64-unknown-linux-musl from rust-v0.147.0.
  2. Launch the binary in the iSH ARM64 runtime.
  3. Initialize app-server so it installs the process-wide rustls crypto provider.

Actual behavior

Provider installation succeeds, but app-server exits before it can initialize or make a TLS request:

installed rustls crypto provider must support ECDSA_NISTP521_SHA512

Expected behavior

Keep the successfully installed provider and allow app-server to start. If a later TLS connection actually requires an unsupported certificate signature scheme, rustls/WebPKI should reject that connection normally.

Root cause analysis

ensure_rustls_crypto_provider() installs rustls::crypto::aws_lc_rs::default_provider(), then unconditionally asserts that the installed provider advertises ECDSA_NISTP521_SHA512.

That converts a certificate-specific capability into a process-wide startup requirement. It is also stricter than the existing behavior for a provider installed before Codex starts: that provider is preserved without requiring P-521.

Proposed fix

  • remove the post-install process-terminating P-521 assertion
  • keep the successfully installed platform-provided aws-lc algorithm set
  • update the provider integration test to verify that the installed schemes equal the schemes available from that platform's aws-lc provider
  • retain fail-closed TLS verification for certificates that use unsupported schemes

Reference implementation:

Validation

  • just fmt
  • just test -p codex-utils-rustls-provider — 2 tests passed
  • Codex CR completed with no P1/P2 findings
  • the same source change was rebuilt for aarch64-unknown-linux-musl and exercised in the iSH ARM64 runtime on iPhone
  • patched app-server initialized and completed an HTTPS Responses request; the unmodified release binary reproduced the startup assertion

This does not expand certificate trust: rustls/WebPKI continues to reject certificates whose signature scheme is unsupported by the installed provider.

View original on GitHub ↗

1 Comment

jacklv-coder · 8 days ago

I rebased the reference fix onto current openai/codex@e741cd9ace0286bf0be3d5e1c7f569b345e33ee5 and reran the focused validation.

The current stable rust-v0.148.0 and current main still contain the process-wide P-521 assertion, so the official aarch64 musl candidate remains blocked on iSH until an upstream release includes an equivalent fix.

I attempted to open a draft PR, then confirmed the repository's current contribution policy does not accept external pull requests, so the implementation remains attached here as a ready-to-apply reference.