Netty has unbounded pre-allocation in RedisArrayAggregator from RESP array length
netty
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| io.netty:netty-codec-redis Maven |
|
|
Original description
Netty is a network application framework for development of protocol servers and clients. Prior to versions 4.1.135.Final and 4.2.15.Final, RedisArrayAggregator pre-allocates ArrayList with initial capacity equal to the RESP array element count declared in an array header. That count is taken from the wire before the corresponding child messages exist. A small malicious header can claim a huge initial capacity. Versions 4.1.135.Final and 4.2.15.Final patch the issue.