VDB
Sign up
HIGH7.5

GHSA-8f3q-3jmv-7prw

Http4s Ember HTTP/2 has an unbounded outbound frame queue

Quick fix

GHSA-8f3q-3jmv-7prw — org.http4s:http4s-ember-core_2.12: upgrade to the fixed version with the command below.

# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.12

Details

Ember's HTTP/2 connection serializes all outgoing frames through a single unbounded queue drained by one writer fiber (`writeLoop`). When the write side stalls, any frames the connection keeps producing accumulate in that queue without limit. The peer can drive this cheaply because the connection emits a control frame in response to inbound frames it does not flow-control: one `PING` ACK per `PING`, one `SETTINGS` ACK per `SETTINGS`, and a `WINDOW_UPDATE` per inbound DATA. A single unauthenticated connection can therefore exhaust heap and OOM the process.

This affects an ember server (malicious client) and an ember client (malicious/compromised server that floods the client and stops reading its ACKs).

## Impact

Unauthenticated remote denial of service (OOM) against any ember server built `.withHttp2`, from a single connection, at negligible attacker cost (tiny control frames). Also affects an ember client talking to a hostile HTTP/2 server.

## Preconditions

- Ember server or client built `.withHttp2`, speaking to a hostile or compromised peer.

## Workarounds

- Disable HTTP/2 (do not call `.withHttp2`).

Are you affected?

Enter the version of the package you're using.

Affected packages

Maven/org.http4s:http4s-ember-core_2.12
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.12
Maven/org.http4s:http4s-ember-core_2.13
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_2.13
Maven/org.http4s:http4s-ember-core_3
Introduced in: 0Fixed in: 0.23.35
Fix# pom.xml: bump <version>0.23.35</version> for org.http4s:http4s-ember-core_3
Maven/org.http4s:http4s-ember-core_3
Introduced in: 1.0.0-M1Fixed in: 1.0.0-M47
Fix# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_3
Maven/org.http4s:http4s-ember-core_2.13
Introduced in: 1.0.0-M1Fixed in: 1.0.0-M47
Fix# pom.xml: bump <version>1.0.0-M47</version> for org.http4s:http4s-ember-core_2.13

References