diff --git a/audiofile-CVE-2019-13147.patch b/audiofile-CVE-2019-13147.patch new file mode 100644 index 0000000000000000000000000000000000000000..d43d1b3551bc17fa1d4a151e2a47bf3df9eec60e --- /dev/null +++ b/audiofile-CVE-2019-13147.patch @@ -0,0 +1,37 @@ +From f7008d7a541423e5a5ea1446c96a34251b1724a2 Mon Sep 17 00:00:00 2001 +From: dongzhenshu +Date: Fri, 29 Aug 2025 18:11:56 +0800 +Subject: [PATCH] cqos-CVE-2019-13147 + +--- + libaudiofile/NeXT.cpp | 7 +++++++ + 1 file changed, 7 insertions(+) + +diff --git a/libaudiofile/NeXT.cpp b/libaudiofile/NeXT.cpp +index c462dbe..21c8179 100644 +--- a/libaudiofile/NeXT.cpp ++++ b/libaudiofile/NeXT.cpp +@@ -32,6 +32,7 @@ + #include + #include + #include ++#include + + #include "File.h" + #include "Setup.h" +@@ -122,6 +123,12 @@ status NeXTFile::readInit(AFfilesetup setup) + _af_error(AF_BAD_CHANNELS, "invalid file with 0 channels"); + return AF_FAIL; + } ++ /* avoid overflow of INT for double size rate */ ++ if (channelCount > (INT32_MAX / (sizeof(double)))) ++ { ++ _af_error(AF_BAD_CHANNELS, "invalid file with %i channels", channelCount); ++ return AF_FAIL; ++ } + + Track *track = allocateTrack(); + if (!track) +-- +2.43.5 + diff --git a/audiofile.spec b/audiofile.spec index 67368dd251cd43218f0521ea8a3f86d6a763f417..48da4b4c7549e7613f6119552c9b9279ffb62e7b 100644 --- a/audiofile.spec +++ b/audiofile.spec @@ -1,6 +1,6 @@ Name: audiofile Version: 0.3.6 -Release: 28 +Release: 29 Summary: Library for reading and writing audio files in many common formats License: LGPLv2+ and GPLv2+ URL: http://audiofile.68k.org/ @@ -13,6 +13,7 @@ Patch4: backport-CVE-2017-6829.patch Patch5: backport-CVE-2017-6831.patch Patch6: backport-CVE-2017-6838.patch Patch7: backport-CVE-2017-6839.patch +Patch8: audiofile-CVE-2019-13147.patch BuildRequires: gcc-c++ libtool alsa-lib-devel flac-devel chrpath @@ -82,6 +83,9 @@ chrpath --delete %{buildroot}%{_bindir}/sfconvert %{_mandir}/man3/* %changelog +* Sat Oct 11 2025 Zhenshu Dong - 0.3.6-29 +- Fix CVE-2019-13147 + * Tue Nov 15 2022 dillon chen - 0.3.6-28 - Remove check when flac >= 1.3.4