Date: Wednesday, January 13, 2016 @ 12:53:46 Author: jgc Revision: 258159
upgpkg: libxslt 1.1.28-4 Fix CVE 2015-7995 (FS#47681) Added: libxslt/trunk/CVE-2015-7995.patch Modified: libxslt/trunk/PKGBUILD ---------------------+ CVE-2015-7995.patch | 29 +++++++++++++++++++++++++++++ PKGBUILD | 16 +++++++++++++--- 2 files changed, 42 insertions(+), 3 deletions(-) Added: CVE-2015-7995.patch =================================================================== --- CVE-2015-7995.patch (rev 0) +++ CVE-2015-7995.patch 2016-01-13 11:53:46 UTC (rev 258159) @@ -0,0 +1,29 @@ +From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001 +From: Daniel Veillard <[email protected]> +Date: Thu, 29 Oct 2015 19:33:23 +0800 +Subject: Fix for type confusion in preprocessing attributes + +CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10 +We need to check that the parent node is an element before dereferencing +its namespace +--- + libxslt/preproc.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/libxslt/preproc.c b/libxslt/preproc.c +index 0eb80a0..7f69325 100644 +--- a/libxslt/preproc.c ++++ b/libxslt/preproc.c +@@ -2249,7 +2249,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) { + } else if (IS_XSLT_NAME(inst, "attribute")) { + xmlNodePtr parent = inst->parent; + +- if ((parent == NULL) || (parent->ns == NULL) || ++ if ((parent == NULL) || ++ (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) || + ((parent->ns != inst->ns) && + (!xmlStrEqual(parent->ns->href, inst->ns->href))) || + (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) { +-- +cgit v0.11.2 + Modified: PKGBUILD =================================================================== --- PKGBUILD 2016-01-13 09:17:13 UTC (rev 258158) +++ PKGBUILD 2016-01-13 11:53:46 UTC (rev 258159) @@ -4,7 +4,7 @@ pkgname=libxslt pkgver=1.1.28 -pkgrel=3 +pkgrel=4 pkgdesc="XML stylesheet transformation library" arch=('i686' 'x86_64') url="http://xmlsoft.org/XSLT/" @@ -12,13 +12,23 @@ depends=('libxml2' 'libgcrypt') makedepends=('python2') checkdepends=('docbook-xml') -source=(http://xmlsoft.org/sources/${pkgname}-${pkgver}.tar.gz) -md5sums=('9667bf6f9310b957254fdcf6596600b7') +source=(http://xmlsoft.org/sources/${pkgname}-${pkgver}.tar.gz + CVE-2015-7995.patch) +md5sums=('9667bf6f9310b957254fdcf6596600b7' + 'b97b695cbe4171f8cb10df41f652aba5') +prepare() { + cd $pkgname-$pkgver + patch -Np1 -i ../CVE-2015-7995.patch +} + build() { cd "${srcdir}/${pkgname}-${pkgver}" sed -e 's|/usr/bin/python -u|/usr/bin/python2 -u|g' -e 's|/usr/bin/python$|/usr/bin/python2|g' -i python/tests/*.py ./configure --prefix=/usr --with-python=/usr/bin/python2 + + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0 /g' -e 's/ if test "$export_dynamic" = yes && test -n "$export_dynamic_flag_spec"; then/ func_append compile_command " -Wl,-O1,--as-needed"\n func_append finalize_command " -Wl,-O1,--as-needed"\n\0/' libtool + make }
