Netty: HAProxy SSL TLV parsing leaks retained slice on invalid TLV length
Package
Affected versions
>= 4.2.0.Final, <= 4.2.14.Final
<= 4.1.134.Final
Patched versions
4.2.15.Final
4.1.135.Final
Description
Published to the GitHub Advisory Database
Jun 8, 2026
Reviewed
Jun 8, 2026
Last updated
Jun 8, 2026
When decoding a PP2_TYPE_SSL TLV, HAProxyMessage.readNextTLV() first calls
header.retainedSlice(header.readerIndex(), length)and only then reads the 1-byte client field and 4-byte verify field. If the attacker sets the TLV length below 5, the subsequent readByte/readInt throws IndexOutOfBoundsException. HAProxyMessageDecoder only catches HAProxyProtocolException around this call, so the IOOBE propagates and the retained slice on the pooled cumulation buffer is never released.References