The vulnerability exists in Netty's RedisDecoder, which is responsible for parsing the Redis protocol. The core of the issue is in the decodeLength method. This method was designed to read the length of an upcoming data element from the input stream. According to the Redis protocol, this length is terminated by a carriage return and a newline (\r\n). However, the vulnerable version of the code did not enforce a maximum size for the data it would buffer while searching for the newline character. An attacker could exploit this by sending a long sequence of digits without the terminating \r\n. This would cause the RedisDecoder to keep buffering data, waiting for a newline that never arrives. When done over multiple connections, this leads to excessive memory consumption in the server's direct memory pool, eventually causing an OutOfDirectMemoryError and a Denial of Service. The fix, identified in commit bff98ee51b5d0b7ee25fd5005f2169f2a0467efa, introduces a size check within the decodeLength method. It now ensures that the number of buffered bytes does not exceed the maximum valid length for a 64-bit integer, thus preventing the unbounded memory growth.