[fix][sec] Upgrade Netty to 4.2.17 to address several CVEs and bugs - #26300
Merged
Conversation
11 tasks
dao-jun
approved these changes
Aug 10, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Netty 4.2.17.Final is a bug-fix and security
release, and upstream "strongly recommends" upgrading.
Security fixes. It resolves seven advisories (five of them still have their CVE id pending
assignment upstream, so the release notes show
CVE-2026-XXXXX):netty-handlernetty-handlerSslContextnetty-handlernetty-codec-socksnetty-codec-httpVaryheader overwritenetty-transport-sctpSctpMessageCompletionHandlernetty-codec-mqttnetty-transport-sctpandnetty-codec-mqttare not bundled in Pulsar's distributions (they don'tappear in either
LICENSE.bin.txt), so the last two are listed only for completeness.netty-handler,netty-codec-socksandnetty-codec-httpare all shipped.GHSA-p85m-gvr3-788c is the one worth calling out. Netty's earlier CVE-2026-50010 fix added hostname
verification to a plain
X509TrustManagerby wrapping it, and on theSslProvider.OPENSSLpath thatwrapping is
Unsafe-based reflection.Unsafeis not available by default on Java 25+, so thewrapper degrades to a no-op and an OpenSSL client configured with a plain (non-extended)
X509TrustManagerends up doing no hostname verification. The two environmental preconditions areordinary for Pulsar on master: an unset
tlsProviderresolves toOPENSSL_REFCNTwhenever thenative engine is available (
TlsFactorySupport), and master now defaults to JDK 25 (#26070).Whether verification is actually lost additionally depends on a plain rather than extended trust
manager being in play, so this mainly concerns deployments supplying their own trust manager via a
custom
PulsarTlsFactory; the upgrade removes the question either way.Non-security fixes. 4.2.17.Final also carries several fixes in areas Pulsar leans on heavily:
maxOrderinPooledByteBufAllocator(#17093)AdaptiveByteBuf._setLongLEcalling checkedsetLongLE(#17098)SslHandler: fix possible buffer leak when an OOME is thrown during allocation (#17059)GlobalEventExecutorterminationFuture failure (#17140)HttpObjectEncoder/DefaultHttp2FrameWriter: fix buffer leak when aThrowableis thrown during header encoding (#17089)AsciiString.cached(String)sanitization and the follow-up performance regression fix (#17007, #17074)readPendingwhen rescheduling canceled reads and fix therecvmmsgemulation (#17087, #17187)netty-tcnative. Bumped 2.0.78.Final → 2.0.81.Final to stay aligned with what
netty-parent:4.2.17.Finalitself declares (<tcnative.version>2.0.81.Final</tcnative.version>).The changes across those three releases
are:
setKeyMaterial(netty-tcnative#987)SSL_CREDENTIALsupport for older BoringSSL (netty-tcnative#980)SSL.getGroupName(...), returning the named group used by the most recently completed handshake (netty-tcnative#991) — this is what backs Netty's newOpenSslSessionnamed-group accessor (netty#17058)aarch_64andx86_64openssl-dynamicartifacts against OpenSSL 3.x (netty-tcnative#986, netty-tcnative#989) — not applicable to Pulsar, which bundlesnetty-tcnative-boringssl-staticModifications
gradle/libs.versions.toml:netty4.2.16.Final → 4.2.17.Final,netty-tcnative2.0.78.Final → 2.0.81.Finaldistribution/server/src/assemble/LICENSE.bin.txtanddistribution/shell/src/assemble/LICENSE.bin.txtto the new versionsVerifying this change
This change is already covered by existing tests. In addition to CI,
./gradlew checkBinaryLicensewas run locally for both the server and shell distributions to confirm the
LICENSE.bin.txtentriesmatch the jars that are actually bundled.
Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes
Netty is upgraded from 4.2.16.Final to 4.2.17.Final and netty-tcnative from 2.0.78.Final to
2.0.81.Final.