Security release Hummingbird 2.29.0

Users of Hummingbird's RequestBody.consumeWithInboundCloseHandler or RequestBody.consumeWithCancellationOnInboundClose should update to version 2.29.0 and also review their usage of these functions. This version includes fixes and updated usage requirements of these functions.

Uncontrolled resources consumption: RequestBody inbound close functions not exiting on connection close

Handlers that use RequestBody.consumeWithInboundCloseHandler cannot rely on the inbound close callback to be called when the client disconnects if they do not iterate over the contents of the request body. In a similar way RequestBody.consumeWithCancellationOnInboundClose will not cancel the closure provided.

The functions RequestBody.consumeWithInboundCloseHandler and RequestBody.consumeWithCancellationOnInboundClose rely on the inbound stream of request body parts ending to indicate a client has closed the connection. Internally the functions read the request body and push the body parts onto a new request body stream which is then passed to the user. If the user does not iterate over this new stream back pressure will eventually be applied. When this happens the process reading the request body parts stalls and any subsequent connection close is not read.

In addition if the closure supplied to either of these functions throws an error and the process reading the request body is stalled because of back pressure it cannot be cancelled so the request handler stalls.

Thank you to SounLabs for reporting this issue.

2 Likes