CVE-2022-41881
HAProxyMessageDecoder Stack Exhaustion DoS
Description
Impact
A StackOverflowError can be raised when parsing a malformed crafted message due to an infinite recursion.
Patches
Users should upgrade to 4.1.86.Final.
Workarounds
There is no workaround, except using a custom HaProxyMessageDecoder.
References
When parsing a TLV with type = PP2_TYPE_SSL, the value can be again a TLV with type = PP2_TYPE_SSL and so on. The only limitation of the recursion is that the TLV length cannot be bigger than 0xffff because it is encoded in an unsigned short type. Providing a TLV with a nesting level that is large enough will lead to raising of a StackOverflowError. The StackOverflowError will be caught if HAProxyMessageDecoder is used as part of Netty’s ChannelPipeline, but using it directly without the ChannelPipeline will lead to a thrown exception / crash.
For more information
If you have any questions or comments about this advisory:
- Open an issue in netty
Affected Maven artifacts (1)
| Artifact | Affected versions | Fixed in |
|---|---|---|
| io.netty » netty-codec-haproxy | < 4.1.86.Final | 4.1.86.Final |
Blast radius
37% of the dependent artifacts (1,799) still pull an affected version in their latest release.
| Depth | Dependent versions |
|---|---|
| Direct | 4,430 |
| 2 hops | 31,215 |
| 3 hops | 73,193 |
| 4 hops | 39,989 |
| 5 hops | 28,536 |
| 6 hops | 10,566 |
Most used dependents
- io.netty » netty-all3,584 usages
- org.apache.hadoop » hadoop-common3,482 usages
- org.apache.spark » spark-sql3,174 usages
- org.apache.spark » spark-core2,899 usages
- org.apache.zookeeper » zookeeper2,044 usages
- org.apache.hadoop » hadoop-client1,796 usages
- org.apache.kafka » kafka1,450 usages
- org.apache.hadoop » hadoop-hdfs1,377 usages
- org.apache.hadoop » hadoop-mapreduce-client-core1,366 usages
- io.quarkus » quarkus-resteasy1,251 usages
- org.apache.curator » curator-recipes1,197 usages
- org.apache.curator » curator-framework1,070 usages
- org.apache.curator » curator-test1,002 usages
- org.apache.flink » flink-streaming-java982 usages
- org.apache.hbase » hbase-client960 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-fx2c-96vj-985v
- Advisoryhttps://nvd.nist.gov/vuln/detail/CVE-2022-41881
- Packagehttps://github.com/netty/netty
- Webhttps://lists.debian.org/debian-lts-announce/2023/01/msg00008.html
- Webhttps://security.netapp.com/advisory/ntap-20230113-0004
- Webhttps://www.debian.org/security/2023/dsa-5316
