[fix][sec][branch-4.x] Upgrade lz4-java to 1.11.2 - #26439
Merged
Conversation
Upgrades at.yawk.lz4:lz4-java from 1.11.1 to 1.11.2, a security-only release that fixes two moderate (CVSS 5.3, CWE-789) unvalidated allocation issues: - GHSA-6cx8-rjf8-pr8g: LZ4DecompressorWithLength.decompress(byte[], int) passes the unvalidated 4-byte length header straight to LZ4FastDecompressor.decompress(byte[], int, int), which allocates the declared size before reading any payload. A 5-byte input can force up to a 2 GiB allocation. - GHSA-4v53-57pg-c464: LZ4BlockInputStream.refill() grows its input buffer to the attacker-controlled compressedLen from the block header before reading the payload. master is already on 1.11.2; this is the branch-4.x port. Release notes: https://github.com/yawkat/lz4-java/releases/tag/v1.11.2
lhotari
requested review from
Technoboy-,
dao-jun,
david-streamlio,
merlimat and
nodece
August 31, 2026 09:15
Technoboy-
approved these changes
Aug 31, 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
lz4-java 1.11.2 is a security-only release that fixes two unvalidated-allocation
(CWE-789) issues, both moderate, both CVSS 5.3
(
CVSS:3.1/AV:N/AC:L/PR:N/UI:N/S:U/C:N/I:N/A:L), both affectingat.yawk.lz4:lz4-java <= 1.11.1:LZ4DecompressorWithLength.decompress(byte[], int)reads the 4-byte little-endiandecompressed-length header via
getDecompressedLength()and passes it straight toLZ4FastDecompressor.decompress(byte[], int, int), which doesnew byte[destLen]before reading a single byte of payload.
getDecompressedLength()performs novalidation at all — no bound against
src.length, no ceiling, no rejection ofnegatives — so a 5-byte input can force up to a 2 GiB allocation per call.
LZ4SafeDecompressor.decompress(byte[], int, int, int)has the same shape viamaxDestLen.LZ4BlockInputStream.refill()grows its compressed-input buffer to theattacker-controlled
compressedLentaken from the legacyLZ4Blockheader beforereading the payload, so a header-only input can trigger a near-2 GiB allocation.
Neither advisory has a CVE assigned; both are repository-level advisories published
2026-08-06 and are only reachable through
/repos/yawkat/lz4-java/security-advisories, not the global advisory database.Exposure in Pulsar is limited, but the vulnerable jar does ship. Pulsar's own LZ4
codec (
CompressionCodecLZ4) uses aircompressor, not lz4-java, and no Pulsarproduction code calls the affected decompressor APIs —
pulsar-commondeclareslz4-java at
testscope only, for theCompressionCodecLZ4JNIreference codec.However
at.yawk.lz4:lz4-javareaches the server distribution transitively viaBookKeeper's
distributedlog-common, solib/at.yawk.lz4-lz4-java-1.11.1.jarisbundled in the release tarball and is reported by dependency scanners.
masteris already on 1.11.2 (gradle/libs.versions.toml); this is the branch-4.xport.
branch-4.0is also on 1.11.1 and takes the same patch.Modifications
pom.xml— bumplz4java.versionfrom1.11.1to1.11.2. ThedependencyManagemententry forat.yawk.lz4:lz4-javauses this property, so it alsopins the transitive BookKeeper/distributedlog resolution.
distribution/server/src/assemble/LICENSE.bin.txt— update the bundled jar name toat.yawk.lz4-lz4-java-1.11.2.jar.Upstream 1.11.2 is a security patch plus 23 Renovate dependency/plugin updates
(v1.11.1...v1.11.2).
One upstream behaviour change is worth calling out: per GHSA-4v53-57pg-c464, 1.11.2
now rejects LZ4 blocks whose compressed length exceeds the uncompressed length. A
canonical
LZ4BlockOutputStreamnever emits such a block — it writesCOMPRESSION_METHOD_RAWinstead — so this only rejects non-canonical input. The newacceptOversizedBlocksflag restores the old behaviour but reintroduces the DoSvector. Pulsar does not use
LZ4BlockInputStream/LZ4BlockOutputStream, so this doesnot affect Pulsar's on-the-wire format.
Verifying this change
This change is a dependency upgrade without new test coverage; it is covered by
existing tests.
Verified locally:
.classand bundled native library (.so/.dylib/.dll) entries is identical,and the set of artifacts referenced by the published POM is identical — no public
API change, no new transitive dependency.
lz4-java-1.11.2.jarSHA-1 matches the checksum published on MavenCentral.
LICENSE.bin.txtentry is validated in CI bysrc/check-binary-license.shagainst the assembled server tarball.Does this pull request potentially affect one of the following parts:
If the box was checked, please highlight the changes