diff options
author | Kai Kang <kai.kang@windriver.com> | 2015-10-16 11:23:02 +0800 |
---|---|---|
committer | Martin Jansa <Martin.Jansa@gmail.com> | 2015-10-23 12:53:22 +0200 |
commit | 9d5b4c712f77d3bff902eb9924c80b561dcce3f6 (patch) | |
tree | a16b6b5e42ae191e78d3403bf04aaf5abb039c1a /meta-multimedia/recipes-multimedia/vorbis-tools | |
parent | 2effb83c6adb73c4047f482bd67d218ad03f67f9 (diff) | |
download | meta-openembedded-9d5b4c712f77d3bff902eb9924c80b561dcce3f6.tar.gz |
vorbis-tools: fix CVE-2015-6749
Backport patch to fix CVE-2015-6749 from:
https://trac.xiph.org/ticket/2212
Signed-off-by: Kai Kang <kai.kang@windriver.com>
Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
Diffstat (limited to 'meta-multimedia/recipes-multimedia/vorbis-tools')
2 files changed, 52 insertions, 1 deletions
diff --git a/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch new file mode 100644 index 000000000..b623dbf37 --- /dev/null +++ b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools/0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch | |||
@@ -0,0 +1,49 @@ | |||
1 | Upstream-Status: Backport | ||
2 | |||
3 | Backport patch to fix CVE-2015-6749 from: | ||
4 | |||
5 | https://trac.xiph.org/ticket/2212 | ||
6 | |||
7 | Signed-off-by: Kai Kang <kai.kang@windriver.com> | ||
8 | --- | ||
9 | From 04815d3e1bfae3a6cdfb2c25358a5a72b61299f7 Mon Sep 17 00:00:00 2001 | ||
10 | From: Mark Harris <mark.hsj@gmail.com> | ||
11 | Date: Sun, 30 Aug 2015 05:54:46 -0700 | ||
12 | Subject: [PATCH] oggenc: Fix large alloca on bad AIFF input | ||
13 | |||
14 | Fixes #2212 | ||
15 | --- | ||
16 | oggenc/audio.c | 10 +++++----- | ||
17 | 1 file changed, 5 insertions(+), 5 deletions(-) | ||
18 | |||
19 | diff --git a/oggenc/audio.c b/oggenc/audio.c | ||
20 | index 477da8c..4921fb9 100644 | ||
21 | --- a/oggenc/audio.c | ||
22 | +++ b/oggenc/audio.c | ||
23 | @@ -245,8 +245,8 @@ static int aiff_permute_matrix[6][6] = | ||
24 | int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) | ||
25 | { | ||
26 | int aifc; /* AIFC or AIFF? */ | ||
27 | - unsigned int len; | ||
28 | - unsigned char *buffer; | ||
29 | + unsigned int len, readlen; | ||
30 | + unsigned char buffer[22]; | ||
31 | unsigned char buf2[8]; | ||
32 | aiff_fmt format; | ||
33 | aifffile *aiff = malloc(sizeof(aifffile)); | ||
34 | @@ -269,9 +269,9 @@ int aiff_open(FILE *in, oe_enc_opt *opt, unsigned char *buf, int buflen) | ||
35 | return 0; /* Weird common chunk */ | ||
36 | } | ||
37 | |||
38 | - buffer = alloca(len); | ||
39 | - | ||
40 | - if(fread(buffer,1,len,in) < len) | ||
41 | + readlen = len < sizeof(buffer) ? len : sizeof(buffer); | ||
42 | + if(fread(buffer,1,readlen,in) < readlen || | ||
43 | + (len > readlen && !seek_forward(in, len-readlen))) | ||
44 | { | ||
45 | fprintf(stderr, _("Warning: Unexpected EOF in reading AIFF header\n")); | ||
46 | return 0; | ||
47 | -- | ||
48 | 2.5.0 | ||
49 | |||
diff --git a/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.0.bb b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.0.bb index a35dee6e4..2683555f1 100644 --- a/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.0.bb +++ b/meta-multimedia/recipes-multimedia/vorbis-tools/vorbis-tools_1.4.0.bb | |||
@@ -10,7 +10,9 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f" | |||
10 | 10 | ||
11 | DEPENDS = "libogg libvorbis curl libao" | 11 | DEPENDS = "libogg libvorbis curl libao" |
12 | 12 | ||
13 | SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.gz" | 13 | SRC_URI = "http://downloads.xiph.org/releases/vorbis/${BP}.tar.gz \ |
14 | file://0001-oggenc-Fix-large-alloca-on-bad-AIFF-input.patch \ | ||
15 | " | ||
14 | 16 | ||
15 | SRC_URI[md5sum] = "567e0fb8d321b2cd7124f8208b8b90e6" | 17 | SRC_URI[md5sum] = "567e0fb8d321b2cd7124f8208b8b90e6" |
16 | SRC_URI[sha256sum] = "a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc" | 18 | SRC_URI[sha256sum] = "a389395baa43f8e5a796c99daf62397e435a7e73531c9f44d9084055a05d22bc" |