CVE-2021-37136
Bzip2Decoder doesn't allow setting size restrictions for decompressed data
Description
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 Bzip2Decoder
References
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
Affected Maven artifacts (3)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| io.netty » netty | * | - |
| io.netty » netty-codec | < 4.1.68.Final | 4.1.68.Final |
| org.jboss.netty » netty | * | - |
Blast radius
73% of the dependent artifacts (39,527) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 95,561 |
| 2 hops | 461,158 |
| 3 hops | 1,093,219 |
| 4 hops | 898,340 |
| 5 hops | 529,646 |
| 6 hops | 304,528 |
Most used dependents
- org.scalatest » scalatest20,465 usages
- org.testcontainers » testcontainers4,109 usages
- io.netty » netty-all3,584 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.springframework.boot » spring-boot-starter-data-redis3,154 usages
- org.apache.kafka » kafka-clients3,135 usages
- redis.clients » jedis2,971 usages
- org.apache.spark » spark-core2,899 usages
- org.springframework.boot » spring-boot-starter-webflux2,764 usages
- org.apache.avro » avro2,427 usages
- io.netty » netty-handler2,213 usages
- com.android.tools.build » gradle2,197 usages
- io.vertx » vertx-core2,116 usages
- org.seleniumhq.selenium » selenium-java2,089 usages
Computed from the dependency graph of build 20261124.0621 (compile and runtime scopes, nearest version wins). Exclusions and dependency management in consuming projects are not applied, so dependents are potentially affected. When several artifacts are affected, a dependent version that pulls more than one of them is counted once per artifact.
References
- Webhttps://github.com/netty/netty/security/advisories/GHSA-grg4-wf29-r9vv
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2021-37136
- Webhttps://github.com/netty/netty/commit/41d3d61a61608f2223bb364955ab2045dd5e4020
- Webhttps://www.oracle.com/security-alerts/cpujul2022.html
- Webhttps://www.oracle.com/security-alerts/cpujan2022.html
- Webhttps://www.oracle.com/security-alerts/cpuapr2022.html
- Webhttps://www.debian.org/security/2023/dsa-5316
- Webhttps://security.netapp.com/advisory/ntap-20220210-0012
- Webhttps://lists.debian.org/debian-lts-announce/2023/01/msg00008.html
- Webhttps://lists.apache.org/thread.html/rfb2bf8597e53364ccab212fbcbb2a4e9f0a9e1429b1dc08023c6868e@%3Cdev.tinkerpop.apache.org%3E
- Webhttps://lists.apache.org/thread.html/rd262f59b1586a108e320e5c966feeafbb1b8cdc96965debc7cc10b16@%3Ccommits.druid.apache.org%3E
- Webhttps://lists.apache.org/thread.html/r75490c61c2cb7b6ae2c81238fd52ae13636c60435abcd732d41531a0@%3Ccommits.druid.apache.org%3E
- Webhttps://lists.apache.org/thread.html/r5e05eba32476c580412f9fbdfc9b8782d5b40558018ac4ac07192a04@%3Ccommits.druid.apache.org%3E
- Webhttps://lists.apache.org/thread.html/r5406eaf3b07577d233b9f07cfc8f26e28369e6bab5edfcab41f28abb@%3Ccommits.druid.apache.org%3E
- Webhttps://lists.apache.org/thread.html/r06a145c9bd41a7344da242cef07977b24abe3349161ede948e30913d@%3Ccommits.druid.apache.org%3E
- Webhttps://github.com/netty/netty/blob/4.1/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L80
- Webhttps://github.com/netty/netty/blob/4.1/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L305
- Webhttps://github.com/netty/netty/blob/4.1/codec/src/main/java/io/netty/handler/codec/compression/Bzip2Decoder.java#L294
- Packagehttps://github.com/netty/netty
