summaryrefslogtreecommitdiffstats
path: root/meta/recipes-multimedia
diff options
context:
space:
mode:
authorRoss Burton <ross.burton@intel.com>2019-03-25 23:21:08 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2019-03-26 14:02:09 +0000
commit49d6cd5000e2ff77b48b930fbceaa5938095e96d (patch)
treebe97319bbd2a015be2e2f218ca05e2db8e78a5da /meta/recipes-multimedia
parent496a4f924d23df6beb9382b4e3bcdcf5c12a9cdf (diff)
downloadpoky-49d6cd5000e2ff77b48b930fbceaa5938095e96d.tar.gz
libsndfile1: fix CVE-2019-3832
The previous fix for CVE-2018-19758 wasn't complete, so backport another patch to solve it properly. (From OE-Core rev: aeaca9bb1b1c8bf44818945dc4b2cbd6d4b5cef2) Signed-off-by: Ross Burton <ross.burton@intel.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-multimedia')
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch37
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb1
2 files changed, 38 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch
new file mode 100644
index 0000000000..ab37211399
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2019-3832.patch
@@ -0,0 +1,37 @@
1From 43886efc408c21e1e329086ef70c88860310f25b Mon Sep 17 00:00:00 2001
2From: Emilio Pozuelo Monfort <pochu27@gmail.com>
3Date: Tue, 5 Mar 2019 11:27:17 +0100
4Subject: [PATCH] wav_write_header: don't read past the array end
5
6CVE-2018-19758 wasn't entirely fixed in the fix, so fix it harder.
7
8CVE: CVE-2019-3832
9Upstream-Status: Backport [7408c4c788ce047d4e652b60a04e7796bcd7267e]
10Signed-off-by: Ross Burton <ross.burton@intel.com>
11
12If loop_count is bigger than the array, truncate it to the array
13length (and not to 32k).
14
15CVE-2019-3832
16
17---
18 src/wav.c | 6 ++++--
19 1 file changed, 4 insertions(+), 2 deletions(-)
20
21diff --git a/src/wav.c b/src/wav.c
22index daae3cc..8851549 100644
23--- a/src/wav.c
24+++ b/src/wav.c
25@@ -1094,8 +1094,10 @@ wav_write_header (SF_PRIVATE *psf, int calc_length)
26 psf_binheader_writef (psf, "44", 0, 0) ; /* SMTPE format */
27 psf_binheader_writef (psf, "44", psf->instrument->loop_count, 0) ;
28
29- /* Loop count is signed 16 bit number so we limit it range to something sensible. */
30- psf->instrument->loop_count &= 0x7fff ;
31+ /* Make sure we don't read past the loops array end. */
32+ if (psf->instrument->loop_count > ARRAY_LEN (psf->instrument->loops))
33+ psf->instrument->loop_count = ARRAY_LEN (psf->instrument->loops) ;
34+
35 for (tmp = 0 ; tmp < psf->instrument->loop_count ; tmp++)
36 { int type ;
37
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
index eb2c719d8d..77393db847 100644
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.28.bb
@@ -16,6 +16,7 @@ SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
16 file://CVE-2018-19432.patch \ 16 file://CVE-2018-19432.patch \
17 file://CVE-2017-12562.patch \ 17 file://CVE-2017-12562.patch \
18 file://CVE-2018-19758.patch \ 18 file://CVE-2018-19758.patch \
19 file://CVE-2019-3832.patch \
19 " 20 "
20 21
21SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c" 22SRC_URI[md5sum] = "646b5f98ce89ac60cdb060fcd398247c"