Repository navigation
Conversation
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.
Purpose
Harden the dependencies used by Paimon's Java file readers when an embedding application reads files from less-trusted sources.
snappy-javafrom 1.1.10.8 to 1.1.10.12. Avro obtains an uncompressed length before allocating the destination buffer; the fixed library rejects impossible lengths before that allocation.at.yawk.lz4:lz4-javafrom 1.10.4 to 1.14.1, including the fix for unsafe JNI native-library extraction.paimon-formatso the parser relocated into the Avro format enforces document-depth constraints. This is intentionally scoped to the format module rather than changing Jackson resolution in every engine integration.${snappy.version}.Dependency advisories and conditions
The following are existing upstream dependency CVEs. Exposure depends on which reader/backend runs and on the embedding application's trust boundaries; see Paimon's security model.
org.xerial.snappy:snappy-java <= 1.1.10.8; fixed in 1.1.10.9at.yawk.lz4:lz4-java <= 1.11.3; fixed in 1.11.4. The legacyorg.lz4:lz4-javaline is affected from 1.7.0 through 1.8.1.com.fasterxml.jackson.core:jackson-core < 2.15.0; fixed in 2.15.0paimon-shade-jackson-2artifact is discussed below.io.airlift:aircompressor < 2.0.3; fixed in 2.0.3 (aircompressor-v3is a separate artifact, fixed in 3.4).org.lz4:lz4-java <= 1.8.0; fixed in maintainedat.yawk.lz4:lz4-java:1.8.1.These conditions apply independently: reused buffers are required for the two stale-buffer disclosures; shared temporary-directory access is required for the JNI extraction issue.
Audited Paimon release versions
The release-tag POM declarations were checked individually. This table identifies bundled dependency versions; it does not assert that every deployment of these releases is exploitable or that an external dependency override has the same versions.
a0a72519cbb2de6cc8e55a3efbbf130971441bcbExamples of the inspected declarations: 1.1.1, 1.3.2, 1.4.2, 2.1.1. Avro's own transitive Jackson copy is separate from the shared shaded Jackson column; the new test reproduces a stack overflow with Jackson 2.14.3 and rejects the input with the upgraded parser.
The shared
org.apache.paimon.shade.jackson2.*parser is maintained inapache/paimon-shade; its existing upgrade is tracked by paimon-shade#22 and #7431. This PR keeps its current published coordinate, so it builds independently and does not claim to fix that separate copy. Adopting a newly published shared Jackson artifact remains follow-up work.No public Paimon API or on-disk format is changed.
Tests
Passed on JDK 17 with the normal Checkstyle, Spotless and enforcer checks enabled: 78 tests, 0 failures, 0 errors, 0 skipped, plus successful packaging of both Hadoop shaded modules.
StackOverflowError, and an implausible Snappy length is accepted.Snappy.classin both final Hadoop shaded JARs with the published 1.1.10.12 artifact: both match.