summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch51
-rw-r--r--meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
new file mode 100644
index 0000000000..771ec92908
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
@@ -0,0 +1,51 @@
1From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001
2From: Erik de Castro Lopo <erikd@mega-nerd.com>
3Date: Fri, 14 Apr 2017 15:19:16 +1000
4Subject: [PATCH] src/flac.c: Fix a buffer read overflow
5
6A file (generated by a fuzzer) which increased the number of channels
7from one frame to the next could cause a read beyond the end of the
8buffer provided by libFLAC. Only option is to abort the read.
9
10Closes: https://github.com/erikd/libsndfile/issues/231
11
12CVE: CVE-2017-8362
13
14Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808]
15
16Signed-off-by: Jackie Huang <jackie.huang@windriver.com>
17
18removed hunk #2 as it was only cosmentic and caused a merge conflict.
19signef-off-by: Armin Kuster <akuster808@gmail.com>
20---
21 src/flac.c | 11 +++++++++--
22 1 file changed, 9 insertions(+), 2 deletions(-)
23
24Index: libsndfile-1.0.27/src/flac.c
25===================================================================
26--- libsndfile-1.0.27.orig/src/flac.c
27+++ libsndfile-1.0.27/src/flac.c
28@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf)
29 const FLAC__int32* const *buffer = pflac->wbuffer ;
30 unsigned i = 0, j, offset ;
31
32+ if (psf->sf.channels != (int) frame->header.channels)
33+ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n"
34+ "Nothing to do but to error out.\n" ,
35+ psf->sf.channels, frame->header.channels) ;
36+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
37+ return 0 ;
38+ } ;
39+
40 /*
41 ** frame->header.blocksize is variable and we're using a constant blocksize
42 ** of FLAC__MAX_BLOCK_SIZE.
43@@ -410,7 +418,7 @@ sf_flac_meta_callback (const FLAC__Strea
44 { case FLAC__METADATA_TYPE_STREAMINFO :
45 if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
46 { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
47- "Nothing to be but to error out.\n" ,
48+ "Nothing to do but to error out.\n" ,
49 psf->sf.channels, metadata->data.stream_info.channels) ;
50 psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
51 return ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
index 71acf3312b..b255d72f6b 100644
--- a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
@@ -8,6 +8,7 @@ LICENSE = "LGPLv2.1"
8SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \ 8SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
9 file://CVE-2017-6892.patch \ 9 file://CVE-2017-6892.patch \
10 file://CVE-2017-8361-8365.patch \ 10 file://CVE-2017-8361-8365.patch \
11 file://CVE-2017-8362.patch \
11 " 12 "
12 13
13SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a" 14SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a"