1
0
mirror of https://git.yoctoproject.org/poky synced 2026-05-07 04:58:26 +00:00

improve_kernel_cve_report: do not override backported-patch

If the user has a CVE_STATUS for their own backported patch,
the backport takes priority over upstream vulnerable versions.

(From OE-Core rev: 0beef05be119ea465ba06553a42edea03dfc9fd3)

Signed-off-by: Daniel Turull <daniel.turull@ericsson.com>
Signed-off-by: Antonin Godard <antonin.godard@bootlin.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
Daniel Turull
2025-07-04 15:02:54 +02:00
committed by Richard Purdie
parent dac5aaa117
commit dac57535d9
@@ -340,6 +340,10 @@ def cve_update(cve_data, cve, entry):
if cve_data[cve]['status'] == entry['status']:
return
if entry['status'] == "Unpatched" and cve_data[cve]['status'] == "Patched":
# Backported-patch (e.g. vendor kernel repo with cherry-picked CVE patch)
# has priority over unpatch from CNA
if cve_data[cve]['detail'] == "backported-patch":
return
logging.warning("CVE entry %s update from Patched to Unpatched from the scan result", cve)
cve_data[cve] = copy_data(cve_data[cve], entry)
return