[oe-commits] [openembedded-core] 11/39: libsndfile1: Fix CVE-2017-8362
git at git.openembedded.org
git at git.openembedded.org
Mon Sep 11 21:16:50 UTC 2017
This is an automated email from the git hooks/post-receive script.
rpurdie pushed a commit to branch pyro-next
in repository openembedded-core.
commit e4141497c960e82a0b825e4fde1df55223095546
Author: Jackie Huang <jackie.huang at windriver.com>
AuthorDate: Thu Aug 17 14:44:28 2017 +0800
libsndfile1: Fix CVE-2017-8362
Backport the patch to fix CVE-2017-8362:
The flac_buffer_copy function in flac.c in libsndfile 1.0.28 allows
remote attackers to cause a denial of service (invalid read and
application crash) via a crafted audio file.
Reference:
https://nvd.nist.gov/vuln/detail/CVE-2017-8362
(From OE-Core rev: 0c8da3f6f85962196f2ad54fffd839239f5c2274)
Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
Signed-off-by: Richard Purdie <richard.purdie at linuxfoundation.org>
with minor changes
Signed-off-by: Armin Kuster <akuster808 at gmail.com>
---
.../libsndfile/libsndfile1/CVE-2017-8362.patch | 51 ++++++++++++++++++++++
.../libsndfile/libsndfile1_1.0.27.bb | 1 +
2 files changed, 52 insertions(+)
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 0000000..771ec92
--- /dev/null
+++ b/meta/recipes-multimedia/libsndfile/libsndfile1/CVE-2017-8362.patch
@@ -0,0 +1,51 @@
+From ef1dbb2df1c0e741486646de40bd638a9c4cd808 Mon Sep 17 00:00:00 2001
+From: Erik de Castro Lopo <erikd at mega-nerd.com>
+Date: Fri, 14 Apr 2017 15:19:16 +1000
+Subject: [PATCH] src/flac.c: Fix a buffer read overflow
+
+A file (generated by a fuzzer) which increased the number of channels
+from one frame to the next could cause a read beyond the end of the
+buffer provided by libFLAC. Only option is to abort the read.
+
+Closes: https://github.com/erikd/libsndfile/issues/231
+
+CVE: CVE-2017-8362
+
+Upstream-Status: Backport [https://github.com/erikd/libsndfile/commit/ef1dbb2df1c0e741486646de40bd638a9c4cd808]
+
+Signed-off-by: Jackie Huang <jackie.huang at windriver.com>
+
+removed hunk #2 as it was only cosmentic and caused a merge conflict.
+signef-off-by: Armin Kuster <akuster808 at gmail.com>
+---
+ src/flac.c | 11 +++++++++--
+ 1 file changed, 9 insertions(+), 2 deletions(-)
+
+Index: libsndfile-1.0.27/src/flac.c
+===================================================================
+--- libsndfile-1.0.27.orig/src/flac.c
++++ libsndfile-1.0.27/src/flac.c
+@@ -169,6 +169,14 @@ flac_buffer_copy (SF_PRIVATE *psf)
+ const FLAC__int32* const *buffer = pflac->wbuffer ;
+ unsigned i = 0, j, offset ;
+
++ if (psf->sf.channels != (int) frame->header.channels)
++ { psf_log_printf (psf, "Error: FLAC frame changed from %d to %d channels\n"
++ "Nothing to do but to error out.\n" ,
++ psf->sf.channels, frame->header.channels) ;
++ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
++ return 0 ;
++ } ;
++
+ /*
+ ** frame->header.blocksize is variable and we're using a constant blocksize
+ ** of FLAC__MAX_BLOCK_SIZE.
+@@ -410,7 +418,7 @@ sf_flac_meta_callback (const FLAC__Strea
+ { case FLAC__METADATA_TYPE_STREAMINFO :
+ if (psf->sf.channels > 0 && psf->sf.channels != (int) metadata->data.stream_info.channels)
+ { psf_log_printf (psf, "Error: FLAC stream changed from %d to %d channels\n"
+- "Nothing to be but to error out.\n" ,
++ "Nothing to do but to error out.\n" ,
+ psf->sf.channels, metadata->data.stream_info.channels) ;
+ psf->error = SFE_FLAC_CHANNEL_COUNT_CHANGED ;
+ return ;
diff --git a/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb b/meta/recipes-multimedia/libsndfile/libsndfile1_1.0.27.bb
index 71acf33..b255d72 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"
SRC_URI = "http://www.mega-nerd.com/libsndfile/files/libsndfile-${PV}.tar.gz \
file://CVE-2017-6892.patch \
file://CVE-2017-8361-8365.patch \
+ file://CVE-2017-8362.patch \
"
SRC_URI[md5sum] = "fd1d97c6077f03b5d984d7956ffedb7a"
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the Openembedded-commits
mailing list