fix(deps): update dependency io.netty:netty-codec-http2 to v4.1.133.final [security]#236
Merged
magisk317 merged 1 commit intoMay 7, 2026
Conversation
审阅者指南(在小型 PR 上折叠显示)审阅者指南在 Gradle 构建配置中提升强制 Netty HTTP/2 codec 依赖版本,以引入上游针对 HttpContentDecompressor/DelegatingDecompressorFrameListener 解压炸弹防护的安全修复。 文件级变更
技巧与命令与 Sourcery 交互
自定义你的体验访问你的 控制面板 来:
获取帮助Original review guide in EnglishReviewer's guide (collapsed on small PRs)Reviewer's GuideBumps the forced Netty HTTP/2 codec dependency version in Gradle build configuration to pull in the upstream security fix for decompression bomb protection in HttpContentDecompressor/DelegatingDecompressorFrameListener. File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
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.
This PR contains the following updates:
4.1.132.Final→4.1.133.FinalNetty: HttpContentDecompressor maxAllocation bypass when Content-Encoding set to br/zstd/snappy leads to decompression bomb DoS
CVE-2026-42587 / GHSA-f6hv-jmp6-3vwv
More information
Details
Summary
HttpContentDecompressoraccepts amaxAllocationparameter to limit decompression buffer size and prevent decompression bomb attacks. This limit is correctly enforced for gzip and deflate encodings viaZlibDecoder, but is silently ignored when the content encoding isbr(Brotli),zstd, orsnappy. An attacker can bypass the configured decompression limit by sending a compressed payload withContent-Encoding: brinstead ofContent-Encoding: gzip, causing unbounded memory allocation and out-of-memory denial of service.The same vulnerability exists in
DelegatingDecompressorFrameListenerfor HTTP/2 connections.Details
HttpContentDecompressorstores themaxAllocationvalue at construction time (HttpContentDecompressor.java:89) and uses it innewContentDecoder()to create the appropriate decompression handler.For gzip/deflate,
maxAllocationis forwarded toZlibCodecFactory.newZlibDecoder():ZlibDecoder.prepareDecompressBuffer()enforces this as a hard cap by setting the buffer'smaxCapacityand throwingDecompressionExceptionwhen the limit is reached:For brotli, zstd, and snappy, the decoders are created without any size limit:
BrotliDecoderhas nomaxAllocationparameter at all — there is no way to constrain its output. It streams decompressed data in chunks viafireChannelReadwith no total limit.ZstdDecoder()defaults to a 4MBmaximumAllocationSize, but this only constrains individual buffer allocations, not total output. The decode loop (ZstdDecoder.java:100-114) creates new buffers and fireschannelReadrepeatedly, so total decompressed output is unbounded.The identical pattern exists in
DelegatingDecompressorFrameListener.newContentDecompressor()at lines 188-210 for HTTP/2.PoC
Content-Encoding: zstdandContent-Encoding: snappy.Impact
maxAllocationfor decompression bomb protection, by simply using a non-gzip content encoding.maxAllocationto protect against decompression bombs are not actually protected for brotli, zstd, or snappy encodings. The API documentation implies all encodings are covered.Content-Encoding: brinstead ofContent-Encoding: gzip) to circumvent the protection entirely.HttpContentDecompressor(HTTP/1.1) andDelegatingDecompressorFrameListener(HTTP/2).Recommended Fix
Pass
maxAllocationto all decoder constructors. ForBrotliDecoder, which currently has nomaxAllocationsupport, add the parameter:HttpContentDecompressor.java — pass maxAllocation to all decoders:
DelegatingDecompressorFrameListener.java — same fix at lines 188-210.
BrotliDecoder — add
maxAllocationparameter with the same semantics asZlibDecoder.prepareDecompressBuffer(): set buffer maxCapacity and throwDecompressionExceptionwhen the total decompressed output exceeds the limit.SnappyFrameDecoder — add
maxAllocationparameter with equivalent enforcement.ZstdDecoder — ensure that when
maxAllocationis set, total output across all buffers is bounded (not just per-buffer allocation size).Severity
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:HReferences
This data is provided by OSV and the GitHub Advisory Database (CC-BY 4.0).
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Enabled.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by Mend Renovate.
Summary by Sourcery
Build:
io.netty:netty-codec-http2从4.1.132.Final升级到4.1.133.Final。Original summary in English
Summary by Sourcery
Build: