Overview
About vulnerability
Summary
Netty’s epoll transport fails to detect and close TCP connections that receive a RST after being half-closed, leading to stale channels that are never cleaned up and, in some code paths, a 100% CPU busy-loop in the event loop thread.
Affected versions
All versions of 4.2.x netty-transport-classes-epoll up to and including 4.2.12.Final
Fixed in
4.2.13.Final (fix merged into the 4.2 branch via [#16689](https://github.com/netty/netty/pull/16689); release not yet cut as of 2026-04-25).
Severity
Medium — Denial of Service (resource exhaustion / CPU spin)
CVSS: 3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:H - 7.5
CWE: CWE-772: Missing Release of Resource after Effective Lifetime
Description
When a TCP connection using Netty’s epoll transport has ALLOW_HALF_CLOSURE enabled (or is in a half-closed state via the HTTP codec), and the remote peer:
- Sends a FIN (half-close), causing the server to mark the input as shutdown, then
- Sends a RST (e.g. by closing with
SO_LINGER=0)
the server-side channel is never closed. This happens because:
epollOutReady()is a no-op when there is no pending flush.epollInReady()short-circuits viashouldBreakEpollInReady()because input is already marked as shutdown.- The
EPOLLERR/EPOLLHUPerror condition is therefore never processed, andchannelInactiveis never fired.
Depending on the Netty version and configuration, this results in:
- Stale channels: The connection is never closed or deregistered. An unauthenticated remote attacker can repeat the sequence to accumulate stale connections, exhausting file descriptors, memory, or connection-count limits.
- CPU busy-loop: In code paths where
clearEpollIn0()is not called during theChannelInputShutdownReadCompleteevent,epoll_waitreturns immediately on every iteration for the affected fd, causing 100% CPU utilization on the event loop thread and starving all other connections multiplexed on it.
Mitigation
- Upgrade to 4.2.13.Final when released (or build from the
4.2branch at commit [0ec3d97](https://github.com/netty/netty/commit/0ec3d97fab376e243d328ac95fbd288ba0f6e22d)). - If upgrading is not immediately possible, configure idle timeouts on connections to limit the lifetime of stale channels.
References
Details
- Affected product:
- Apache Avro , Apache CXF , Apache Hadoop , Apache Kafka , Apache Log4j , Apache Lucene , Apache Maven , Apache Solr , Apache Spark , Apache Tika , Eclipse Jetty , Elasticsearch , Hazelcast , Netty , Spring , Wildfly , alluxio , amazon-dynamodb-lock-client , amazon-kinesis-client , amazon-kinesis-producer , amqp-10-jms-spring-boot , arrow , artemis , async-http-client , athenz , aws-glue-schema-registry , aws-lakeformation-accessgrants-plugin-java-v2 , aws-s3-accessgrants-plugin-java-v2 , aws-sdk-java , aws-sdk-java-v2 , azure-kusto-java , azure-sdk-for-java , azure-search-documents , azure-spring-data-cosmos , bolt-connection-java , bookkeeper , camel , cassandra-java-driver , couchbase-jvm-clients , couchbase-jvm-clients-core-io , couchbase-jvm-clients-java-client , curator , cypher-dsl , debezium , directory-kerby , flume , grpc-java , grpc-netty , hawtio , hbase , hbase-thirdparty , infinispan , io.quarkus:quarkus-credentials-deployment , io.quarkus:quarkus-datasource-deployment-spi , io.quarkus:quarkus-resteasy , java-driver , jersey , jetcd , kinesis-logback-appender , lettuce , logging-flume , metrics , micrometer , micronaut-core , neo4j-java-driver , neo4j-ogm , orc , partnercentralaccount , pinecone-java-client , pravega , pulsar , qpid-jms , quarkus , rabbitmq-java-client , rabbitmq-stream-java-client , ratis , ratis-thirdparty , redisson , rsocket-java , smallrye-common , smallrye-fault-tolerance , smallrye-mutiny-vertx-bindings , software.amazon.awssdk:wickr , strimzi-kafka-operator , tinkerpop , vert.x , vertx-auth , vertx-eventbus-bridges , vertx-kafka-client , vertx-web , zookeeper
- Affected packages:
- neo4j-java-driver @ 5.28.5 (+25006 more)