summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Turull <daniel.turull@ericsson.com>2025-07-04 15:02:55 +0200
committerRichard Purdie <richard.purdie@linuxfoundation.org>2025-07-10 10:47:31 +0100
commit348ef80f275d36e965bc1f656a170bbce23f224a (patch)
tree74237cd7af14e8a24004b82cffbffb8692595693
parentdac57535d979d59a9d965af0552e8879750425aa (diff)
downloadpoky-348ef80f275d36e965bc1f656a170bbce23f224a.tar.gz
improve_kernel_cve_report: do not use custom version
When using the version specified in cve-summary.json, we need to remove the suffix containing the custom version to match the versions from the CVEs. This patch truncates the version from cve-summary.json to use only the base version of the kernel. This is only applicable for kernels where the user has added their own version. (From OE-Core rev: 3942d40e96989268e8d1030f9d8c3859044d9635) 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-xscripts/contrib/improve_kernel_cve_report.py6
1 files changed, 4 insertions, 2 deletions
diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py
index a81aa0ff94..5c39df05a5 100755
--- a/scripts/contrib/improve_kernel_cve_report.py
+++ b/scripts/contrib/improve_kernel_cve_report.py
@@ -445,10 +445,12 @@ def main():
445 is_kernel=True 445 is_kernel=True
446 if not is_kernel: 446 if not is_kernel:
447 continue 447 continue
448 448 # We remove custom versions after -
449 upstream_version = Version(pkg["version"].split("-")[0])
450 logging.info("Checking kernel %s", upstream_version)
449 kernel_cves = get_kernel_cves(args.datadir, 451 kernel_cves = get_kernel_cves(args.datadir,
450 compiled_files, 452 compiled_files,
451 Version(pkg["version"])) 453 upstream_version)
452 logging.info("Total kernel cves from kernel CNA: %s", len(kernel_cves)) 454 logging.info("Total kernel cves from kernel CNA: %s", len(kernel_cves))
453 cves = {issue["id"]: issue for issue in pkg["issue"]} 455 cves = {issue["id"]: issue for issue in pkg["issue"]}
454 logging.info("Total kernel before processing cves: %s", len(cves)) 456 logging.info("Total kernel before processing cves: %s", len(cves))