summaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
diff options
context:
space:
mode:
authorPeter Marko <peter.marko@siemens.com>2024-12-27 11:56:14 +0100
committerArmin Kuster <akuster808@gmail.com>2025-02-04 14:29:37 -0800
commit2bdeebd11ff9dda947de4fa2bfd927ef5f9ef948 (patch)
tree8ffc449af09b57e420acc29cec407cce2280bd9b /meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
parent85c8b0ab7a5272da4c4976e3aeaedb0b5e4d907c (diff)
downloadmeta-openembedded-2bdeebd11ff9dda947de4fa2bfd927ef5f9ef948.tar.gz
audiofile: patch CVE-2017-6831
Use patch from buildroot: https://github.com/buildroot/buildroot/commit/bd5f84d301c4e74ca200a9336eca88468ec0e1f3 Signed-off-by: Peter Marko <peter.marko@siemens.com> Signed-off-by: Khem Raj <raj.khem@gmail.com> (cherry picked from commit 9d668989b1447fb19aff55c1a47acdf8d4e8c5e2) Signed-off-by: Armin Kuster <akuster808@gmail.com>
Diffstat (limited to 'meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch')
-rw-r--r--meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch46
1 files changed, 46 insertions, 0 deletions
diff --git a/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
new file mode 100644
index 0000000000..38294ca200
--- /dev/null
+++ b/meta-oe/recipes-multimedia/audiofile/files/0007-Actually-fail-when-error-occurs-in-parseFormat.patch
@@ -0,0 +1,46 @@
1From a2e9eab8ea87c4ffc494d839ebb4ea145eb9f2e6 Mon Sep 17 00:00:00 2001
2From: Antonio Larrosa <larrosa@kde.org>
3Date: Mon, 6 Mar 2017 18:59:26 +0100
4Subject: [PATCH] Actually fail when error occurs in parseFormat
5
6When there's an unsupported number of bits per sample or an invalid
7number of samples per block, don't only print an error message using
8the error handler, but actually stop parsing the file.
9
10This fixes #35 (also reported at
11https://bugzilla.opensuse.org/show_bug.cgi?id=1026983 and
12https://blogs.gentoo.org/ago/2017/02/20/audiofile-heap-based-buffer-overflow-in-imadecodeblockwave-ima-cpp/
13)
14
15Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
16
17CVE: CVE-2017-6831
18Upstream-Status: Inactive-Upstream [lastrelease: 2013]
19Signed-off-by: Peter Marko <peter.marko@siemens.com>
20---
21 libaudiofile/WAVE.cpp | 2 ++
22 1 file changed, 2 insertions(+)
23
24diff --git a/libaudiofile/WAVE.cpp b/libaudiofile/WAVE.cpp
25index 0e81cf7..d762249 100644
26--- a/libaudiofile/WAVE.cpp
27+++ b/libaudiofile/WAVE.cpp
28@@ -326,6 +326,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
29 {
30 _af_error(AF_BAD_NOT_IMPLEMENTED,
31 "IMA ADPCM compression supports only 4 bits per sample");
32+ return AF_FAIL;
33 }
34
35 int bytesPerBlock = (samplesPerBlock + 14) / 8 * 4 * channelCount;
36@@ -333,6 +334,7 @@ status WAVEFile::parseFormat(const Tag &id, uint32_t size)
37 {
38 _af_error(AF_BAD_CODEC_CONFIG,
39 "Invalid samples per block for IMA ADPCM compression");
40+ return AF_FAIL;
41 }
42
43 track->f.sampleWidth = 16;
44--
452.11.0
46