<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 15 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
{font-family:"Cambria Math";
panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
{font-family:Calibri;
panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
{font-family:"Segoe UI";
panose-1:2 11 5 2 4 2 4 2 2 3;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
{margin:0in;
margin-bottom:.0001pt;
font-size:11.0pt;
font-family:"Calibri",sans-serif;}
a:link, span.MsoHyperlink
{mso-style-priority:99;
color:#0563C1;
text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
{mso-style-priority:99;
color:#954F72;
text-decoration:underline;}
span.EmailStyle17
{mso-style-type:personal-compose;
font-family:"Calibri",sans-serif;
color:windowtext;}
.MsoChpDefault
{mso-style-type:export-only;
font-family:"Calibri",sans-serif;}
@page WordSection1
{size:8.5in 11.0in;
margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
{page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="#0563C1" vlink="#954F72">
<div class="WordSection1">
<p class="MsoNormal">Hello folks,<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The command oscap cve find <CVE-id> <NVD-XML-file>, fails to get CVE details from NVD XML (schema version 2.0) files for CVEs that have assessment_check and scanner details.
<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#333333;background:white">Examples:</span><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#333333"><br>
<span style="background:white">#oscap cve find CVE-2011-0013 nvdcve-2.0-2011.xml</span><br>
<span style="background:white">OpenSCAP Error: Unknown XML element in CVE entry: assessment_check [cve_priv.c:569]</span><br>
<span style="background:white">#oscap cve find CVE-2002-0012 nvdcve-2.0-2002.xml</span><br>
<span style="background:white">OpenSCAP Error: Unknown XML element in CVE entry: scanner [cve_priv.c:569]</span></span><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The assessment_check and scanner details for CVEs are provided in NVD XML files 2002-2013, these are not present in the NVD XML files for the year 2014 onwards. Note: The NVD XML file for the year 2002 contains details of CVEs from 1999
to 2002. So CVE lookup of all CVEs from 1999-2013 is affected by this issue. <span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#333333;background:white">
The NVD XML (schema 2.0) files are from the following location:</span><a href="https://nvd.nist.gov/download.cfm#CVE_FEED"><span style="font-size:10.5pt;font-family:"Segoe UI",sans-serif;color:#4078C0;background:white;text-decoration:none">https://nvd.nist.gov/download.cfm#CVE_FEED</span></a><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">The assessment_check and scanner sections for a CVE entry contain the OVAL definition id and link to the id in mitre.org, sample XML content from a CVE entry is provided below that illustrates the usage of these elements.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <vuln:assessment_check system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="http://oval.mitre.org/repository/data/getDef?id=oval:org.mitre.oval:def:12878" name="oval:org.mitre.oval:def:12878"/><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"> <vuln:scanner><o:p></o:p></p>
<p class="MsoNormal"> <vuln:definition system="http://oval.mitre.org/XMLSchema/oval-definitions-5" href="http://oval.mitre.org/repository/data/DownloadDefinition?id=oval:org.mitre.oval:def:12878" name="oval:org.mitre.oval:def:12878"/><o:p></o:p></p>
<p class="MsoNormal"> </vuln:scanner><o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">This issue was found after building from the source (oscap version 1.2.11). I’ve filed a new issue for this in github:
<a href="https://github.com/OpenSCAP/openscap/issues/550">https://github.com/OpenSCAP/openscap/issues/550</a>, and I would like to provide the fix for this issue. One of the alternatives to fix this issue is to read these XML tags (assessment_check and scanner)
in cve_entry_parse() (cve_priv.c), and skip the rest of the attributes of the section, till the next XML tag is reached. Alternately, we can read and save the attributes like name and href in a new structure, and a list of such structures would be linked
in the cve_entry struct. This would require a new struct that saves the name and href, and a new field (list) to be introduced in cve_entry. But since the recent NVD XML files from year 2014 onwards, do not have assessment_check and scanner details in the
CVE entry, adding a new field may not be useful. Please send your comments on this issue, and regarding the fix - whether saving the attributes of the assessment_check and scanner sections would be useful or it can be skipped.<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">Regards,<o:p></o:p></p>
<p class="MsoNormal">Vinay<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</body>
</html>