<div dir="ltr">On 7 June 2017 at 11:51, Fan Xin &lt;<a href="mailto:fan.xin@jp.fujitsu.com">fan.xin@jp.fujitsu.com</a>&gt; wrote:<br>&gt;<br>&gt; CVE: CVE-2017-8872<br>&gt; The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers<br>&gt; to cause a denial of service (buffer over-read) or information disclosure.<br>&gt;<br>&gt; External References:<br>&gt; <a href="https://bugzilla.gnome.org/show_bug.cgi?id=77520">https://bugzilla.gnome.org/show_bug.cgi?id=77520</a><br><br><br>This should be  <br><a href="https://bugzilla.gnome.org/show_bug.cgi?id=775200">https://bugzilla.gnome.org/show_bug.cgi?id=775200</a><br><br>I have the same question that was asked in the upstream bug comment 6 about two weeks ago: The patch doesn&#39;t seem to have any effect (because the goto will happen anyway since &#39;avail&#39; is 0), am I missing something?<div><br></div><div>Jussi<br> <br> <br>&gt;<br>&gt;<br>&gt; Signed-off-by: Fan Xin &lt;<a href="mailto:fan.xin@jp.fujitsu.com">fan.xin@jp.fujitsu.com</a>&gt;<br>&gt; ---<br>&gt;  .../libxml/libxml2/libxml2-CVE-2017-8872.patch     | 23 ++++++++++++++++++++++<br>&gt;  meta/recipes-core/libxml/<a href="http://libxml2_2.9.4.bb">libxml2_2.9.4.bb</a>          |  1 +<br>&gt;  2 files changed, 24 insertions(+)<br>&gt;  create mode 100644 meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch<br>&gt;<br>&gt; diff --git a/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch<br>&gt; new file mode 100644<br>&gt; index 0000000..df05e06<br>&gt; --- /dev/null<br>&gt; +++ b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2017-8872.patch<br>&gt; @@ -0,0 +1,23 @@<br>&gt; +libxml2-2.9.4: Fix CVE-2017-8872<br>&gt; +<br>&gt; +Bug 775200 - (CVE-2017-8872) global-buffer-overflow in htmlParseTryOrFinish (HTMLparser.c:5403)<br>&gt; + - [<a href="https://bugzilla.gnome.org/show_bug.cgi?id=775200">https://bugzilla.gnome.org/show_bug.cgi?id=775200</a>]<br>&gt; +<br>&gt; +CVE: CVE-2017-8872<br>&gt; +Upstream-Status: Submitted<br>&gt; +<br>&gt; +Signed-off-by: Fan Xin &lt;<a href="mailto:fan.xin@jp.fujitsu.com">fan.xin@jp.fujitsu.com</a>&gt;<br>&gt; +<br>&gt; +Index: libxml2-2.9.4/HTMLparser.c<br>&gt; +===================================================================<br>&gt; +--- libxml2-2.9.4.orig/HTMLparser.c<br>&gt; ++++ libxml2-2.9.4/HTMLparser.c<br>&gt; +@@ -5396,6 +5396,8 @@ htmlParseTryOrFinish(htmlParserCtxtPtr c<br>&gt; +               ctxt-&gt;instate = XML_PARSER_EOF;<br>&gt; +               if ((ctxt-&gt;sax) &amp;&amp; (ctxt-&gt;sax-&gt;endDocument != NULL))<br>&gt; +                   ctxt-&gt;sax-&gt;endDocument(ctxt-&gt;userData);<br>&gt; ++<br>&gt; ++              goto done;<br>&gt; +           }<br>&gt; +       }<br>&gt; +         if (avail &lt; 1)<br>&gt; diff --git a/meta/recipes-core/libxml/<a href="http://libxml2_2.9.4.bb">libxml2_2.9.4.bb</a> b/meta/recipes-core/libxml/<a href="http://libxml2_2.9.4.bb">libxml2_2.9.4.bb</a><br>&gt; index ea0d3b8..0b4cbca 100644<br>&gt; --- a/meta/recipes-core/libxml/<a href="http://libxml2_2.9.4.bb">libxml2_2.9.4.bb</a><br>&gt; +++ b/meta/recipes-core/libxml/<a href="http://libxml2_2.9.4.bb">libxml2_2.9.4.bb</a><br>&gt; @@ -24,6 +24,7 @@ SRC_URI = &quot;<a href="ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar">ftp://xmlsoft.org/libxml2/libxml2-${PV}.tar.gz;name=libtar</a> \<br>&gt;             file://libxml2-CVE-2016-4658.patch \<br>&gt;             file://libxml2-fix_NULL_pointer_derefs.patch \<br>&gt;             file://CVE-2016-9318.patch \<br>&gt; +          file://libxml2-CVE-2017-8872.patch \<br>&gt;            &quot;<br>&gt;<br>&gt;  SRC_URI[libtar.md5sum] = &quot;ae249165c173b1ff386ee8ad676815f5&quot;<br>&gt; --<br>&gt; 1.9.1<br>&gt;<br>&gt; --<br>&gt; _______________________________________________<br>&gt; Openembedded-core mailing list<br>&gt; <a href="mailto:Openembedded-core@lists.openembedded.org">Openembedded-core@lists.openembedded.org</a><br>&gt; <a href="http://lists.openembedded.org/mailman/listinfo/openembedded-core">http://lists.openembedded.org/mailman/listinfo/openembedded-core</a></div></div>