Validate length of input in InstantDeserializer - #387
Merged
Conversation
InstantDeserializer
dongjoon-hyun
added a commit
to apache/spark-kubernetes-operator
that referenced
this pull request
Sep 10, 2026
### What changes were proposed in this pull request? This PR aims to upgrade `Jackson` to 2.22.2 by pinning it explicitly in `gradle/libs.versions.toml` and forcing every `com.fasterxml.jackson*` artifact to that version in the root `build.gradle`, in the same way as `Netty` and `Hadoop`. The same rule is applied to the root `buildscript` classpath so that the Gradle plugins (`crd-generator-api-v2`, `cyclonedx`) use the same Jackson version as the modules. `jackson-annotations` is pinned separately to 2.22 because it uses a version scheme without a patch digit since Jackson 2.20 (2.22 is the version paired with 2.22.2 by `jackson-bom`). `gradle/verification-metadata.xml` was regenerated from scratch. ### Why are the changes needed? Previously, `Jackson` was a purely transitive dependency and resolved to 2.21.4 in the modules (via Apache Spark 4.2.0) and 2.22.1 in the plugin classpath. This PR pins it explicitly to a single version and brings the latest bug fixes and security fixes. This is also consistent with Apache Spark 5, which already moved to the Jackson 2.22.x line. - apache/spark#56749 - apache/spark#58116 - apache/spark#58677 Releases: - [Jackson 2.22](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.22) (2026-05-31, [jackson-databind-2.22.0](https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.22.0)) - [Jackson 2.22.1](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.22.1) (2026-07-07, [jackson-databind-2.22.1](https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.22.1)) - [CVE-2026-54515](FasterXML/jackson-databind#5962): Case-insensitive deserialization may use wrong `JsonIgnoreProperties` - [GHSA-mhm7-754m-9p8w](FasterXML/jackson-databind#6054): Honor `JsonView` for external-type-id (`EXTERNAL_PROPERTY`) properties - [CVE-2026-77310](FasterXML/jackson-databind#6058): Do not allow DNS resolution when deserializing `InetAddress` - [CVE-2026-59889](FasterXML/jackson-databind#6060): `JsonView` by-passed for `JsonUnwrapped` Field/Setter properties - [Jackson 2.22.2](https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.22.2) (2026-08-16, [jackson-databind-2.22.2](https://github.com/FasterXML/jackson-databind/releases/tag/jackson-databind-2.22.2)) - [GHSA-2c4j-63jj-9fqr](FasterXML/jackson-core#1642): Fix `maxDocumentLength` bypass in async parser single-`feedInput()` case - [CVE-2026-68498](FasterXML/jackson-core#1643): Enforce `maxNameLength` incrementally in `ReaderBasedJsonParser` - [CVE-2026-68497](FasterXML/jackson-databind#6127): Add `StreamReadConstraints` number length constraint to `javax.xml.datatype.GregorianCalendar` and `Duration` - [CVE-2026-19032](FasterXML/jackson-databind#6129): Limit the supported URL schemes for `java.nio.file.Path` deserialization - [CVE-2026-83557](FasterXML/jackson-databind#6156): Add `java.lang.Comparable` as an "unsafe" polymorphic base type - [GHSA-255r-36wv-4qpr](FasterXML/jackson-dataformats-text#707): Constrain deeply nested YAML merge keys in `YAMLAnchorReplayingParser` - `YAMLAnchorReplayingParser` produces invalid sequence of events when using the merge operator inside an anchor ([#624](FasterXML/jackson-dataformats-text#624)) - Enforce `StreamReadConstraints.maxNestingDepth` in `FromXmlParser` ([#891](FasterXML/jackson-dataformat-xml#891)) - Validate length of input in `InstantDeserializer` ([#387](FasterXML/jackson-modules-java8#387)) ### Does this PR introduce _any_ user-facing change? No. ### How was this patch tested? Pass the CIs. ### Was this patch authored or co-authored using generative AI tooling? Generated-by: Claude Fable 5.1 Closes #819 from dongjoon-hyun/SPARK-59392. Authored-by: Dongjoon Hyun <dongjoon@apache.org> Signed-off-by: Dongjoon Hyun <dongjoon@apache.org>
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.
a backport of FasterXML/jackson-databind#6133