guix-commits
[Top][All Lists]
Advanced

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

03/05: gnu: vorbis-tools: Patch buffer overflow [fixes CVE-2015-6749].


From: Ludovic Courtès
Subject: 03/05: gnu: vorbis-tools: Patch buffer overflow [fixes CVE-2015-6749].
Date: Fri, 11 Mar 2016 15:34:19 +0000

civodul pushed a commit to branch master
in repository guix.

commit ef0f0d5f971bf9c7a755b6b5c4bda34fc50e1987
Author: Ludovic Courtès <address@hidden>
Date:   Fri Mar 11 15:52:45 2016 +0100

    gnu: vorbis-tools: Patch buffer overflow [fixes CVE-2015-6749].
    
    * gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch: New file.
    * gnu-system.am (dist_patch_DATA): Add it.
    * gnu/packages/xiph.scm (vorbis-tools)[source]: Use it.
---
 gnu-system.am                                      |    1 +
 .../patches/vorbis-tools-CVE-2015-6749.patch       |   44 ++++++++++++++++++++
 gnu/packages/xiph.scm                              |    3 +-
 3 files changed, 47 insertions(+), 1 deletions(-)

diff --git a/gnu-system.am b/gnu-system.am
index 2ca703c..38c1f5a 100644
--- a/gnu-system.am
+++ b/gnu-system.am
@@ -770,6 +770,7 @@ dist_patch_DATA =                                           
\
   gnu/packages/patches/util-linux-tests.patch                  \
   gnu/packages/patches/upower-builddir.patch                   \
   gnu/packages/patches/valgrind-enable-arm.patch               \
+  gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch                \
   gnu/packages/patches/vpnc-script.patch                       \
   gnu/packages/patches/vtk-mesa-10.patch                       \
   gnu/packages/patches/w3m-libgc.patch                         \
diff --git a/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch 
b/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch
new file mode 100644
index 0000000..bcddcbf
--- /dev/null
+++ b/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch
@@ -0,0 +1,44 @@
+Upstream fix for CVE-2015-6749.
+https://trac.xiph.org/ticket/2212
+
+From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001
+From: Mark Harris <address@hidden>
+Date: Sun, 30 Aug 2015 05:54:46 -0700
+Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input
+
+Fixes #2212
+---
+ oggenc/audio.c | 10 +++++-----
+ 1 file changed, 5 insertions(+), 5 deletions(-)
+
+diff --git a/oggenc/audio.c b/oggenc/audio.c
+index 477da8c..4921fb9 100644
+--- a/oggenc/audio.c
++++ b/oggenc/audio.c
+@@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] =
+ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen)
+ {
+     int aifc; /* AIFC or AIFF? */
+-    unsigned int len;
+-    unsigned char *buffer;
++    unsigned int len, readlen;
++    unsigned char buffer[22];
+     unsigned char buf2[8];
+     aiff_fmt format;
+     aifffile *aiff = malloc(sizeof(aifffile));
+@@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char 
*buf, int buflen)
+         return 0; /* Weird common chunk */
+     }
+ 
+-    buffer = alloca(len);
+-
+-    if(fread(buffer,1,len,in) < len)
++    readlen = len < sizeof(buffer) ? len : sizeof(buffer);
++    if(fread(buffer,1,readlen,in) < readlen ||
++       (len > readlen && !seek_forward(in, len-readlen)))
+     {
+         fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF 
header\n"));
+         return 0;
+-- 
+2.5.0
+
diff --git a/gnu/packages/xiph.scm b/gnu/packages/xiph.scm
index a602a34..04dfd70 100644
--- a/gnu/packages/xiph.scm
+++ b/gnu/packages/xiph.scm
@@ -266,7 +266,8 @@ Kate stream.")
                                 "vorbis-tools-" version ".tar.gz"))
             (sha256
              (base32
-              "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))))
+              "1g12bnh5ah08v529y72kfdz5lhvy75iaz7f9jskyby23m9dkk2d3"))
+            (patches (list (search-patch 
"vorbis-tools-CVE-2015-6749.patch")))))
    (build-system gnu-build-system)
    (inputs `(("ao" ,ao)
              ("curl" ,curl)



reply via email to

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