Bzip2Decoder doesn't allow setting size restrictions for decompressed data
Description
        Reviewed
      Sep 9, 2021 
    
  
        Published to the GitHub Advisory Database
      Sep 9, 2021 
    
  
        Published by the National Vulnerability Database
      Oct 19, 2021 
    
  
        Last updated
      Aug 16, 2023 
    
  
Impact
The Bzip2 decompression decoder function doesn't allow setting size restrictions on the decompressed output data (which affects the allocation size used during decompression).
All users of Bzip2Decoder are affected. The malicious input can trigger an OOME and so a DoS attack
Workarounds
No workarounds other than not using the
Bzip2DecoderReferences
Relevant code areas:
https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L80
https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L294
https://github.com/netty/netty/blob/netty-4.1.67.Final/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L305
References