guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/01: gnu: expat: Update to 2.1.1.


From: Mark H. Weaver
Subject: 01/01: gnu: expat: Update to 2.1.1.
Date: Sat, 26 Mar 2016 01:39:55 +0000

mhw pushed a commit to branch core-updates
in repository guix.

commit 51514e69597365f8a5e03811e5d7ce5142602fbb
Author: Mark H Weaver <address@hidden>
Date:   Fri Mar 25 21:38:16 2016 -0400

    gnu: expat: Update to 2.1.1.
    
    * gnu/packages/patches/expat-CVE-2015-1283.patch: Delete file.
    * gnu-system.am (dist_patch_DATA): Remove it.
    * gnu/packages/xml.scm (expat): Update to 2.1.1.
    [source]: Use bz2 tarball.  Remove patch.
---
 gnu-system.am                                  |    1 -
 gnu/packages/patches/expat-CVE-2015-1283.patch |   89 ------------------------
 gnu/packages/xml.scm                           |    9 +--
 3 files changed, 4 insertions(+), 95 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index f13a55d..805464f 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -461,7 +461,6 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/emacs-source-date-epoch.patch           \
   gnu/packages/patches/eudev-rules-directory.patch             \
   gnu/packages/patches/evilwm-lost-focus-bug.patch             \
-  gnu/packages/patches/expat-CVE-2015-1283.patch               \
   gnu/packages/patches/fastcap-mulGlobal.patch                 \
   gnu/packages/patches/fastcap-mulSetup.patch                  \
   gnu/packages/patches/fasthenry-spAllocate.patch              \
diff --git a/gnu/packages/patches/expat-CVE-2015-1283.patch 
b/gnu/packages/patches/expat-CVE-2015-1283.patch
deleted file mode 100644
index f9065be..0000000
--- a/gnu/packages/patches/expat-CVE-2015-1283.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-Copied from Debian.
-
-Description: fix multiple integer overflows in the XML_GetBuffer function
- Multiple integer overflows in the XML_GetBuffer function in Expat through
- 2.1.0, as used in Google Chrome before 44.0.2403.89 and other products,
- allow remote attackers to cause a denial of service (heap-based buffer
- overflow) or possibly have unspecified other impact via crafted XML data,
- a related issue to CVE-2015-2716.
-Origin: Mozilla, https://hg.mozilla.org/releases/mozilla-esr31/rev/2f3e78643f5c
-Author: Eric Rahm <address@hidden>
-Forwarded: not-needed
-Last-Update: 2015-07-24
-
-diff --git a/lib/xmlparse.c b/lib/xmlparse.c
---- a/lib/xmlparse.c
-+++ b/lib/xmlparse.c
-@@ -1673,29 +1673,40 @@ XML_ParseBuffer(XML_Parser parser, int l
-   XmlUpdatePosition(encoding, positionPtr, bufferPtr, &position);
-   positionPtr = bufferPtr;
-   return result;
- }
- 
- void * XMLCALL
- XML_GetBuffer(XML_Parser parser, int len)
- {
-+/* BEGIN MOZILLA CHANGE (sanity check len) */
-+  if (len < 0) {
-+    errorCode = XML_ERROR_NO_MEMORY;
-+    return NULL;
-+  }
-+/* END MOZILLA CHANGE */
-   switch (ps_parsing) {
-   case XML_SUSPENDED:
-     errorCode = XML_ERROR_SUSPENDED;
-     return NULL;
-   case XML_FINISHED:
-     errorCode = XML_ERROR_FINISHED;
-     return NULL;
-   default: ;
-   }
- 
-   if (len > bufferLim - bufferEnd) {
--    /* FIXME avoid integer overflow */
-     int neededSize = len + (int)(bufferEnd - bufferPtr);
-+/* BEGIN MOZILLA CHANGE (sanity check neededSize) */
-+    if (neededSize < 0) {
-+      errorCode = XML_ERROR_NO_MEMORY;
-+      return NULL;
-+    }
-+/* END MOZILLA CHANGE */
- #ifdef XML_CONTEXT_BYTES
-     int keep = (int)(bufferPtr - buffer);
- 
-     if (keep > XML_CONTEXT_BYTES)
-       keep = XML_CONTEXT_BYTES;
-     neededSize += keep;
- #endif  /* defined XML_CONTEXT_BYTES */
-     if (neededSize  <= bufferLim - buffer) {
-@@ -1714,17 +1725,25 @@ XML_GetBuffer(XML_Parser parser, int len
-     }
-     else {
-       char *newBuf;
-       int bufferSize = (int)(bufferLim - bufferPtr);
-       if (bufferSize == 0)
-         bufferSize = INIT_BUFFER_SIZE;
-       do {
-         bufferSize *= 2;
--      } while (bufferSize < neededSize);
-+/* BEGIN MOZILLA CHANGE (prevent infinite loop on overflow) */
-+      } while (bufferSize < neededSize && bufferSize > 0);
-+/* END MOZILLA CHANGE */
-+/* BEGIN MOZILLA CHANGE (sanity check bufferSize) */
-+      if (bufferSize <= 0) {
-+        errorCode = XML_ERROR_NO_MEMORY;
-+        return NULL;
-+      }
-+/* END MOZILLA CHANGE */
-       newBuf = (char *)MALLOC(bufferSize);
-       if (newBuf == 0) {
-         errorCode = XML_ERROR_NO_MEMORY;
-         return NULL;
-       }
-       bufferLim = newBuf + bufferSize;
- #ifdef XML_CONTEXT_BYTES
-       if (bufferPtr) {
-
-
-
-
diff --git a/gnu/packages/xml.scm b/gnu/packages/xml.scm
index 7419c61..f6a3f82 100644
--- a/gnu/packages/xml.scm
+++ b/gnu/packages/xml.scm
@@ -4,7 +4,7 @@
 ;;; Copyright © 2015 Eric Bavier <address@hidden>
 ;;; Copyright © 2015 Sou Bunnbu <address@hidden>
 ;;; Copyright © 2015 Ricardo Wurmus <address@hidden>
-;;; Copyright © 2015 Mark H Weaver <address@hidden>
+;;; Copyright © 2015, 2016 Mark H Weaver <address@hidden>
 ;;; Copyright © 2015 Efraim Flashner <address@hidden>
 ;;; Copyright © 2015 Raimon Grau <address@hidden>
 ;;;
@@ -44,15 +44,14 @@
 (define-public expat
   (package
     (name "expat")
-    (version "2.1.0")
+    (version "2.1.1")
     (source (origin
              (method url-fetch)
              (uri (string-append "mirror://sourceforge/expat/expat/"
-                                 version "/expat-" version ".tar.gz"))
+                                 version "/expat-" version ".tar.bz2"))
              (sha256
               (base32
-               "11pblz61zyxh68s5pdcbhc30ha1b2vfjd83aiwfg4vc15x3hadw2"))
-             (patches (list (search-patch "expat-CVE-2015-1283.patch")))))
+               "0ryyjgvy7jq0qb7a9mhc1giy3bzn56aiwrs8dpydqngplbjq9xdg"))))
     (build-system gnu-build-system)
     (home-page "http://www.libexpat.org/";)
     (synopsis "Stream-oriented XML parser library written in C")



reply via email to

[Prev in Thread] Current Thread [Next in Thread]