mirror of
https://git.yoctoproject.org/poky
synced 2026-10-15 04:57:15 +00:00
improve_kernel_cve_report: validate that cve details field exists
Check if the cve information has the details field to avoid crashing (From OE-Core rev: aff05d8a232ea2428c14087a7c5a89991b43bc2d) Signed-off-by: Daniel Turull <daniel.turull@ericsson.com> Signed-off-by: Mathieu Dubois-Briand <mathieu.dubois-briand@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org> (cherry picked from commit 80ff4903ea1b839f9cd9393b314c3adfbb80b765) Signed-off-by: Yoann Congal <yoann.congal@smile.fr> Signed-off-by: Paul Barker <paul@pbarker.dev>
This commit is contained in:
1 parent
21e11f2ef6
commit
6a0c63f249
1 file changed
+1
-1
@@ -362,7 +362,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)
|
||||
|
||||
Reference in new issue
Block a user