Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FP]: False positive on wrapped elasticsearch libraries against ada CPE #7237

Open
jubui opened this issue Dec 9, 2024 · 8 comments
Open

Comments

@jubui
Copy link

jubui commented Dec 9, 2024

Package URl

n/a

CPE

cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*

CVE

CVE-2024-9410

ODC Integration

None

ODC Version

10.0.3

Description

CVE is against ada but none of the libraries in the report are ada. Noticeably, our CPE cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:* very closely resembles the CVE's CPE: cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*. I suspect there is some bad fuzzy search matching going on with the CPE. Our build packages up some elasticsearch libraries into its own zip file.

The following are reported but are not ada:

  • analysis-common-7.17.23.jar
  • ingest-common-7.17.23.jar
  • ingest-geoip-7.17.23.jar
  • keystore-cli-7.17.23.jar
  • lang-painless-7.17.23.jar
  • legacy-geo-7.17.23.jar
  • runtime-fields-common-7.17.23.jar

output of dependencyCheckAnalyze:

my-package.zip: analysis-common-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: ingest-common-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: ingest-geoip-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: keystore-cli-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: lang-painless-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: legacy-geo-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
my-package.zip: runtime-fields-common-7.17.23.jar (cpe:2.3:a:4d:4d:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:ada:ada:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elastic:elasticsearch:7.17.23:*:*:*:*:*:*:*, cpe:2.3:a:elasticsearch:elasticsearch:7.17.23:*:*:*:*:*:*:*) : CVE-2024-9410
@jubui jubui added the FP Report label Dec 9, 2024
Copy link
Contributor

github-actions bot commented Dec 9, 2024

Error parsing package url: n/a.

Error: Error: Invalid purl: missing required "pkg" scheme component

Please correct the package URL - consider copying the package url from the HTML report.

Copy link
Contributor

github-actions bot commented Dec 9, 2024

Failed to automatically evaluate the false positive. See: https://github.com/jeremylong/DependencyCheck/actions/runs/12240050584

@chadlwilson
Copy link
Contributor

Please include the maven package URIs for the artifacts being incorrectly matched as noted in the report, or it's too difficult to review/craft a suppression.

@jubui
Copy link
Author

jubui commented Dec 10, 2024

@chadlwilson thanks for taking a look. There was no package URI that was output as part of the dependency check report. You can see in the screenshot that the third column is just blank:

image

Where would I be able to find the package URIs for the following? Is pkg URI something I can find publicly?

analysis-common-7.17.23.jar
ingest-common-7.17.23.jar
ingest-geoip-7.17.23.jar
keystore-cli-7.17.23.jar
lang-painless-7.17.23.jar
legacy-geo-7.17.23.jar
runtime-fields-common-7.17.23.jar

@chadlwilson
Copy link
Contributor

Maybe that's in some way the problem here. Is it the same on a more recent ODC version? You're not using it via Gradle or maven plugin?

Do you have a simple way to reproduce this?

If it's specific to the way the jars are inside that zip and it can't find poms to match the jars to their source you might have to suppress them yourselves as a generic suppression will have issues too.

Usually the report will give you a suggested suppression in the detail (by sha or similar if it can't figure out the maven package) which is a hint as to the problem.

Copy link
Contributor

Error parsing package url: n/a.

Error: Error: Invalid purl: missing required "pkg" scheme component

Please correct the package URL - consider copying the package url from the HTML report.

Copy link
Contributor

Failed to automatically evaluate the false positive. See: https://github.com/jeremylong/DependencyCheck/actions/runs/12259469681

@aikebah
Copy link
Collaborator

aikebah commented Dec 18, 2024

@jubui Your libraries are not hosted on Maven Central and are therefor not found (from sha1 value) by the CentralAnalyzer, which means the CLI needs to fall-back to pure textual analysis of evidences found in the jars not taking into account the maven coordinates for the same libraries.

If you have a private repository manager (Artifactory Pro or Nexus) proxying the access to amongst others the codelibs repository you might have better results when you activate their respective analyzer that would do a sha1-hash search for the library in your private repository manager and should typically manage to link the maven Group/Artifact/Version of the libraries so that a better match can be made.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants