Codex app-server panics on iSH when the aws-lc provider lacks ECDSA P-521
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
- Build
codex-app-serverforaarch64-unknown-linux-muslfromrust-v0.147.0. - Launch the binary in the iSH ARM64 runtime.
- 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:
- commit: https://github.com/jacklv-coder/codex/commit/9bb14f6f57fdb39ce80dd46f85b2ff15168b044a
- branch comparison: https://github.com/openai/codex/compare/main...jacklv-coder:codex/allow-reduced-rustls-provider
Validation
just fmtjust 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-musland 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.
1 Comment
I rebased the reference fix onto current
openai/codex@e741cd9ace0286bf0be3d5e1c7f569b345e33ee5and reran the focused validation.just test -p codex-utils-rustls-provider: 2 passedjust fix -p codex-utils-rustls-providerjust fmtThe current stable
rust-v0.148.0and currentmainstill 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.