aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/vorbis-tools-CVE-2015-6749.patch
blob: bcddcbfd7078a6b95b824e3c7abd3d7c5248c616 (about) (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
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 <mark.hsj@gmail.com>
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

itle='2015-10-10 22:55:15 +0200'>2015-10-10services: Introduce extensible services....Ludovic Courtès 2015-08-30build: Produce 'guix-config' instead of using compile-time tricks....Mathieu Lirzin 2015-08-27Add 'guix graph'....Ludovic Courtès 2015-07-15Add 'guix-daemon.service' file for systemd....Ludovic Courtès 2015-07-07Prevent Git from silently ignoring new files....Mathieu Lirzin 2015-06-02Ignore man page build artifacts.David Thompson 2015-05-25Augment '.gitignore'.Ludovic Courtès 2015-05-09doc: Show both the "bare-bones" and the "desktop" configurations....Ludovic Courtès 2015-03-25Rename 'guix substitute-binary' to 'guix substitute'....Ludovic Courtès 2015-01-07gnu: Add bootstrap binaries for 'armhf-linux'....Mark H Weaver 2014-12-02emacs: Move profiles code to "guix-profiles.el.in"....Alex Kost 2014-09-03Add Emacs user interface....Alex Kost 2014-06-13Separate package description translations from string translations....Ludovic Courtès 2014-06-13Move gettext files to 'po/guix'....Ludovic Courtès 2014-02-16Update .gitignore for Guile 2.0.9 bootstrap binaries....Mark H Weaver 2014-01-24Add 'guix offload' as a daemon build hook....Ludovic Courtès 2013-12-20daemon: Implement signed archive import/export....Ludovic Courtès 2013-12-04Augment 'gitignore'.Ludovic Courtès 2013-11-03gnu: add bootstrap support for mips64el-linux using the MIPS N32 ABI....Mark H Weaver 2013-09-23Add 'guix-register'....Ludovic Courtès 2013-07-07doc: Add a "Boostrapping" section....Ludovic Courtès 2013-06-12Ignore /po/Makevars.templateKonrad Hinsen 2013-04-03Add preliminary binary substituter....Ludovic Courtès 2013-02-16Replace individual scripts with master 'guix' script....Mark H Weaver 2013-01-20Augment `.gitignore'.Ludovic Courtès 2013-01-18distro: Change the module name space to (gnu ...)....Ludovic Courtès 2013-01-06Add `guix-gc'....Ludovic Courtès 2012-12-14daemon: Build `nix-setuid-helper'....Ludovic Courtès 2012-12-06build: Run all the tests against the just-built daemon....Ludovic Courtès 2012-12-05daemon: Add `list-runtime-roots' script....Ludovic Courtès 2012-12-04daemon: Add test....Ludovic Courtès 2012-12-03build: Include a copy of Nix's libstore and daemon; build it....Ludovic Courtès 2012-11-04Add (guix snix) and the `guix-import' command....Ludovic Courtès 2012-11-03build: Produce (guix config) instead of using compile-time tricks....Ludovic Courtès 2012-11-01Add a preliminary `guix-package' command-line tool....Ludovic Courtès