Skip to contentSkip to conversation

cve-update-nvd2-native: handle missing vulnStatus

PATCH Marko, Peter 2 participants 2 messages Mar 28, 2025 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

dunfell and styhead are EOL and not accepting patches, so they will start failing to update DB. Shall they be removed from the Valkyrie CVE reports?

Alternatively, they could reuse database fetched by a branch which can process CVE feeds. Or we could also ask NVD to fix this CVE in their API and wait what happens.

Peter

Quoted 47 lines

-----Original Message-----
From: [email protected] <openembedded- [email protected]> On Behalf Of Peter Marko via lists.openembedded.org
Sent: Friday, March 28, 2025 16:47
To: [email protected]
Cc: Marko, Peter (FT D EU SK BFS1) <[email protected]>
Subject: [OE-core][PATCH] cve-update-nvd2-native: handle missing vulnStatus

From: Peter Marko <[email protected]>

There is a new CVE which is missing vulnStatus field:
https://services.nvd.nist.gov/rest/json/cves/2.0?cveId=CVE-2025-2682

This leads to:
File: '<snip>/poky/meta/recipes-core/meta/cve-update-nvd2-native.bb', lineno:
336, function: update_db
0332:
0333: accessVector = None
0334: vectorString = None
0335: cveId = elt['cve']['id']
*** 0336: if elt['cve']['vulnStatus'] == "Rejected":

     0337:        c = conn.cursor()
     0338:        c.execute("delete from PRODUCTS where ID = ?;", [cveId])
     0339:        c.execute("delete from NVD where ID = ?;", [cveId])
     0340:        c.close()

Exception: KeyError: 'vulnStatus'

---
 meta/recipes-core/meta/cve-update-nvd2-native.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes- renamed from meta/recipes-core/meta/cve-update-nvd2-native.bb +0 -0

core/meta/cve-update-nvd2-native.bb
index a68a8bb89f..b9c18bf6b6 100644

meta/recipes-core/meta/cve-update-nvd2-native.bb +1 -1
@@ -336,7 +336,7 @@ def update_db(conn, elt):
     accessVector = None
     vectorString = None
     cveId = elt['cve']['id']
-    if elt['cve']['vulnStatus'] ==  "Rejected":
+    if elt['cve'].get('vulnStatus') ==  "Rejected":
         c = conn.cursor()
         c.execute("delete from PRODUCTS where ID = ?;", [cveId])
         c.execute("delete from NVD where ID = ?;", [cveId])
#2 lore raw
Quoted 8 lines · Peter

dunfell and styhead are EOL and not accepting patches, so they will start failing to update DB.
Shall they be removed from the Valkyrie CVE reports?

Alternatively, they could reuse database fetched by a branch which can process CVE feeds.
Or we could also ask NVD to fix this CVE in their API and wait what happens.

I suspect if we fix the stable branches which are active, we'll have an up to date database for the rest of the code to work off. That should work for styhead but I'm less sure about dunfell. We may want to stop the metrics for that now though anyway. I'd left it as it was interesting to have the data on what happens after they go EOL. The kernel CVE data has kind of drowned out everything else unfortnuatley.

Cheers,

Richard