summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
authorJagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>2018-08-22 18:49:58 +0530
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-08-29 15:23:51 +0100
commitc035a200286256d4e9dac378279a0f7fa6d3e279 (patch)
tree410f84e4330b388e9963a091bc3e82e0969b696c /meta
parent3c38e696391284f07915f503ef9ee7f8569d224a (diff)
downloadpoky-c035a200286256d4e9dac378279a0f7fa6d3e279.tar.gz
libsndfile1: CVE-2017-14634
double64_init: Check psf->sf.channels against upper bound This prevents division by zero later in the code. While the trivial case to catch this (i.e. sf.channels < 1) has already been covered, a crafted file may report a number of channels that is so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets miscalculated to zero (if this makes sense) in the determination of the blockwidth. Since we only support a limited number of channels anyway, make sure to check here as well. CVE-2017-14634 Closes: #318 Affects libsndfile1 = 1.0.28 (From OE-Core rev: 00da7bad24cf78c9dba091b9e480515f25886b48) Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com> Signed-off-by: Armin Kuster <akuster808@gmail.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch42
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb1
2 files changed, 43 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch
new file mode 100644
index 0000000000..39b4ec1101
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-14634.patch
@@ -0,0 +1,42 @@
1From 85c877d5072866aadbe8ed0c3e0590fbb5e16788 Mon Sep 17 00:00:00 2001
2From: Fabian Greffrath <fabian@greffrath.com>
3Date: Thu, 28 Sep 2017 12:15:04 +0200
4Subject: [PATCH] double64_init: Check psf->sf.channels against upper bound
5
6This prevents division by zero later in the code.
7
8While the trivial case to catch this (i.e. sf.channels < 1) has already
9been covered, a crafted file may report a number of channels that is
10so high (i.e. > INT_MAX/sizeof(double)) that it "somehow" gets
11miscalculated to zero (if this makes sense) in the determination of the
12blockwidth. Since we only support a limited number of channels anyway,
13make sure to check here as well.
14
15CVE: CVE-2017-14634
16
17Closes: https://github.com/erikd/libsndfile/issues/318
18
19Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/85c877d5072866aadbe8ed0c3e0590fbb5e16788]
20
21Signed-off-by: Erik de Castro Lopo <erikd@mega-nerd.com>
22Signed-off-by: Jagadeesh Krishnanjanappa <jkrishnanjanappa@mvista.com>
23---
24 src/double64.c | 2 +-
25 1 file changed, 1 insertion(+), 1 deletion(-)
26
27diff --git a/src/double64.c b/src/double64.c
28index b318ea8..78dfef7 100644
29--- a/src/double64.c
30+++ b/src/double64.c
31@@ -91,7 +91,7 @@ int
32 double64_init (SF_PRIVATE *psf)
33 { static int double64_caps ;
34
35- if (psf->sf.channels < 1)
36+ if (psf->sf.channels < 1 || psf->sf.channels > SF_MAX_CHANNELS)
37 { psf_log_printf (psf, "double64_init : internal error : channels = %d\n", psf->sf.channels) ;
38 return SFE_INTERNAL ;
39 } ;
40--
412.13.3
42
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
index c6f2a460b2..ed43b7494e 100644
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
@@ -11,6 +11,7 @@ SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
11 file://CVE-2017-8362.patch \ 11 file://CVE-2017-8362.patch \
12 file://CVE-2017-8363.patch \ 12 file://CVE-2017-8363.patch \
13 file://CVE-2017-14245-14246.patch \ 13 file://CVE-2017-14245-14246.patch \
14 file://CVE-2017-14634.patch \
14 " 15 "
15 16
16SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c" 17SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"