libxslt: add multiple security patches
PATCH 1/2 libxslt: add multiple security patches
Add security patches for CVE-2011-1202 and CVE-2011-3970.
---
...figure.patch => libxslt-1.1.26-configure.patch} | 0
package/libxslt/libxslt-1.1.26-id-generation.patch | 56 ++++++++++++++++++++
...libxslt-1.1.26-pattern-out-of-bounds-read.patch | 27 +++++++++
3 files changed, 83 insertions(+), 0 deletions(-)
rename package/libxslt/{libxslt-configure.patch => libxslt-1.1.26-configure.patch} (100%)
create mode 100644 package/libxslt/libxslt-1.1.26-id-generation.patch
create mode 100644 package/libxslt/libxslt-1.1.26-pattern-out-of-bounds-read.patchpackage/libxslt/libxslt-1.1.26-configure.patch renamed from package/libxslt/libxslt-configure.patch +0 -0
package/libxslt/libxslt-1.1.26-id-generation.patch new file +56 -0
56 lines not on this page · raw message
package/libxslt/libxslt-1.1.26-pattern-out-of-bounds-read.patch new file +27 -0
@@ -0,0 +1,27 @@ +From fe5a4fa33eb85bce3253ed3742b1ea6c4b59b41b Mon Sep 17 00:00:00 2001 +From: Abhishek Arya <[email protected]> +Date: Sun, 22 Jan 2012 17:47:50 +0800 +Subject: [PATCH] Fix some case of pattern parsing errors + +We could accidentally hit an off by one string array access +due to improper loop exit when parsing patterns +--- + libxslt/pattern.c | 2 ++ + 1 files changed, 2 insertions(+), 0 deletions(-) + +diff --git a/libxslt/pattern.c b/libxslt/pattern.c +index 6161376..1155b54 100644 +--- a/libxslt/pattern.c ++++ b/libxslt/pattern.c +@@ -1867,6 +1867,8 @@ xsltCompilePatternInternal(const xmlChar *pattern, xmlDocPtr doc, + while ((pattern[end] != 0) && (pattern[end] != '"')) + end++; + } ++ if (pattern[end] == 0) ++ break; + end++; + } + if (current == end) { +-- +1.7.8.4 +
Signature · 1 line
1.7.3.4
PATCH 2/2 libxml2: add multiple security patches
Fixes for CVE-2011-1944, CVE-2011-2821, CVE-2011-2834, CVE-2011-3919, CVE-2012-0841 and others from upstream.
--- ...2-2.7.8-allocation-error-copying-entities.patch | 21 ++ package/libxml2/libxml2-2.7.8-error-xpath.patch | 62 ++++ .../libxml2/libxml2-2.7.8-hardening-xpath.patch | 224 +++++++++++++++ .../libxml2/libxml2-2.7.8-hash-randomization.patch | 297 ++++++++++++++++++++ .../libxml2-2.7.8-reallocation-failures.patch | 101 +++++++ package/libxml2/libxml2-2.7.8-xpath-freeing.patch | 32 ++ package/libxml2/libxml2-2.7.8-xpath-freeing2.patch | 28 ++ package/libxml2/libxml2-2.7.8-xpath-memory.patch | 29 ++ package/libxml2/libxml2.mk | 1 + 9 files changed, 795 insertions(+), 0 deletions(-) create mode 100644 package/libxml2/libxml2-2.7.8-allocation-error-copying-entities.patch create mode 100644 package/libxml2/libxml2-2.7.8-error-xpath.patch create mode 100644 package/libxml2/libxml2-2.7.8-hardening-xpath.patch create mode 100644 package/libxml2/libxml2-2.7.8-hash-randomization.patch create mode 100644 package/libxml2/libxml2-2.7.8-reallocation-failures.patch create mode 100644 package/libxml2/libxml2-2.7.8-xpath-freeing.patch create mode 100644 package/libxml2/libxml2-2.7.8-xpath-freeing2.patch create mode 100644 package/libxml2/libxml2-2.7.8-xpath-memory.patch
package/libxml2/libxml2-2.7.8-allocation-error-copying-entities.patch new file +21 -0
@@ -0,0 +1,21 @@ +From 5bd3c061823a8499b27422aee04ea20aae24f03e Mon Sep 17 00:00:00 2001 +From: Daniel Veillard <[email protected]> +Date: Fri, 16 Dec 2011 10:53:35 +0000 +Subject: Fix an allocation error when copying entities + +--- +diff --git a/parser.c b/parser.c +index 4e5dcb9..c55e41d 100644 +--- a/parser.c ++++ b/parser.c +@@ -2709,7 +2709,7 @@ xmlStringLenDecodeEntities(xmlParserCtxtPtr ctxt, const xmlChar *str, int len, + + buffer[nbchars++] = '&'; + if (nbchars > buffer_size - i - XML_PARSER_BUFFER_SIZE) { +- growBuffer(buffer, XML_PARSER_BUFFER_SIZE); ++ growBuffer(buffer, i + XML_PARSER_BUFFER_SIZE); + } + for (;i > 0;i--) + buffer[nbchars++] = *cur++; +-- +cgit v0.9.0.2
package/libxml2/libxml2-2.7.8-error-xpath.patch new file +62 -0
62 lines not on this page · raw message
package/libxml2/libxml2-2.7.8-hardening-xpath.patch new file +224 -0
224 lines not on this page · raw message
package/libxml2/libxml2-2.7.8-hash-randomization.patch new file +297 -0
297 lines not on this page · raw message
package/libxml2/libxml2-2.7.8-reallocation-failures.patch new file +101 -0
101 lines not on this page · raw message
package/libxml2/libxml2-2.7.8-xpath-freeing.patch new file +32 -0
@@ -0,0 +1,32 @@ +From df83c17e5a2646bd923f75e5e507bc80d73c9722 Mon Sep 17 00:00:00 2001 +From: Daniel Veillard <[email protected]> +Date: Wed, 17 Nov 2010 13:12:14 +0000 +Subject: Fix a potential freeing error in XPath + +--- +diff --git a/xpath.c b/xpath.c +index 81e33f6..1447be5 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -11763,11 +11763,15 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, + + if ((ctxt->error != XPATH_EXPRESSION_OK) || (res == -1)) { + xmlXPathObjectPtr tmp; +- /* pop the result */ ++ /* pop the result if any */ + tmp = valuePop(ctxt); +- xmlXPathReleaseObject(xpctxt, tmp); +- /* then pop off contextObj, which will be freed later */ +- valuePop(ctxt); ++ if (tmp != contextObj) ++ /* ++ * Free up the result ++ * then pop off contextObj, which will be freed later ++ */ ++ xmlXPathReleaseObject(xpctxt, tmp); ++ valuePop(ctxt); + goto evaluation_error; + } + +-- +cgit v0.8.3.1
package/libxml2/libxml2-2.7.8-xpath-freeing2.patch new file +28 -0
@@ -0,0 +1,28 @@ +From fec31bcd452e77c10579467ca87a785b41115de6 Mon Sep 17 00:00:00 2001 +From: Daniel Veillard <[email protected]> +Date: Thu, 18 Nov 2010 10:07:24 +0000 +Subject: Small fix for previous commit + +--- +diff --git a/xpath.c b/xpath.c +index 1447be5..8b56189 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -11765,13 +11765,14 @@ xmlXPathCompOpEvalPositionalPredicate(xmlXPathParserContextPtr ctxt, + xmlXPathObjectPtr tmp; + /* pop the result if any */ + tmp = valuePop(ctxt); +- if (tmp != contextObj) ++ if (tmp != contextObj) { + /* + * Free up the result + * then pop off contextObj, which will be freed later + */ + xmlXPathReleaseObject(xpctxt, tmp); + valuePop(ctxt); ++ } + goto evaluation_error; + } + +-- +cgit v0.8.3.1
package/libxml2/libxml2-2.7.8-xpath-memory.patch new file +29 -0
@@ -0,0 +1,29 @@ +From 0cbeb50ee03ce582a0c979c70d8fbf030e270c37 Mon Sep 17 00:00:00 2001 +From: Daniel Veillard <[email protected]> +Date: Mon, 15 Nov 2010 11:06:29 +0000 +Subject: Fix a potential memory access error + +in case of a previus allocation error +--- +diff --git a/xpath.c b/xpath.c +index 4d6826d..81e33f6 100644 +--- a/xpath.c ++++ b/xpath.c +@@ -3575,13 +3575,13 @@ xmlXPathNodeSetAdd(xmlNodeSetPtr cur, xmlNodePtr val) { + } else if (cur->nodeNr == cur->nodeMax) { + xmlNodePtr *temp; + +- cur->nodeMax *= 2; +- temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * ++ temp = (xmlNodePtr *) xmlRealloc(cur->nodeTab, cur->nodeMax * 2 * + sizeof(xmlNodePtr)); + if (temp == NULL) { + xmlXPathErrMemory(NULL, "growing nodeset\n"); + return; + } ++ cur->nodeMax *= 2; + cur->nodeTab = temp; + } + if (val->type == XML_NAMESPACE_DECL) { +-- +cgit v0.8.3.1
package/libxml2/libxml2.mk +1 -0
@@ -7,6 +7,7 @@ LIBXML2_VERSION = 2.7.8 LIBXML2_SITE = ftp://xmlsoft.org/libxml2 LIBXML2_INSTALL_STAGING = YES +LIBXML2_AUTORECONF = YES ifneq ($(BR2_LARGEFILE),y) LIBXML2_CONF_ENV = CC="$(TARGET_CC) $(TARGET_CFLAGS) -DNO_LARGEFILE_SOURCE"
Signature · 1 line
1.7.3.4
PATCH 2/2 libxml2: add multiple security patches
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" == Gustavo Zacarias <[email protected]> writes:
Gustavo> Fixes for CVE-2011-1944, CVE-2011-2821, CVE-2011-2834, CVE-2011-3919, Gustavo> CVE-2012-0841 and others from upstream.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard
PATCH 1/2 libxslt: add multiple security patches
In reply to Gustavo ZacariasQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Gustavo" == Gustavo Zacarias <[email protected]> writes:
Gustavo> Add security patches for CVE-2011-1202 and CVE-2011-3970.
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard