Closed eric-desrochers closed 6 months ago
Hello @eric-desrochers Thanks for your report!
The Mariner database doesn't use OR
for criterias. Instead, the database contains two definitions with the same CVE.
e.g. for your case:
<definition class="vulnerability" id="oval:com.microsoft.cbl-mariner:def:31880" version="1">
<metadata>
<title>CVE-2023-5678 affecting package openssl for versions less than 1.1.1k-28</title>
<affected family="unix">
<platform>CBL-Mariner</platform>
</affected>
<reference ref_id="CVE-2023-5678" ref_url="https://nvd.nist.gov/vuln/detail/CVE-2023-5678" source="CVE"/>
<patchable>true</patchable>
<advisory_id>31880-1</advisory_id>
<severity>Medium</severity>
<description>CVE-2023-5678 affecting package openssl for versions less than 1.1.1k-28. A patched version of the package is available.</description>
</metadata>
<criteria operator="AND">
<criterion comment="Package openssl is earlier than 1.1.1k-28, affected by CVE-2023-5678" test_ref="oval:com.microsoft.cbl-mariner:tst:31880000"/>
</criteria>
</definition>
<definition class="vulnerability" id="oval:com.microsoft.cbl-mariner:def:31872" version="1">
<metadata>
<title>CVE-2023-5678 affecting package edk2 for versions less than 20230301gitf80f052277c8-38</title>
<affected family="unix">
<platform>CBL-Mariner</platform>
</affected>
<reference ref_id="CVE-2023-5678" ref_url="https://nvd.nist.gov/vuln/detail/CVE-2023-5678" source="CVE"/>
<patchable>true</patchable>
<advisory_id>31872-1</advisory_id>
<severity>Medium</severity>
<description>CVE-2023-5678 affecting package edk2 for versions less than 20230301gitf80f052277c8-38. A patched version of the package is available.</description>
</metadata>
<criteria operator="AND">
<criterion comment="Package edk2 is earlier than 20230301gitf80f052277c8-38, affected by CVE-2023-5678" test_ref="oval:com.microsoft.cbl-mariner:tst:31872000"/>
</criteria>
</definition>
In this case, we overwrite advisories for the same CVEs.
@eric-desrochers Other vendors have a list of affected packages and versions in criteria. Do you want to get aligned with others? Would you like us to fix it?
@DmitriyLewen Does the OVAL definition allow this case? I think it's allowed, but want to double-check it.
@knqyf263 I am afraid we won't be able to change our OVAL structure (at least for now) to put all the affected packages under the same definition with multiples criteria using a OR
method as it may breaks the way we designed it with other scanning partners.
What are the options available to fix this situation ? Seems like you have drafted 2 PR to fix it on your end. I would go with that option for now (if possible).
@knqyf263 OVAL requires filling in a id
- https://github.com/OVALProject/Language/blob/7fa7bba7b48f09decb732d00b2be032a487ff9fc/schemas/oval-definitions-schema.xsd#L213
But there is no information about the uniqueness of id
.
So this case is allowed.
@DmitriyLewen @knqyf263 good day, what is the next course of action for this bug ?
You can watch this PR. https://github.com/aquasecurity/vuln-list-update/pull/271
The product team confirmed this change. We'll merge the PR this month.
Thank you very much
What version of trivy this fix will be introduce into ?
Trivy DB has a different release cycle from Trivy. Once the PR gets merged, it will be distributed within 6 hours.
trivy-db already contains CVE-2023-5678
for openssl
and edk2
:
@eric-desrochers FYI ^
Thanks a bunch
Scanning an image with version of OpenSSL 1.1.1k-27 (which is vulnerable) doesn't report it as so although our OVAL file is correctly set.
Reproducer:
Our OVAL file: