From: Daniel Turull Date: Wed, 4 Feb 2026 13:42:35 +0000 (+0100) Subject: improve_kernel_cve_report: validate that cve details field exists X-Git-Tag: uninative-5.1~153 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=80ff4903ea1b839f9cd9393b314c3adfbb80b765;p=thirdparty%2Fopenembedded%2Fopenembedded-core.git improve_kernel_cve_report: validate that cve details field exists Check if the cve information has the details field to avoid crashing Signed-off-by: Daniel Turull Signed-off-by: Mathieu Dubois-Briand Signed-off-by: Richard Purdie --- diff --git a/scripts/contrib/improve_kernel_cve_report.py b/scripts/contrib/improve_kernel_cve_report.py index 903de0000c..b386c9383a 100755 --- a/scripts/contrib/improve_kernel_cve_report.py +++ b/scripts/contrib/improve_kernel_cve_report.py @@ -363,7 +363,7 @@ def cve_update(cve_data, cve, entry): 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": + if "detail" in cve_data and 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)