GHSA-GQ4M-5QH3-Q47H
Official QUIC DATAGRAM echo path allows unauthenticated remote OOM
CVSS:3.1/AV:N/AC:H/PR:N/UI:N/S:U/C:N/I:N/A:H
Fuente: GitHub
Ciclo de vida de la vulnerabilidad
| Fecha | Fase | Evento | Detalle |
|---|---|---|---|
| Divulgación | Publicada | GHSA-GQ4M-5QH3-Q47H divulgada · CVSS 5.9 (GitHub) | |
| Monitoreo | Detectada | Ingresó al índice | |
| Monitoreo | Verificada | Última verificación contra las fuentes |
Summary
`quic 2.1.1` pushes every received QUIC DATAGRAM into an Erlang owner
mailbox without an item or byte bound. The unmodified official echo server
enables DATAGRAM and processes each message by logging and synchronously
echoing it. A remote peer can send valid DATAGRAMs faster than that handler
consumes them, growing one connection-owned mailbox until the BEAM VM is
OOM-killed.
Two attacks OOM-killed fresh 4 GiB victims. Two equal-total controls rotated
connections, released each prior mailbox, and remained healthy.
Details
Affected revision: `quic 2.1.1`, commit
`0b5634b6468c1b2aa3132baaabe5515d4ea485bd`.
- The official echo server enables DATAGRAM with a 65,535-byte limit
https://github.com/benoitc/erlang_quic/blob/0b5634b6468c1b2aa3132baaabe5515d4ea485bd/examples/echo_server.erl#L30-L39. - It creates one echo-handler process per connection
https://github.com/benoitc/erlang_quic/blob/0b5634b6468c1b2aa3132baaabe5515d4ea485bd/examples/echo_server.erl#L61-L69. - The handler logs and synchronously echoes every DATAGRAM
https://github.com/benoitc/erlang_quic/blob/0b5634b6468c1b2aa3132baaabe5515d4ea485bd/examples/echo_server.erl#L75-L89. - The transport's DATAGRAM receive-queue default is `infinity`
https://github.com/benoitc/erlang_quic/blob/0b5634b6468c1b2aa3132baaabe5515d4ea485bd/src/quic_connection.erl#L758-L765. - `deliver_datagram/2` sends the payload to the owner mailbox before any finite internal-queue accounting
https://github.com/benoitc/erlang_quic/blob/0b5634b6468c1b2aa3132baaabe5515d4ea485bd/src/quic_connection.erl#L9095-L9128.
The internal queue and the Erlang mailbox are different owners. Limiting or
trimming the former does not retract messages already copied into the latter.
Proof of concept
Required conditions
- The official echo server, or an equivalent DATAGRAM-enabled endpoint, is
- The peer completes a QUIC handshake and negotiates DATAGRAM support.
- The peer keeps one connection open while sending DATAGRAMs.
The official echo server already satisfies the victim-side conditions without
extra server options or custom handler code.
Reproduce
- Build commit `0b5634b6468c1b2aa3132baaabe5515d4ea485bd`
- Start the unmodified example with `echo_server:start(4433)`.
- Run the victim with Docker `Memory=4 GiB`, `MemorySwap=4 GiB` total, and
- Establish one ordinary QUIC connection using ALPN `echo`.
- Through the public `quic:send_datagram/2` API, attempt 7,000,000 valid
- Probe service independently with fresh connections and real DATAGRAM echo
- For the control, send the same 7,000,000 DATAGRAMs with one sender, but
| Arm | Repeats | Result |
|---|---:|---|
| One long-lived connection | 2 | OOM after 5,589,180 and 5,531,707 sends; exit 137; `OOMKilled=true` |
| 70 sequential connections | 2 | 7,000,000 sent; healthy; all 2,101 probes succeeded |
Attack mailboxes reached 3,203,294 and 3,175,889 messages. Maximum continuous
independent service failure was 36.541 seconds in both runs. Control peak
sampled VM memory stayed below 122 MiB.
Impact
An unauthenticated peer can exhaust the memory of the official public echo
endpoint and terminate its BEAM VM, interrupting every service in that VM.
Equivalent DATAGRAM integrations with unbounded push delivery are also
affected. Library deployments that leave DATAGRAM disabled do not reach this
path.
Incluye detalles técnicos publicados por el investigador. Úselos solo para validar y corregir sus propios sistemas.
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-gq4m-5qh3-q47hLas referencias externas se muestran para copiar: cve.llama.ec no lo redirige a otros sitios.
