diff options
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.patch | 46 |
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 @@ | |||
1 | From c48e4c6503f7dabd41f11d4c9c7b7f8960e7f2c0 Mon Sep 17 00:00:00 2001 | ||
2 | From: Antonio Larrosa <larrosa@kde.org> | ||
3 | Date: Mon, 6 Mar 2017 12:51:22 +0100 | ||
4 | Subject: [PATCH] Always check the number of coefficients | ||
5 | |||
6 | When building the library with NDEBUG, asserts are eliminated | ||
7 | so it's better to always check that the number of coefficients | ||
8 | is inside the array range. | ||
9 | |||
10 | This fixes the 00191-audiofile-indexoob issue in #41 | ||
11 | |||
12 | Signed-off-by: Peter Korsgaard <peter@korsgaard.com> | ||
13 | |||
14 | CVE: CVE-2017-6827 | ||
15 | CVE: CVE-2017-6828 | ||
16 | CVE: CVE-2017-6832 | ||
17 | CVE: CVE-2017-6833 | ||
18 | CVE: CVE-2017-6835 | ||
19 | CVE: CVE-2017-6837 | ||
20 | CVE: CVE-2020-18781 | ||
21 | Upstream-Status: Inactive-Upstream [lastrelease: 2013] | ||
22 | Signed-off-by: Peter Marko <peter.marko@siemens.com> | ||
23 | --- | ||
24 | libaudiofile/WAVE.cpp | 6 ++++++ | ||
25 | 1 file changed, 6 insertions(+) | ||
26 | |||
27 | diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp | ||
28 | index 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 | -- | ||
45 | 2.11.0 | ||
46 | |||