Ecosyste.ms: Advisories

An open API service providing security vulnerability metadata for many open source software ecosystems.

Security Advisories: GSA_kwCzR0hTQS02bWpxLWg2NzQtajg0Nc4AAz9j

netty-handler SniHandler 16MB allocation

Summary

The SniHandler can allocate up to 16MB of heap for each channel during the TLS handshake. When the handler or the channel does not have an idle timeout, it can be used to make a TCP server using the SniHandler to allocate 16MB of heap.

Details

The SniHandler class is a handler that waits for the TLS handshake to configure a SslHandler according to the indicated server name by the ClientHello record. For this matter it allocates a ByteBuf using the value defined in the ClientHello record.

Normally the value of the packet should be smaller than the handshake packet but there are not checks done here and the way the code is written, it is possible to craft a packet that makes the SslClientHelloHandler

1/ allocate a 16MB ByteBuf
2/ not fail decode method in buffer
3/ get out of the loop without an exception

The combination of this without the use of a timeout makes easy to connect to a TCP server and allocate 16MB of heap memory per connection.

Impact

If the user has no idle timeout handler configured it might be possible for a remote peer to send a client hello packet which lead the server to buffer up to 16MB of data per connection. This could lead to a OutOfMemoryError and so result in a DDOS.

Permalink: https://github.com/advisories/GHSA-6mjq-h674-j845
JSON: https://advisories.ecosyste.ms/api/v1/advisories/GSA_kwCzR0hTQS02bWpxLWg2NzQtajg0Nc4AAz9j
Source: GitHub Advisory Database
Origin: Unspecified
Severity: Moderate
Classification: General
Published: 11 months ago
Updated: 6 months ago


CVSS Score: 6.5
CVSS vector: CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H

Identifiers: GHSA-6mjq-h674-j845, CVE-2023-34462
References: Repository: https://github.com/netty/netty
Blast Radius: 25.3

Affected Packages

maven:io.netty:netty-handler
Dependent packages: 1,984
Dependent repositories: 7,905
Downloads:
Affected Version Ranges: < 4.1.94.Final
Fixed in: 4.1.94.Final
All affected versions: 4.1.9-0.Final, 4.1.9-1.Final, 4.1.9-2.Final, 4.1.9-3.Final
All unaffected versions: