summaryrefslogtreecommitdiffstats
path: root/meta/recipes-support/taglib
diff options
context:
space:
mode:
authorYi Zhao <yi.zhao@windriver.com>2018-09-07 08:22:05 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2018-09-10 12:13:06 +0100
commit1589ac43db479534db65fd855587b1447276215c (patch)
treef7875e38700d46264454f61efc66e80ce6f95208 /meta/recipes-support/taglib
parent91098772f8718c3538a49524177bf42d3a667a5e (diff)
downloadpoky-1589ac43db479534db65fd855587b1447276215c.tar.gz
taglib: Security fix CVE-2018-11439
CVE-2018-11439: The TagLib::Ogg::FLAC::File::scan function in oggflacfile.cpp in TagLib 1.11.1 allows remote attackers to cause information disclosure (heap-based buffer over-read) via a crafted audio file. References: https://nvd.nist.gov/vuln/detail/CVE-2018-11439 Patch from: https://github.com/taglib/taglib/pull/869/commits/272648ccfcccae30e002ccf34a22e075dd477278 (From OE-Core rev: a300c4917b6c22ef039158be7ae92055c35658d4) Signed-off-by: Yi Zhao <yi.zhao@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/recipes-support/taglib')
-rw-r--r--meta/recipes-support/taglib/taglib/CVE-2018-11439.patch51
-rw-r--r--meta/recipes-support/taglib/taglib_1.11.1.bb1
2 files changed, 52 insertions, 0 deletions
diff --git a/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch b/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch
new file mode 100644
index 0000000000..cdd66e67f7
--- /dev/null
+++ b/meta/recipes-support/taglib/taglib/CVE-2018-11439.patch
@@ -0,0 +1,51 @@
1From 272648ccfcccae30e002ccf34a22e075dd477278 Mon Sep 17 00:00:00 2001
2From: Scott Gayou <github.scott@gmail.com>
3Date: Mon, 4 Jun 2018 11:34:36 -0400
4Subject: [PATCH] Fixed OOB read when loading invalid ogg flac file. (#868)
5
6This CVE is caused by a failure to check the minimum length
7of a ogg flac header. This header is detailed in full at:
8https://xiph.org/flac/ogg_mapping.html. Added more strict checking
9for entire header.
10
11Upstream-Status: Backport
12[https://github.com/taglib/taglib/pull/869/commits/272648ccfcccae30e002ccf34a22e075dd477278]
13
14CVE: CVE-2018-11439
15
16Signed-off-by: Yi Zhao <yi.zhao@windriver.com>
17---
18 taglib/ogg/flac/oggflacfile.cpp | 14 ++++++++++++--
19 1 file changed, 12 insertions(+), 2 deletions(-)
20
21diff --git a/taglib/ogg/flac/oggflacfile.cpp b/taglib/ogg/flac/oggflacfile.cpp
22index 53d0450..07ea9dc 100644
23--- a/taglib/ogg/flac/oggflacfile.cpp
24+++ b/taglib/ogg/flac/oggflacfile.cpp
25@@ -231,11 +231,21 @@ void Ogg::FLAC::File::scan()
26
27 if(!metadataHeader.startsWith("fLaC")) {
28 // FLAC 1.1.2+
29+ // See https://xiph.org/flac/ogg_mapping.html for the header specification.
30+ if(metadataHeader.size() < 13)
31+ return;
32+
33+ if(metadataHeader[0] != 0x7f)
34+ return;
35+
36 if(metadataHeader.mid(1, 4) != "FLAC")
37 return;
38
39- if(metadataHeader[5] != 1)
40- return; // not version 1
41+ if(metadataHeader[5] != 1 && metadataHeader[6] != 0)
42+ return; // not version 1.0
43+
44+ if(metadataHeader.mid(9, 4) != "fLaC")
45+ return;
46
47 metadataHeader = metadataHeader.mid(13);
48 }
49--
502.7.4
51
diff --git a/meta/recipes-support/taglib/taglib_1.11.1.bb b/meta/recipes-support/taglib/taglib_1.11.1.bb
index 50439bc14f..01dcf66d1e 100644
--- a/meta/recipes-support/taglib/taglib_1.11.1.bb
+++ b/meta/recipes-support/taglib/taglib_1.11.1.bb
@@ -10,6 +10,7 @@ DEPENDS = "zlib"
10 10
11SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz \ 11SRC_URI = "http://taglib.github.io/releases/${BP}.tar.gz \
12 file://CVE-2017-12678.patch \ 12 file://CVE-2017-12678.patch \
13 file://CVE-2018-11439.patch \
13 " 14 "
14 15
15SRC_URI[md5sum] = "cee7be0ccfc892fa433d6c837df9522a" 16SRC_URI[md5sum] = "cee7be0ccfc892fa433d6c837df9522a"