Skip to content

Drop RUSTSEC-2023-0071 ignore once RustCrypto rsa ships constant-time stable #48

@polaz

Description

@polaz

Problem

cargo deny / cargo audit flag RUSTSEC-2023-0071 ("Marvin Attack", timing sidechannel in rsa, potential private-key recovery). Dependency chain:

rsa 0.9.10 -> jsonwebtoken (feature `rust_crypto`) -> structured-proxy

We deliberately ignore this advisory in deny.toml / .cargo/audit.toml rather than change the crypto backend.

Why ignored (current justification)

  1. No fix exists. Latest rsa on crates.io is 0.10.0-rc (release candidate). In the RustSec DB the advisory has patched: [] and unaffected: [] — there is nothing to upgrade to. The constant-time rewrite in RustCrypto has not shipped stable.
  2. Backend stays rust_crypto (pure Rust). jsonwebtoken's alternative aws_lc_rs is constant-time and advisory-free, but pulls in aws-lc (C / assembly) = FFI. Pure-Rust consumers (e.g. CoordiNode, ADR-013 "no FFI anywhere") cannot accept that. We keep rust_crypto on purpose.
  3. Not exploitable on the verify path. structured-proxy only verifies incoming JWTs with a public key (DecodingKey + decode() in src/auth/mod.rs). The Marvin Attack leaks the private key via timing of private-key operations (decrypt/sign). There is no RSA private key on the verify path, so the attack is not reachable. (The only EncodingKey/encode usage is inside #[cfg(test)] and uses Ed25519, not RSA.)

Exit criteria

Remove the ignore when any of these holds:

  • RustCrypto ships a constant-time rsa stable release that addresses RUSTSEC-2023-0071, and the advisory gets a non-empty patched. Then bump rsa (transitively via jsonwebtoken) and drop the ignore.
  • We adopt the aws_lc_rs backend by default (only if the no-FFI constraint is lifted).

Related

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions