flac: patch for CVE-2017-6888

Submitted by changqing.li@windriver.com on Aug. 21, 2018, 8:25 a.m. | Patch ID: 153953

Details

Message ID 1534839945-264601-1-git-send-email-changqing.li@windriver.com
State Master Next
Commit cf178e089608268649c0de58f3f4948d69707130
Headers show

Commit Message

changqing.li@windriver.com Aug. 21, 2018, 8:25 a.m.
From: Changqing Li <changqing.li@windriver.com>

Signed-off-by: Changqing Li <changqing.li@windriver.com>
---
 .../flac/flac/CVE-2017-6888.patch                  | 36 ++++++++++++++++++++++
 meta/recipes-multimedia/flac/flac_1.3.2.bb         |  4 ++-
 2 files changed, 39 insertions(+), 1 deletion(-)
 create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch

Patch hide | download patch | download mbox

diff --git a/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
new file mode 100644
index 0000000..0977f30
--- /dev/null
+++ b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
@@ -0,0 +1,36 @@ 
+From 43ecb6431077ff54e9df27f71737e6e96d6c039f Mon Sep 17 00:00:00 2001
+From: Changqing Li <changqing.li@windriver.com>
+Date: Tue, 21 Aug 2018 14:46:43 +0800
+Subject: [PATCH] From 5f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon Sep 17
+ 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date: Sat, 8
+ Apr 2017 18:34:49 +1000 Subject: [PATCH] stream_decoder.c: Fix a memory leak
+
+Leak reported by Secunia Research.
+
+Upstream-Status: Backport[https://git.xiph.org/?p=flac.git;a=commit;
+                 h=4f47b63e9c971e6391590caf00a0f2a5ed612e67]
+
+Update patch to version 1.3.2
+
+Signed-off-by: Changqing Li <changqing.li@windriver.com>
+---
+ src/libFLAC/stream_decoder.c | 3 +++
+ 1 file changed, 3 insertions(+)
+
+diff --git a/src/libFLAC/stream_decoder.c b/src/libFLAC/stream_decoder.c
+index d364b0c..ebf93da 100644
+--- a/src/libFLAC/stream_decoder.c
++++ b/src/libFLAC/stream_decoder.c
+@@ -1759,6 +1759,9 @@ FLAC__bool read_metadata_vorbiscomment_(FLAC__StreamDecoder *decoder, FLAC__Stre
+ 					}
+ 					memset (obj->comments[i].entry, 0, obj->comments[i].length) ;
+ 					if (!FLAC__bitreader_read_byte_block_aligned_no_crc(decoder->private_->input, obj->comments[i].entry, obj->comments[i].length)) {
++						/* Current i-th entry is bad, so we delete it. */\
++						free (obj->comments[i].entry) ;
++						obj->comments[i].entry = NULL ;						
+ 						obj->num_comments = i;
+ 						goto skip;
+ 					}
+-- 
+2.7.4
+
diff --git a/meta/recipes-multimedia/flac/flac_1.3.2.bb b/meta/recipes-multimedia/flac/flac_1.3.2.bb
index 8315ab5..92ef897 100644
--- a/meta/recipes-multimedia/flac/flac_1.3.2.bb
+++ b/meta/recipes-multimedia/flac/flac_1.3.2.bb
@@ -14,7 +14,9 @@  LIC_FILES_CHKSUM = "file://COPYING.FDL;md5=ad1419ecc56e060eccf8184a87c4285f \
                     file://include/FLAC/all.h;beginline=65;endline=70;md5=64474f2b22e9e77b28d8b8b25c983a48"
 DEPENDS = "libogg"
 
-SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz"
+SRC_URI = "http://downloads.xiph.org/releases/flac/${BP}.tar.xz \
+           file://CVE-2017-6888.patch "
+
 
 SRC_URI[md5sum] = "454f1bfa3f93cc708098d7890d0499bd"
 SRC_URI[sha256sum] = "91cfc3ed61dc40f47f050a109b08610667d73477af6ef36dcad31c31a4a8d53f"

Comments

Richard Purdie Aug. 23, 2018, 6:47 a.m.
On Tue, 2018-08-21 at 16:25 +0800, changqing.li@windriver.com wrote:
> From: Changqing Li <changqing.li@windriver.com>
> 
> Signed-off-by: Changqing Li <changqing.li@windriver.com>
> ---
>  .../flac/flac/CVE-2017-6888.patch                  | 36
> ++++++++++++++++++++++
>  meta/recipes-multimedia/flac/flac_1.3.2.bb         |  4 ++-
>  2 files changed, 39 insertions(+), 1 deletion(-)
>  create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2017-
> 6888.patch
> 
> diff --git a/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
> b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
> new file mode 100644
> index 0000000..0977f30
> --- /dev/null
> +++ b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
> @@ -0,0 +1,36 @@
> +From 43ecb6431077ff54e9df27f71737e6e96d6c039f Mon Sep 17 00:00:00
> 2001
> +From: Changqing Li <changqing.li@windriver.com>
> +Date: Tue, 21 Aug 2018 14:46:43 +0800
> +Subject: [PATCH] From 5f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon
> Sep 17
> + 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date:
> Sat, 8
> + Apr 2017 18:34:49 +1000 Subject: [PATCH] stream_decoder.c: Fix a
> memory leak
> +
> +Leak reported by Secunia Research.
> +
> +Upstream-Status: Backport[https://git.xiph.org/?p=flac.git;a=commit;
> +                 h=4f47b63e9c971e6391590caf00a0f2a5ed612e67]
> +
> +Update patch to version 1.3.2
> +
> +Signed-off-by: Changqing Li <changqing.li@windriver.com>

This patch is missing a CVE: header. 

Please don't resend as I've just tweaked the patch in -next to add it
as I don't want to have to go through another round of testing for it.

Cheers,

Richard
changqing.li@windriver.com Aug. 23, 2018, 7 a.m.
On 08/23/2018 02:47 PM, Richard Purdie wrote:
> On Tue, 2018-08-21 at 16:25 +0800, changqing.li@windriver.com wrote:
>> From: Changqing Li <changqing.li@windriver.com>
>>
>> Signed-off-by: Changqing Li <changqing.li@windriver.com>
>> ---
>>   .../flac/flac/CVE-2017-6888.patch                  | 36
>> ++++++++++++++++++++++
>>   meta/recipes-multimedia/flac/flac_1.3.2.bb         |  4 ++-
>>   2 files changed, 39 insertions(+), 1 deletion(-)
>>   create mode 100644 meta/recipes-multimedia/flac/flac/CVE-2017-
>> 6888.patch
>>
>> diff --git a/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
>> b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
>> new file mode 100644
>> index 0000000..0977f30
>> --- /dev/null
>> +++ b/meta/recipes-multimedia/flac/flac/CVE-2017-6888.patch
>> @@ -0,0 +1,36 @@
>> +From 43ecb6431077ff54e9df27f71737e6e96d6c039f Mon Sep 17 00:00:00
>> 2001
>> +From: Changqing Li <changqing.li@windriver.com>
>> +Date: Tue, 21 Aug 2018 14:46:43 +0800
>> +Subject: [PATCH] From 5f47b63e9c971e6391590caf00a0f2a5ed612e67 Mon
>> Sep 17
>> + 00:00:00 2001 From: Erik de Castro Lopo <erikd@mega-nerd.com> Date:
>> Sat, 8
>> + Apr 2017 18:34:49 +1000 Subject: [PATCH] stream_decoder.c: Fix a
>> memory leak
>> +
>> +Leak reported by Secunia Research.
>> +
>> +Upstream-Status: Backport[https://git.xiph.org/?p=flac.git;a=commit;
>> +                 h=4f47b63e9c971e6391590caf00a0f2a5ed612e67]
>> +
>> +Update patch to version 1.3.2
>> +
>> +Signed-off-by: Changqing Li <changqing.li@windriver.com>
> This patch is missing a CVE: header.
>
> Please don't resend as I've just tweaked the patch in -next to add it
> as I don't want to have to go through another round of testing for it.
>
> Cheers,
>
> Richard

Thanks.

Sandy
>