A buffer overflow vulnerability was found in Audio File Library appearing when changing the number of channels of an audio file (e.g. from stereo to mono) and the sample format (e.g. from 16-bit samples to 8-bit samples), causing the output file to contain corrupted data. If the new sample format is smaller than the old one, there is a risk of buffer overflow: e.g. when the input file has 16-bit samples and the output file has 8-bit samples, afReadFrames will treat the buffer to read the samples (argument void *data) as a pointer to int16_t instead of int8_t, therefore it will write past its end. Reproducer can be found here: https://bugs.launchpad.net/ubuntu/+source/audiofile/+bug/1502721 Proposed fix: https://github.com/mpruett/audiofile/pull/25/files CVE assignment: http://seclists.org/oss-sec/2015/q4/47
Created audiofile tracking bugs for this issue: Affects: fedora-all [bug 1269769]
> Proposed fix: > > https://github.com/mpruett/audiofile/pull/25/files I've seen that pull request some days ago flying by, but without a reference to a CVE. Problem so far is that the fix doesn't pass the test-case. Before: $ ./sixteen-stereo-to-eight-mono error expected 1, got -101 After: $ ./sixteen-stereo-to-eight-mono error expected 28, got 29 I've added that as a comment to the pull request.
Looks like this was introduced via: https://github.com/fabzzap/audiofile/commit/2bbebc4aa0c847d59f42e291d99ad015e40c51c7 This commit never made it into RHEL6, so RHEL6 is not affected. RHEL7 and Fedora are affected. Successful exploitation can lead to a memory corruption, but depends on how exactly the audiofile library is used by an application and which operations are performed.
audiofile-0.3.6-9.fc23 has been pushed to the Fedora 23 stable repository. If problems still persist, please make note of it in this bug report.
audiofile-0.3.6-9.fc22 has been pushed to the Fedora 22 stable repository. If problems still persist, please make note of it in this bug report.