[oe-commits] [openembedded-core] 05/17: libxml2: Security fix for CVE-2016-1834.patch

git at git.openembedded.org git at git.openembedded.org
Wed Jul 27 07:34:10 UTC 2016


rpurdie pushed a commit to branch jethro
in repository openembedded-core.

commit 233f3b29760c878a3acb3aa0e22b7c252f17e2b3
Author: Armin Kuster <akuster at mvista.com>
AuthorDate: Sat Jul 9 14:29:54 2016 -0700

    libxml2: Security fix for CVE-2016-1834.patch
    
    Signed-off-by: Armin Kuster <akuster at mvista.com>
---
 .../libxml/libxml2/CVE-2016-1834.patch             | 55 ++++++++++++++++++++++
 meta/recipes-core/libxml/libxml2_2.9.2.bb          |  1 +
 2 files changed, 56 insertions(+)

diff --git a/meta/recipes-core/libxml/libxml2/CVE-2016-1834.patch b/meta/recipes-core/libxml/libxml2/CVE-2016-1834.patch
new file mode 100644
index 0000000..9fc15f3
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/CVE-2016-1834.patch
@@ -0,0 +1,55 @@
+From 8fbbf5513d609c1770b391b99e33314cd0742704 Mon Sep 17 00:00:00 2001
+From: Pranjal Jumde <pjumde at apple.com>
+Date: Tue, 8 Mar 2016 17:29:00 -0800
+Subject: [PATCH] Bug 763071: heap-buffer-overflow in xmlStrncat
+ <https://bugzilla.gnome.org/show_bug.cgi?id=763071>
+
+* xmlstring.c:
+(xmlStrncat): Return NULL if xmlStrlen returns a negative length.
+(xmlStrncatNew): Ditto.
+
+Upstream-Status: Backport
+CVE: CVE-2016-1834
+Signed-off-by: Armin Kuster <akuster at mvista.com>
+
+---
+ xmlstring.c | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+diff --git a/xmlstring.c b/xmlstring.c
+index b89c9e9..00287d4 100644
+--- a/xmlstring.c
++++ b/xmlstring.c
+@@ -457,6 +457,8 @@ xmlStrncat(xmlChar *cur, const xmlChar *add, int len) {
+         return(xmlStrndup(add, len));
+ 
+     size = xmlStrlen(cur);
++    if (size < 0)
++        return(NULL);
+     ret = (xmlChar *) xmlRealloc(cur, (size + len + 1) * sizeof(xmlChar));
+     if (ret == NULL) {
+         xmlErrMemory(NULL, NULL);
+@@ -484,14 +486,19 @@ xmlStrncatNew(const xmlChar *str1, const xmlChar *str2, int len) {
+     int size;
+     xmlChar *ret;
+ 
+-    if (len < 0)
++    if (len < 0) {
+         len = xmlStrlen(str2);
++        if (len < 0)
++            return(NULL);
++    }
+     if ((str2 == NULL) || (len == 0))
+         return(xmlStrdup(str1));
+     if (str1 == NULL)
+         return(xmlStrndup(str2, len));
+ 
+     size = xmlStrlen(str1);
++    if (size < 0)
++        return(NULL);
+     ret = (xmlChar *) xmlMalloc((size + len + 1) * sizeof(xmlChar));
+     if (ret == NULL) {
+         xmlErrMemory(NULL, NULL);
+-- 
+2.3.5
+
diff --git a/meta/recipes-core/libxml/libxml2_2.9.2.bb b/meta/recipes-core/libxml/libxml2_2.9.2.bb
index ec6000f..e2400af 100644
--- a/meta/recipes-core/libxml/libxml2_2.9.2.bb
+++ b/meta/recipes-core/libxml/libxml2_2.9.2.bb
@@ -6,6 +6,7 @@ SRC_URI += "http://www.w3.org/XML/Test/xmlts20080827.tar.gz;name=testtar \
 	   "
 SRC_URI += "file://CVE-2016-1762.patch \
             file://CVE-2016-3705.patch \
+            file://CVE-2016-1834.patch \
     "
 
 SRC_URI[libtar.md5sum] = "9e6a9aca9d155737868b3dc5fd82f788"

-- 
To stop receiving notification emails like this one, please contact
the administrator of this repository.


More information about the Openembedded-commits mailing list