Skip to content

Renderer QUIC client trusts any server certificate (InsecureVerifier bypasses all TLS verification) #389

Description

@forkwright

Finding

The renderer QUIC client trusts any server certificate. build_client_config() installs InsecureVerifier, whose verify_server_cert unconditionally returns ServerCertVerified::assertion() and whose TLS 1.2/1.3 signature checks unconditionally return HandshakeSignatureValid::assertion(). No certificate, fingerprint, or signature is ever validated. A code comment defers the fix to a "prompt 124" that is not present in this code.

Evidence

crates/archon/src/render/tls.rs:50:

.with_custom_certificate_verifier(Arc::new(InsecureVerifier))

crates/archon/src/render/tls.rs:69InsecureVerifier::verify_server_cert returns Ok(ServerCertVerified::assertion()) for any presented certificate, and its signature-verification methods likewise assert validity unconditionally.

Why this matters

LAN-adjacent attackers are in scope. With no server authentication, an attacker who can reach the renderer can impersonate the harmonia server, complete the QUIC handshake, intercept the audio stream, and inject a forged SessionAccept carrying attacker-chosen sample_rate/channels. The blanket signature acceptance also defeats downgrade and replay detection. Active MITM of all renderer-server control and media traffic is possible from any host on the network.

Desired correction

Replace InsecureVerifier with a ServerCertVerifier that pins the server leaf-certificate SHA-256 fingerprint stored in credentials.toml (server_fingerprint). On first run with no stored credential, TOFU-pin the observed fingerprint immediately. Reject any connection whose leaf DER fingerprint does not match the pinned value with CertificateError::ApplicationVerificationFailure. InsecureVerifier must be unreachable in production builds.
Done when: build_client_config() verifies the leaf DER fingerprint against the stored value, returns CertificateError::ApplicationVerificationFailure on mismatch, and a unit test confirms a mismatched certificate is rejected.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions