diff options
author | Leo Famulari <leo@famulari.name> | 2018-01-13 09:16:07 -0800 |
---|---|---|
committer | Leo Famulari <leo@famulari.name> | 2018-01-16 10:28:20 -0800 |
commit | 7c3f22e9c3311dcb27e9b8bd31c6fa6eb0a549d8 (patch) | |
tree | 4a8bbc2f44e81b54b30618a8d3c42f5f3731b7e8 /gnu/packages/patches | |
parent | 3b1ada0d715202de644af0e8978b29e9b5e33de7 (diff) | |
download | guix-7c3f22e9c3311dcb27e9b8bd31c6fa6eb0a549d8.tar guix-7c3f22e9c3311dcb27e9b8bd31c6fa6eb0a549d8.tar.gz |
gnu: libxml2: Fix CVE-2017-15412.
* gnu/packages/patches/libxml2-CVE-2017-15412.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/xml.scm (libxml2/fixed)[source]: Use it.
Diffstat (limited to 'gnu/packages/patches')
-rw-r--r-- | gnu/packages/patches/libxml2-CVE-2017-15412.patch | 47 |
1 files changed, 47 insertions, 0 deletions
diff --git a/gnu/packages/patches/libxml2-CVE-2017-15412.patch b/gnu/packages/patches/libxml2-CVE-2017-15412.patch new file mode 100644 index 0000000000..07fe190ed1 --- /dev/null +++ b/gnu/packages/patches/libxml2-CVE-2017-15412.patch @@ -0,0 +1,47 @@ +Fix CVE-2017-15412: + +https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2017-15412 +https://bugs.chromium.org/p/chromium/issues/detail?id=727039 +https://bugzilla.redhat.com/show_bug.cgi?id=1523128 +https://bugzilla.gnome.org/show_bug.cgi?id=783160 + +Patch copied from upstream source repository: + +https://git.gnome.org/browse/libxml2/commit/?id=0f3b843b3534784ef57a4f9b874238aa1fda5a73 + +From 0f3b843b3534784ef57a4f9b874238aa1fda5a73 Mon Sep 17 00:00:00 2001 +From: Nick Wellnhofer <wellnhofer@aevum.de> +Date: Thu, 1 Jun 2017 23:12:19 +0200 +Subject: [PATCH] Fix XPath stack frame logic + +Move the calls to xmlXPathSetFrame and xmlXPathPopFrame around in +xmlXPathCompOpEvalPositionalPredicate to make sure that the context +object on the stack is actually protected. Otherwise, memory corruption +can occur when calling sloppily coded XPath extension functions. + +Fixes bug 783160. +--- + xpath.c | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/xpath.c b/xpath.c +index 94815075..b816bd36 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -11932,11 +11932,11 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, + } + } + +- frame = xmlXPathSetFrame(ctxt); + valuePush(ctxt, contextObj); ++ frame = xmlXPathSetFrame(ctxt); + res = xmlXPathCompOpEvalToBoolean(ctxt, exprOp, 1); +- tmp = valuePop(ctxt); + xmlXPathPopFrame(ctxt, frame); ++ tmp = valuePop(ctxt); + + if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { + while (tmp != contextObj) { +-- +2.15.1 + |