Http4s Ember HTTP/2: unbounded outbound frame queue
http4s
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-core_2.12 Maven |
|
|
| org.http4s:http4s-ember-core_2.13 Maven |
|
|
http4s
| Product | Affected | Fixed in |
|---|---|---|
| org.http4s:http4s-ember-core_2.12 Maven |
|
|
| org.http4s:http4s-ember-core_2.13 Maven |
|
|
1.0.0-M47| org.http4s:http4s-ember-core_3 Maven |
|
|
Http4s is a Scala interface for HTTP services. Prior to 0.23.35 and 1.0.0-M47, Ember HTTP/2 serializes outbound frames through one unbounded queue consumed by writeLoop. When the peer stops reading, an unauthenticated HTTP/2 client can continue sending PING, SETTINGS, or DATA frames that cause Ember to enqueue acknowledgments or WINDOW_UPDATE frames faster than the writer drains them, exhausting heap memory on a server built with withHttp2. The shared behavior also affects an ember-client connected to a hostile HTTP/2 server, and the patch replaces the unbounded path with bounded, backpressured outbound queues. This issue is fixed in versions 0.23.35 and 1.0.0-M47.
From the CVE record · GitHub_M
Ember HTTP/2 uses an unbounded outbound frame queue that can exhaust heap memory when a peer stops reading but continues sending frames. An unauthenticated HTTP/2 client can trigger this against a server built with withHttp2; an ember-client connected to a hostile HTTP/2 server is also affected. No user interaction is required.
Check Maven users of org.http4s:http4s-ember-core_2.12 below 0.23.35, and org.http4s:http4s-ember-core_2.13 or _3 below 0.23.35 or from 1.0.0-M1 through 1.0.0-M46.