Skip to content

Conversation

@razvan
Copy link
Member

@razvan razvan commented Nov 11, 2024

@razvan razvan marked this pull request as ready for review November 12, 2024 10:05
@razvan razvan requested a review from a team November 12, 2024 10:05
@razvan razvan requested a review from dervoeti November 15, 2024 11:03
NickLarsenNZ
NickLarsenNZ previously approved these changes Nov 28, 2024
Copy link
Member

@NickLarsenNZ NickLarsenNZ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@razvan
Copy link
Member Author

razvan commented Nov 28, 2024

Merged main and moved changelog entries up to the Unreleased section.

@razvan razvan requested a review from NickLarsenNZ November 28, 2024 20:12
@razvan razvan enabled auto-merge November 28, 2024 20:12
@razvan razvan self-assigned this Dec 16, 2024
@lfrancke
Copy link
Member

Instead of relying on getting a newer dependency "by accident" we'd need to actually properly depend on the new version.

@razvan
Copy link
Member Author

razvan commented Dec 17, 2024

Instead of relying on getting a newer dependency "by accident" we'd need to actually properly depend on the new version.

A newer version is already configured in the parent pom.xml.

Here we exclude the vulnerable version that is coming with hadoop-common.

@sbernauer sbernauer requested a review from lfrancke January 20, 2025 08:04
@lfrancke
Copy link
Member

But if we have a newer version in the parent we don't need to exclude it here, do we?
I'm sorry for the late response :(

@razvan
Copy link
Member Author

razvan commented Jan 21, 2025

But if we have a newer version in the parent we don't need to exclude it here, do we?

It's been a while so I had to start from the beginning.

Currently, without this patch, the vulnerable snappy jar is indeed not part of the image (at list not as a stand-alone jar file). It is listed in the CycloneDX output, that's why the vulnerability is reported.

Proof:

$ docker run -ti --entrypoint bash --rm docker.stackable.tech/stackable/hive:4.0.0-stackable24.11.1
...
$ find /stackable/hadoop/ -name '*snappy*'
/stackable/hadoop/share/hadoop/common/lib/snappy-java-1.1.10.4.jar
/stackable/hadoop/share/hadoop/hdfs/lib/snappy-java-1.1.10.4.jar
$ find /stackable/hive-metastore/ -name '*snappy*'
$
$ grep snappy /stackable/hive-metastore/apache-hive-metastore-4.0.0.cdx.json
      "group" : "org.xerial.snappy",
      "name" : "snappy-java",
      "description" : "snappy-java: A fast compression/decompression library",
      "purl" : "pkg:maven/org.xerial.snappy/[email protected]?type=jar",
          "url" : "https://github.com/xerial/snappy-java"
          "url" : "https://github.com/xerial/snappy-java"
      "bom-ref" : "pkg:maven/org.xerial.snappy/[email protected]?type=jar"
        "pkg:maven/org.xerial.snappy/[email protected]?type=jar"
        "pkg:maven/org.xerial.snappy/[email protected]?type=jar",
      "ref" : "pkg:maven/org.xerial.snappy/[email protected]?type=jar",

This patch removes it from the CycloneDX file too. The confusion arises from the fact that the Cyclone report is generated from the original Hive pom.xml but we actually copy the Hadoop binaries that we build ourselves.

Now I think that a better approach would be to classify the vulnerability as a false positive in SecObserve and close this PR.

WDYT?

@sbernauer sbernauer requested review from lfrancke and removed request for lfrancke January 27, 2025 08:08
@lfrancke
Copy link
Member

Okay. Understood. In that case I'm fine with either option. I just wanted to understand.

We can merge this PR (maybe with an extended comment on why we exclude it) or close it in SecObserve.

Please continue as you see fit.
@dervoeti FYI

@dervoeti
Copy link
Member

Now I think that a better approach would be to classify the vulnerability as a false positive in SecObserve and close this PR.

Sounds good to me.

I also checked the image and did not find the affected Snappy version anywhere, I even checked whether it's included in any other "fat" JAR, which was not the case. The vulnerability should go away completely once we generate our own version of Hadoop and depend on that in Hive's pom.xml, which will hopefully happen soon-ish.

@razvan
Copy link
Member Author

razvan commented Jan 28, 2025

The CVE has been assesst as "false positive".

@razvan razvan closed this Jan 28, 2025
auto-merge was automatically disabled January 28, 2025 09:08

Pull request was closed

@lfrancke lfrancke deleted the fix/hive/cve-2023-34455 branch July 4, 2025 10:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

5 participants