2 Patch status: will be part of next version
4 https://git.gnome.org/browse/libxslt/commit/?id=7ca19df892ca22d9314e95d59ce2abdeff46b617
6 From 7ca19df892ca22d9314e95d59ce2abdeff46b617 Mon Sep 17 00:00:00 2001
7 From: Daniel Veillard <veillard@redhat.com>
8 Date: Thu, 29 Oct 2015 19:33:23 +0800
9 Subject: Fix for type confusion in preprocessing attributes
11 CVE-2015-7995 http://www.openwall.com/lists/oss-security/2015/10/27/10
12 We need to check that the parent node is an element before dereferencing
15 libxslt/preproc.c | 3 ++-
16 1 file changed, 2 insertions(+), 1 deletion(-)
18 diff --git a/libxslt/preproc.c b/libxslt/preproc.c
19 index 0eb80a0..7f69325 100644
20 --- a/libxslt/preproc.c
21 +++ b/libxslt/preproc.c
22 @@ -2249,7 +2249,8 @@ xsltStylePreCompute(xsltStylesheetPtr style, xmlNodePtr inst) {
23 } else if (IS_XSLT_NAME(inst, "attribute")) {
24 xmlNodePtr parent = inst->parent;
26 - if ((parent == NULL) || (parent->ns == NULL) ||
27 + if ((parent == NULL) ||
28 + (parent->type != XML_ELEMENT_NODE) || (parent->ns == NULL) ||
29 ((parent->ns != inst->ns) &&
30 (!xmlStrEqual(parent->ns->href, inst->ns->href))) ||
31 (!xmlStrEqual(parent->name, BAD_CAST "attribute-set"))) {