diff options
author | Daniel Turull <daniel.turull@ericsson.com> | 2025-07-04 15:02:54 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2025-07-10 10:47:30 +0100 |
commit | dac57535d979d59a9d965af0552e8879750425aa (patch) | |
tree | de5371463cc65604f1bba8bb9e11449247f876d3 | |
parent | dac5aaa11768c9ec725370ec978c2586e564a6da (diff) | |
download | poky-dac57535d979d59a9d965af0552e8879750425aa.tar.gz |
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>
-rwxr-xr-x | scripts/contrib/improve_kernel_cve_report.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py index 829cc4cd30..a81aa0ff94 100755 --- a/scripts/contrib/improve_kernel_cve_report.py +++ b/scripts/contrib/improve_kernel_cve_report.py | |||
@@ -340,6 +340,10 @@ def cve_update(cve_data, cve, entry): | |||
340 | if cve_data[cve]['status'] == entry['status']: | 340 | if cve_data[cve]['status'] == entry['status']: |
341 | return | 341 | return |
342 | if entry['status'] == "Unpatched" and cve_data[cve]['status'] == "Patched": | 342 | if entry['status'] == "Unpatched" and cve_data[cve]['status'] == "Patched": |
343 | # Backported-patch (e.g. vendor kernel repo with cherry-picked CVE patch) | ||
344 | # has priority over unpatch from CNA | ||
345 | if cve_data[cve]['detail'] == "backported-patch": | ||
346 | return | ||
343 | logging.warning("CVE entry %s update from Patched to Unpatched from the scan result", cve) | 347 | logging.warning("CVE entry %s update from Patched to Unpatched from the scan result", cve) |
344 | cve_data[cve] = copy_data(cve_data[cve], entry) | 348 | cve_data[cve] = copy_data(cve_data[cve], entry) |
345 | return | 349 | return |