GHSA-H2QX-FXX7-7R6J
QUIC distribution never verifies the peer certificate; the verify option is ignored
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:H/I:H/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-H2QX-FXX7-7R6J divulgada · CVSS 8.1 (GitHub) | |
| Divulgación | Modificada | Última actualización del registro | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
With `-proto_dist quic`, neither side of a distribution connection authenticates the other through TLS, whatever the configuration says. The `verify` and `cacert_file` options of the `dist` configuration are read and then never used. Unless the listener runs PSK-only, the only thing that authenticates a node is the distribution cookie handshake, which is not bound to the TLS channel.
Details
- Client: `connect_to_node/7` in src/dist/quic_dist.erl hard-codes `verify => false` ("% TODO: Enable proper verification", line 1141 in 2.1.3).
- Server: `start_quic_server/4` (line 639) passes neither `verify`, `cacerts` nor `require_client_cert`, so the listener sends no CertificateRequest and accepts any client.
- `verify` is parsed into `#quic_dist_config.verify` (line 424) and never read.
- `load_credentials/1` loads `cacert_file`, and both callers discard it (`_CACert`, lines 642 and 1111).
The moduledoc of quic_dist and docs/QUIC_DIST.md present `{verify, verify_peer}` with `cacert_file` as the production setting ("Use verify_peer in production"). A user who follows them gets no certificate check on either side.
Impact
An attacker on the network path between two nodes can terminate QUIC towards each of them with any certificate. It relays the distribution handshake messages unchanged: the cookie challenge/response proves knowledge of the cookie to whoever is at the other end of the TLS session, which is the attacker. After the handshake the attacker reads and injects distribution traffic, which includes `rpc:call` and so arbitrary code execution on both nodes.
That is the exposure of plain `inet_tcp_dist`, while the documentation promises TLS-authenticated distribution.
Not affected: a listener configured PSK-only (`external_psk`/`psks`/`psk_callback` without cert/key). An application can also check the server certificate itself in a `quic_dist_auth` callback through `quic:peercert/1`, but only on the client side, since the client never sends a certificate.
Steps to reproduce
- Configure two nodes as in docs/QUIC_DIST.md with `{verify, verify_peer}` and `{cacert_file, "ca.pem"}`.
- Give node B a certificate that is not signed by ca.pem (a fresh self-signed one).
- `net_adm:ping(B)` from A returns `pong`. Expected: the connection fails certificate verification.
We ran this on 2.1.3 with two peer nodes, each with its own self-signed certificate and `cacert_file` pointing to a third, unrelated self-signed certificate: `pong`, and `rpc:call(B, os, getpid, [])` from A succeeds.
Suggested fix
Pass `verify` and the loaded CA certificates into both option maps, and on the listener set `require_client_cert => true` when `verify_peer` is configured. Until then, the docs should say that certificate verification is not implemented for distribution and that only PSK-only listeners authenticate peers.
We can prepare the patch in the advisory's private fork if that helps.
Desglose de métricas
Rangos afectados
Estado del parche por paquete
| Paquete / producto | Estado | Corregida en | Desde divulgación | Última versión |
|---|---|---|---|---|
Hexquic |
Sin parche | — | — | — |
Arsenal público
Sin exploits, módulos ni PoC públicos conocidos a la fecha de verificación.
https://github.com/benoitc/erlang_quic/security/advisories/GHSA-h2qx-fxx7-7r6jLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
