summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch')
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
new file mode 100644
index 0000000000..17a97163f5
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0004-Always-check-the-number-of-coefficients.patch
@@ -0,0 +1,46 @@
1From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 12:51:22 +0100
4Subject: [PATCH] Always check the number of coefficients
5
6When building the library with NDEBUG, asserts are eliminated
7so it's better to always check that the number of coefficients
8is inside the array range.
9
10This fixes the 00191-audiofile-indexoob issue in #41
11
12Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
13
14CVE: CVE-2017-6827
15CVE: CVE-2017-6828
16CVE: CVE-2017-6832
17CVE: CVE-2017-6833
18CVE: CVE-2017-6835
19CVE: CVE-2017-6837
20CVE: CVE-2020-18781
21Upstream-Status: Inactive-Upstream [lastrelease: 2013]
22Signed-off-by: Peter Marko <peter.marko@siemens.com>
23---
24 libaudiofile/WAVE.cpp | 6 ++++++
25 1 file changed, 6 insertions(+)
26
27diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
28index 0e81cf7..61f9541 100644
29--- a/libaudiofile/WAVE.cpp
30+++ b/libaudiofile/WAVE.cpp
31@@ -281,6 +281,12 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
32
33 /* numCoefficients should be at least 7. */
34 assert(numCoefficients >= 7 && numCoefficients <= 255);
35+ if (numCoefficients < 7 || numCoefficients > 255)
36+ {
37+ _af_error(AF_BAD_HEADER,
38+ "Bad number of coefficients");
39+ return AF_FAIL;
40+ }
41
42 m_msadpcmNumCoefficients = numCoefficients;
43
44--
452.11.0
46