The vulnerability lies in the io.netty.handler.codec.compression.Lz4FrameDecoder.decode method. This method is responsible for decoding LZ4 compressed frames. According to the vulnerability description and the provided proof-of-concept, an attacker can craft a small packet (22 bytes) with a header indicating a very large decompressedLength (up to 32MB). The vulnerable version of the decode method trusts this header value and proceeds to allocate a ByteBuf of that size before the actual decompression, which can lead to an OutOfMemoryError and a denial of service.
The analysis of the patch confirms this. The commit 387bbd00ed0d3db8201e17b53396119c73d59448 introduces a configurable maxDecompressedLength to the Lz4FrameDecoder. The decode method is modified to validate the decompressedLength from the input stream against this new configurable limit. Previously, the check was against a value derived from the compressionLevel, which was not sufficient to prevent the allocation of a large buffer based on a malicious header. Therefore, any runtime profile during the exploitation of this vulnerability would show the io.netty.handler.codec.compression.Lz4FrameDecoder.decode function being executed just before the memory allocation and subsequent crash.