summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/libxslt/files/CVE-2019-18197.patch
diff options
context:
space:
mode:
authorJoe Slater <joe.slater@windriver.com>2019-10-22 18:59:51 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-10-31 16:09:35 +0000
commit3a1ad58f74a9c6ad5bccc5832de9dd3e03be2d36 (patch)
tree1bc92ab9eda0d239c4aea5d7f3108cb08dc2d120 /meta/recipes-support/libxslt/files/CVE-2019-18197.patch
parent6df6e5d3baf26184c138c2341e1e5c8b19f16b95 (diff)
downloadpoky-3a1ad58f74a9c6ad5bccc5832de9dd3e03be2d36.tar.gz
libxslt: fix CVE-2019-18197
Use patch from upstream after 1.1.33 release. (From OE-Core rev: 1263db2759b88e423bb717cc0cfc256c7962871b) Signed-off-by: Joe Slater <joe.slater@windriver.com> Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/libxslt/files/CVE-2019-18197.patch')
-rw-r--r--meta/recipes-support/libxslt/files/CVE-2019-18197.patch33
1 files changed, 33 insertions, 0 deletions
diff --git a/meta/recipes-support/libxslt/files/CVE-2019-18197.patch b/meta/recipes-support/libxslt/files/CVE-2019-18197.patch
new file mode 100644
index 0000000000..5f2b620396
--- /dev/null
+++ b/meta/recipes-support/libxslt/files/CVE-2019-18197.patch
@@ -0,0 +1,33 @@
1libxslt: fix CVE-2019-18197
2
3Added after 1.1.33 release.
4
5CVE: CVE-2019-18197
6Upstream-Status: Backport [https://gitlab.gnome.org/GNOME/libxslt.git]
7Signed-off-by: Joe Slater <joe.slater@windriver.com>
8
9commit 2232473733b7313d67de8836ea3b29eec6e8e285
10Author: Nick Wellnhofer <wellnhofer@aevum.de>
11Date: Sat Aug 17 16:51:53 2019 +0200
12
13 Fix dangling pointer in xsltCopyText
14
15 xsltCopyText didn't reset ctxt->lasttext in some cases which could
16 lead to various memory errors in relation with CDATA sections in input
17 documents.
18
19 Found by OSS-Fuzz.
20
21diff --git a/libxslt/transform.c b/libxslt/transform.c
22index 95ebd07..d7ab0b6 100644
23--- a/libxslt/transform.c
24+++ b/libxslt/transform.c
25@@ -1094,6 +1094,8 @@ xsltCopyText(xsltTransformContextPtr ctxt, xmlNodePtr target,
26 if ((copy->content = xmlStrdup(cur->content)) == NULL)
27 return NULL;
28 }
29+
30+ ctxt->lasttext = NULL;
31 } else {
32 /*
33 * normal processing. keep counters to extend the text node