aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/libxml
diff options
context:
space:
mode:
authorHongxu Jia <hongxu.jia@windriver.com>2018-07-04 09:39:14 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-07-05 00:24:14 +0100
commitdac867dc63af70ae992c50697d2be95c3e7b58bb (patch)
treeea126143747241b79f86acc4621f408d304e1148 /meta/recipes-core/libxml
parente2e0c91c2c8229d9ed0958de98b5a9b14c6805d1 (diff)
downloadopenembedded-core-contrib-dac867dc63af70ae992c50697d2be95c3e7b58bb.tar.gz
openembedded-core-contrib-dac867dc63af70ae992c50697d2be95c3e7b58bb.tar.bz2
openembedded-core-contrib-dac867dc63af70ae992c50697d2be95c3e7b58bb.zip
libxml2: fix CVE-2017-8872
The htmlParseTryOrFinish function in HTMLparser.c in libxml2 2.9.4 allows attackers to cause a denial of service (buffer over-read) or information disclosure. https://bugzilla.gnome.org/show_bug.cgi?id=775200 Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com>
Diffstat (limited to 'meta/recipes-core/libxml')
-rw-r--r--meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch38
-rw-r--r--meta/recipes-core/libxml/libxml2_2.9.8.bb1
2 files changed, 39 insertions, 0 deletions
diff --git a/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch b/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
new file mode 100644
index 0000000000..b34479f318
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/fix-CVE-2017-8872.patch
@@ -0,0 +1,38 @@
+From b4bee17b158e289e5c4c9045e64e5374ccafe068 Mon Sep 17 00:00:00 2001
+From: Salvatore Bonaccorso <carnil@debian.org>
+Date: Tue, 3 Jul 2018 15:54:03 +0800
+Subject: [PATCH] Out-of-bounds read in htmlParseTryOrFinish (CVE-2017-8872)
+
+https://bugzilla.gnome.org/show_bug.cgi?id=775200
+Fixes bug 775200.
+
+Signed-off-by: Salvatore Bonaccorso <carnil@debian.org>
+
+Upstream-Status: Submitted
+https://bug775200.bugzilla-attachments.gnome.org/attachment.cgi?id=366193
+CVE: CVE-2017-8872
+Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
+---
+ parser.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+diff --git a/parser.c b/parser.c
+index ca9fde2..fb4c889 100644
+--- a/parser.c
++++ b/parser.c
+@@ -12464,7 +12464,11 @@ xmlHaltParser(xmlParserCtxtPtr ctxt) {
+ }
+ ctxt->input->cur = BAD_CAST"";
+ ctxt->input->base = ctxt->input->cur;
+- ctxt->input->end = ctxt->input->cur;
++ ctxt->input->end = ctxt->input->cur;
++ if (ctxt->input->buf)
++ xmlBufEmpty (ctxt->input->buf->buffer);
++ else
++ ctxt->input->length = 0;
+ }
+ }
+
+--
+2.7.4
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.8.bb b/meta/recipes-core/libxml/libxml2_2.9.8.bb
index d55e650911..1f22bb0b07 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.8.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.8.bb
@@ -20,6 +20,7 @@ SRC_URI = "http://www.xmlsoft.org/sources/libxml2-${PV}.tar.gz;name=libtar \
file://libxml-m4-use-pkgconfig.patch \
file://0001-Make-ptest-run-the-python-tests-if-python-is-enabled.patch \
file://fix-execution-of-ptests.patch \
+ file://fix-CVE-2017-8872.patch \
"
SRC_URI[libtar.md5sum] = "b786e353e2aa1b872d70d5d1ca0c740d"