Skip to content

KNOX-3565: Exclude snappy-java from hadoop-common - #1507

Merged
smolnar82 merged 2 commits into
apache:masterfrom
smolnar82:KNOX-3565
Nov 12, 2026
Merged

smolnar82 merged 2 commits into
apache:masterfrom
smolnar82:KNOX-3565

Conversation

@smolnar82

@smolnar82 smolnar82 commented Nov 11, 2026 •

Copy link
Copy Markdown
Contributor

KNOX-3565 - Exclude snappy-java from hadoop-common

What changes were proposed in this pull request?

hadoop-common 3.4.1 transitively pulled org.xerial.snappy:snappy-java:1.1.10.4 into almost every module at compile scope, so the gateway shipped a version affected by CVE-2026-108106 (unbounded allocation on crafted compressed input, fixed in 1.1.10.9). Knox doesn't need snappy-java at runtime: only ZooKeeper's server-side snapshot code (SnapStream) and Hadoop's SnappyCodec reference it, and Knox uses neither (Knox is a ZooKeeper client only, via Curator).

  • Excludes snappy-java from the managed hadoop-common dependency in the root pom, and from the hadoop-common test-jar in gateway-test-release, which dependencyManagement doesn't cover.
  • Stops excluding snappy-java from curator-test: embedded ZooKeeper servers started by TestingServer need it, and hadoop-common had been supplying it silently. It's pinned to 1.1.10.12 at test scope (curator would otherwise bring 1.1.7).
  • Adds an enforcer bannedDependencies rule for snappy-java at compile/runtime scope, so it can't come back into the release through another dependency.

How was this patch tested?

  • mvn dependency:tree -Dincludes=org.xerial.snappy:snappy-java: snappy-java 1.1.10.12 at test scope only, in the four modules with embedded ZooKeeper tests (gateway-server, gateway-service-remoteconfig, gateway-provider-ha, gateway-test).
  • mvn validate passes. Temporarily banning test scope too makes the build fail with Found Banned Dependency, which confirms the scoped ban pattern matches.
  • The ZooKeeper-backed unit tests in gateway-server, gateway-service-remoteconfig and gateway-provider-ha pass, as do the unit tests for gateway-spi, gateway-topology-hadoop-xml, gateway-provider-identity-assertion-hadoop-groups and gateway-provider-security-hadoopauth.
  • Scanned the bytecode of all jars on the gateway-release runtime classpath: no Knox or Curator code reaches the classes that reference snappy-java.

Integration Tests

No integration tests were added or changed; this is a dependency-only change. The existing CI suites cover the runtime behavior.

@smolnar82 smolnar82 self-assigned this Nov 11, 2026
@smolnar82 smolnar82 added the dependencies Pull requests that update a dependency file label Nov 11, 2026
@github-actions

github-actions Bot commented Nov 11, 2026 •

Copy link
Copy Markdown

Test Results

  5 files    5 suites   1m 37s ⏱️
212 tests 210 ✅ 2 💤 0 ❌
253 runs  251 ✅ 2 💤 0 ❌

Results for commit 13f0747.

♻️ This comment has been updated with latest results.

@smolnar82
smolnar82 merged commit 8bf7119 into apache:master Nov 12, 2026
3 checks passed
@smolnar82
smolnar82 deleted the KNOX-3565 branch November 12, 2026 13:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants