<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "https://bugzilla.yoctoproject.org/page.cgi?id=bugzilla.dtd">

<bugzilla version="5.0.6"
          urlbase="https://bugzilla.yoctoproject.org/"
          
          maintainer="it-coreprojects-helpdesk@linuxfoundation.org"
>

    <bug>
          <bug_id>7515</bug_id>
          
          <creation_ts>2015-03-25 15:22:06 +0000</creation_ts>
          <short_desc>Add CVE testing tool</short_desc>
          <delta_ts>2017-02-07 09:12:02 +0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>6</classification_id>
          <classification>Yocto Project Subprojects</classification>
          <product>Patchwork/Patchtest</product>
          <component>Patchtest Testsuite</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Multiple</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          <see_also>https://bugzilla.yoctoproject.org/show_bug.cgi?id=10771</see_also>
          <bug_file_loc></bug_file_loc>
          <status_whiteboard></status_whiteboard>
          <keywords></keywords>
          <priority>Medium+</priority>
          <bug_severity>enhancement</bug_severity>
          <target_milestone>2.2 M4</target_milestone>
          <dependson>8119</dependson>
          
          <everconfirmed>1</everconfirmed>
          <reporter name="Ross Burton">ross.burton</reporter>
          <assigned_to name="Mariano Lopez">mariano.lopez</assigned_to>
          <cc>akuster</cc>
    
    <cc>alex.kanavin</cc>
    
    <cc>bluelightning</cc>
    
    <cc>jose.a.lamego</cc>
    
    <cc>joshuagloe</cc>
    
    <cc>leonardo.sandoval.gonzalez</cc>
    
    <cc>mariano.lopez</cc>
    
    <cc>mhalstead</cc>
    
    <cc>richard.purdie</cc>
    
    <cc>stanciux.mihail</cc>
    
    <cc>zhenfeng.zhao</cc>
          
          <qa_contact name="Lucian Musat">georgex.l.musat</qa_contact>
          <cf_os>---</cf_os>
          <cf_regression_type>---</cf_regression_type>
          
          <cf_docchange>No (bug/feature does not impact docs)</cf_docchange>

      

      

      

          <comment_sort_order>oldest_to_newest</comment_sort_order>  
          <long_desc isprivate="0" >
    <commentid>49752</commentid>
    <comment_count>0</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-03-25 15:22:06 +0000</bug_when>
    <thetext>Clear Linux has released their CVE checking tool (https://github.com/ikeydoherty/cve-check-tool) which verifies that all known CVEs are fixed in their distribution.  We should extend that tool to read bitbake metadata.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>49808</commentid>
    <comment_count>1</comment_count>
    <who name="Saul Wold">sgw</who>
    <bug_when>2015-03-26 16:09:17 +0000</bug_when>
    <thetext>Please also refer to our existing tool: 
http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/log/?h=mulhern/cvechecker-final2, 
which uses an upstream tool and set of scripts in the 3rd commit from the top.

We want to consider integrating this in with recipetool and AUH.

This may be something given to one of the othe GDC, but leaving with Anibal as 
starting point.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50363</commentid>
    <comment_count>2</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-04-16 17:03:57 +0000</bug_when>
    <thetext>The author of the Clear tool isn&apos;t very complementary of the upstream tool.  Integration into other tooling such as AUH is useful but the ability to run standalone is fairly important I&apos;d say: the ability to run a full CVE check when you&apos;re getting ready to release is key.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>50731</commentid>
    <comment_count>3</comment_count>
    <who name="Alexandru Georgescu">alexandru.c.georgescu</who>
    <bug_when>2015-05-04 11:15:39 +0000</bug_when>
    <thetext>Lucian,
Maybe we can dry run this before it&apos;s implemented by Ross.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>52885</commentid>
    <comment_count>4</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-08-06 20:19:47 +0000</bug_when>
    <thetext>Talking with RP it have a dependency in upstream patching format that need to specify if patch is CVE.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55952</commentid>
    <comment_count>5</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2015-10-28 21:16:39 +0000</bug_when>
    <thetext>What is the intent of such a framework or tool?

What will the Yocto Project do with the data is gathers from such a tool?

Is the AB ok with the Yocto project exposing security vulnerabilities to AB member customers before the AB members can get their responses / fixes distributed? Or the AB member customers may not approve if they them selves can get the fixes in their products.

- Armin</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>55953</commentid>
    <comment_count>6</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2015-10-28 22:22:44 +0000</bug_when>
    <thetext>I have been avoiding commenting on this as I was hoping an unbiased individual would have run this to see what it takes to accurately get a listing of vulnerabilities. 

I have not run this myself but the description is similar in nature to OpenVas which I have run.  They both need databases to be able to provide notification if a package is vulnerable. The first issue is the data provided in security notifications are not always accurate. A common statement is Version X and below are affected. Now someone needs to look at the code to see if this is true. Kernel tends to be worst offender in this. Who has the time to do this?

So we use the prserver.. all packages are &apos;R0&apos; and we don&apos;t rev no mater how many security patches have been applied. If the scanning s/w is run, it will produce false positives. Do we update the DB? Or a copy of the prserve data needs to be provided and synced with a commit so to minimize false positives. any false positives need to be  updated in the database. Who has the time to do this? This comparison tends to  works if the package itself is updated to a newer version.

I would rather spend the time fixing something than creating and maintaining a database to tell me something is possible affected.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56148</commentid>
    <comment_count>7</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-03 16:24:21 +0000</bug_when>
    <thetext>As far as a tool goes, we&apos;ve recently open-sourced something that was being developed privately by a sister team: https://github.com/01org/isafw

It&apos;s a framework of security-related tools but the relevant bit for this is ISA_cve_plugin which uses cve-check-tools (https://github.com/ikeydoherty/cve-check-tool) for the real work.

I&apos;m building this now to see how well it works.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56149</commentid>
    <comment_count>8</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-03 16:33:20 +0000</bug_when>
    <thetext>Erm, make that https://github.com/01org/meta-security-isafw for the layer.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56150</commentid>
    <comment_count>9</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-11-03 16:46:22 +0000</bug_when>
    <thetext>(In reply to comment #8)
&gt; Erm, make that https://github.com/01org/meta-security-isafw for the layer.

I tried to use the layer but fails when try to INHERIT, 

Traceback (most recent call last):
  File &quot;/home/alimon/repos/poky/bitbake/lib/bb/parse/parse_py/ConfHandler.py&quot;, line 100, in include(parentfn=&apos;configuration INHERITs&apos;, fn=&apos;classes/isafw.bbclass&apos;, lineno=0, data=&lt;bb.data_smart.DataSmart object at 0x7f0f426eb950&gt;, error_out=&apos;inherit&apos;):
                 if error_out:
    &gt;                raise ParseError(&quot;Could not %s file %s&quot; % (error_out, fn), parentfn, lineno)
                 logger.debug(2, &quot;CONF file &apos;%s&apos; not found&quot;, fn)
ParseError: ParseError in configuration INHERITs: Could not inherit file classes/isafw.bbclass</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56153</commentid>
    <comment_count>10</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-03 17:59:23 +0000</bug_when>
    <thetext>Anibal, did you add the layer to bblayers.conf?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56154</commentid>
    <comment_count>11</comment_count>
    <who name="Aníbal Limón">anibal.limon</who>
    <bug_when>2015-11-03 18:08:41 +0000</bug_when>
    <thetext>(In reply to comment #10)
&gt; Anibal, did you add the layer to bblayers.conf?

Yes, without it in bblayers.conf don&apos;t fail.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56156</commentid>
    <comment_count>12</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2015-11-03 18:29:42 +0000</bug_when>
    <thetext>As an experiment into using cve-check-tool without the isafw surrounding it I wrote a ten-line python class and added it to meta-ross (github:rossburton/meta-ross).  With current jethro against core-image-sato I get this:

WARNING: iptables: Unpatched CVEs: CVE-2012-2663
WARNING: readline: Unpatched CVEs: CVE-2014-2524
WARNING: expat: Unpatched CVEs: CVE-2013-0340
WARNING: subversion: Unpatched CVEs: CVE-2015-3184 CVE-2015-3187
WARNING: vte: Unpatched CVEs: CVE-2012-2738
WARNING: iptables: Unpatched CVEs: CVE-2012-2663
WARNING: unzip: Unpatched CVEs: CVE-2014-9636
WARNING: expat: Unpatched CVEs: CVE-2013-0340
WARNING: expat: Unpatched CVEs: CVE-2013-0340
WARNING: readline: Unpatched CVEs: CVE-2014-2524
WARNING: qemu: Unpatched CVEs: CVE-2015-5279
WARNING: readline: Unpatched CVEs: CVE-2014-2524

Doubtless there&apos;s recipes missed due to PN mismatch (I&apos;m thinking gcc) and false-positives from bad patch names (libarchive is fixed in my local branch, should be reporting there) but this is an interesting start.  I don&apos;t see any problems with using something like this on release branches, as long as CVE patches have the CVE ID in the filename.

I guess an important question is do we a) endorse meta-security-isafw or b) split out the bits we like into something more focused in oe-core.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>56158</commentid>
    <comment_count>13</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2015-11-03 20:07:52 +0000</bug_when>
    <thetext>(In reply to comment #12)
&gt; As an experiment into using cve-check-tool without the isafw surrounding it
&gt; I wrote a ten-line python class and added it to meta-ross
&gt; (github:rossburton/meta-ross).  With current jethro against core-image-sato
&gt; I get this:
&gt; 
&gt; WARNING: iptables: Unpatched CVEs: CVE-2012-2663
&gt; WARNING: readline: Unpatched CVEs: CVE-2014-2524
&gt; WARNING: expat: Unpatched CVEs: CVE-2013-0340
&gt; WARNING: subversion: Unpatched CVEs: CVE-2015-3184 CVE-2015-3187
&gt; WARNING: vte: Unpatched CVEs: CVE-2012-2738
&gt; WARNING: iptables: Unpatched CVEs: CVE-2012-2663
&gt; WARNING: unzip: Unpatched CVEs: CVE-2014-9636
&gt; WARNING: expat: Unpatched CVEs: CVE-2013-0340
&gt; WARNING: expat: Unpatched CVEs: CVE-2013-0340
&gt; WARNING: readline: Unpatched CVEs: CVE-2014-2524
&gt; WARNING: qemu: Unpatched CVEs: CVE-2015-5279
&gt; WARNING: readline: Unpatched CVEs: CVE-2014-2524

Does it queue the kernel?

its missing the libxml2 and libxslt.

(patches in queue for libxslt)

&gt; 
&gt; Doubtless there&apos;s recipes missed due to PN mismatch (I&apos;m thinking gcc) and
&gt; false-positives from bad patch names (libarchive is fixed in my local
&gt; branch, should be reporting there) but this is an interesting start.  I
&gt; don&apos;t see any problems with using something like this on release branches,

Ask Fray.. he had concerns.

&gt; as long as CVE patches have the CVE ID in the filename.

kernel wont.

&gt; 
&gt; I guess an important question is do we a) endorse meta-security-isafw or b)
&gt; split out the bits we like into something more focused in oe-core.

why would we want another security layer? there are 4 currently</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57164</commentid>
    <comment_count>14</comment_count>
    <who name="Mihail Stanciu">stanciux.mihail</who>
    <bug_when>2015-12-10 13:51:57 +0000</bug_when>
    <thetext>(In reply to comment #3)
&gt; Lucian,
&gt; Maybe we can dry run this before it&apos;s implemented by Ross.

I&apos;ve added a buildstep on our local AB that runs the cve-check-tool against a nightly-world build and sends and email with the results.
For now it sends the e-mail just to me until I&apos;m sure everything is working properly.</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57280</commentid>
    <comment_count>15</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-12-15 16:08:02 +0000</bug_when>
    <thetext>I started a RFC thread in OE-core, OE-devel, so we get more input. Feel free to comment.

http://lists.openembedded.org/pipermail/openembedded-core/2015-December/114166.html

http://lists.openembedded.org/pipermail/openembedded-core/2015-December/114166.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57488</commentid>
    <comment_count>16</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2015-12-29 20:24:02 +0000</bug_when>
    <thetext>Will wait after the holidays to reach a conclusion</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>57502</commentid>
    <comment_count>17</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-01-04 11:28:33 +0000</bug_when>
    <thetext>WaitForUpstream is only valid if there&apos;s an upstream and generally means a bug disappears forever.  Changing back to accepted now the holiday is over. :)</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59291</commentid>
    <comment_count>18</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-02-19 22:38:43 +0000</bug_when>
    <thetext>I have started to implement this class using cve-check-tool base on Ross&apos; class</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59301</commentid>
    <comment_count>19</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2016-02-19 23:17:47 +0000</bug_when>
    <thetext>(In reply to comment #18)
&gt; I have started to implement this class using cve-check-tool base on Ross&apos;
&gt; class

Please answer my questions in commit #5.

in addition. where will this class reside?</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59471</commentid>
    <comment_count>20</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-02-25 17:20:42 +0000</bug_when>
    <thetext>The idea is just to provide the tool, what people do with is up to them.

I don&apos;t think we are going to expose the vulnerabilities more than they already exposed. For example, you can download the layer that Ross mentioned and get what CVEs haven&apos;t been patched.

The idea is to include the tool into oe-core</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59482</commentid>
    <comment_count>21</comment_count>
    <who name="Armin Kuster">akuster</who>
    <bug_when>2016-02-25 21:51:30 +0000</bug_when>
    <thetext>(In reply to comment #20)
&gt; The idea is just to provide the tool, what people do with is up to them.
&gt; 
&gt; I don&apos;t think we are going to expose the vulnerabilities more than they
&gt; already exposed. For example, you can download the layer that Ross mentioned
&gt; and get what CVEs haven&apos;t been patched.
&gt; 
&gt; The idea is to include the tool into oe-core

thanks for the reply</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59527</commentid>
    <comment_count>22</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-02-29 14:43:45 +0000</bug_when>
    <thetext>Sent patches to the list:

http://lists.openembedded.org/pipermail/openembedded-core/2016-February/118117.html</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>59813</commentid>
    <comment_count>23</comment_count>
    <who name="Mariano Lopez">mariano.lopez</who>
    <bug_when>2016-03-08 22:30:19 +0000</bug_when>
    <thetext>Moving to 2.2, this enhancement didn&apos;t make it to 2.1</thetext>
  </long_desc><long_desc isprivate="0" >
    <commentid>66308</commentid>
    <comment_count>24</comment_count>
    <who name="Ross Burton">ross.burton</who>
    <bug_when>2016-09-19 12:41:37 +0000</bug_when>
    <thetext>Merged in oe-core d98338075ec3a66acb8828e74711550d53b4d91b.</thetext>
  </long_desc>
      
      

    </bug>

</bugzilla>