Files
moloapp/audit/MOLO-H2-003/README.md
T

43 lines
2.0 KiB
Markdown
Raw Normal View History

# MOLO-H2-003: HTTP/2 CONTINUATION flood
**Scope:** [audit](../README.md) · [README](../../README.md) · [AGENTS](../../AGENTS.md)
CVE-2024-27316 (Apache httpd, fixed 2.4.59) and the same-family CVE-2024-27983
(Node.js), CVE-2024-27919 (Envoy), CVE-2024-2653 (amphp/http); the class ("HTTP/2
CONTINUATION Flood"), not a MoloApp-specific CVE. Disclosed by Bartek Nowotarski to
CERT/CC, April 2024.
## Source
- [CERT/CC advisory on the CONTINUATION flood](https://kb.cert.org/vuls/id/421644)
## Relevance to MoloApp
A HEADERS frame without END_HEADERS opens a header block that is only closed by a
later CONTINUATION frame carrying END_HEADERS. The 2024 disclosure found that many
implementations cap the *total header bytes* accumulated across that run of frames,
but not the *count* of CONTINUATION frames or the time spent collecting them, so a
client can send an effectively unbounded number of empty (or near-empty)
CONTINUATION frames, each costing a 9-byte frame-header parse and a dispatch through
the connection's frame loop, without ever tripping the byte-count guard.
`src/runtime/http/v2/hpack.cpp`/`connection.cpp` cap the accumulated header block at
`kH2HeaderListMax` (64 KiB) by bytes, confirmed in the audit; nothing there counts
CONTINUATION frames or bounds how long one stream's header block may stay open.
## What the check does
Opens one h2c connection, sends a HEADERS frame without END_HEADERS on stream 1
(leaving the header block open), then floods up to 200,000 zero-length CONTINUATION
frames on that stream. PASS requires the connection to be cut before all of them are
accepted; FAIL means the server parses an unbounded run of empty CONTINUATION frames
with no byte growth and no cutoff.
## Caveats
200,000 is the harness's own ceiling, not a claim about the attack's real cost at
scale; a genuine attack sends far more, and this check is capped specifically so
running it cannot itself become the resource-exhaustion attack it is checking for.
Run: `make test` in this directory, or `make -C audit test` from the repo root.