Bug 14630

Summary: cve-check mishandles -
Product: [Build System, Metadata & Runtime] OE-Core Reporter: Ross Burton <ross.burton>
Component: devtools / tool chainAssignee: Geoffrey Giry <geoffrey.giry>
Status: RESOLVED NOTABUG QA Contact:
Severity: enhancement    
Priority: Medium+ CC: geoffrey.giry, meta.mr.watcher, meta.watcher, randy.macleod, yoann.congal
Version: 4.0   
Target Milestone: 4.2 M4   
Hardware: x86   
OS: Multiple   
Whiteboard:
OS type for building Yocto: --- Type of Regression: ---
Verified: Documentation change: No (bug/feature does not impact docs)

Description Ross Burton 2021-11-15 17:34:30 UTC
https://nvd.nist.gov/vuln/detail/CVE-2021-3682 has this CPE:

cpe:2.3:a:qemu:qemu:6.1.0:-:*:*:*:*:*:*

That means "not 6.1.0". This isn't handled by our comparison logic as this CVE gets reported although have 6.1.0.

References to the specs:
https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7695.pdf
https://nvlpubs.nist.gov/nistpubs/Legacy/IR/nistir7696.pdf
Comment 1 Geoffrey Giry 2023-03-03 11:04:41 UTC
The hyphen ("-") in the given CPE is part of the update field.

This field allows specifying the update name of the version.

From my understanding of the linked documentation, CPE should be read as follows:

cpe:2.3:a:qemu:qemu:6.1.0:rc1:*:*:*:*:*:* points to 6.1.0-rc1
cpe:2.3:a:qemu:qemu:6.1.0:-:*:*:*:*:*:* points to 6.1.0, with no update applied
cpe:2.3:a:qemu:qemu:6.1.0:*:*:*:*:*:*:* points to all updates of 6.1.0

If I misunderstood the notation, can you please point to the part of the doc detailing the usage of hyphen to means "not in"?

If I did understand the notation correctly, then I think the issue is in NVD, and the line cpe:2.3:a:qemu:qemu:6.1.0:-:*:*:*:*:*:* should not be listed as impacted configuration.
And in that case I think cve-check works as intended
Comment 2 Yoann Congal 2023-03-07 17:28:29 UTC
Ross, what do you think about the above comment?
(Setting NEEDINFO and owner)
Comment 3 Ross Burton 2023-03-30 16:05:24 UTC
I like that argument.  Geoffrey: would you be willing to contact NIST and get the CPE updated?  If they accept the changes, I was wrong, and we can close this bug
Comment 4 Geoffrey Giry 2023-03-31 07:30:51 UTC
Ross, I have sent a mail to NVD for change.
I will update the ticket as soon as I have news
Comment 5 Geoffrey Giry 2023-03-31 22:02:24 UTC
I already have news, NVD approved the change and the CVE page is already updated: https://nvd.nist.gov/vuln/detail/CVE-2021-3682

Therefore, I am closing this ticket.
Comment 6 Ross Burton 2023-04-03 08:58:27 UTC
Perfect, thanks!