Red Hat Bugzilla – Bug 1269766
CVE-2015-7747 audiofile: Buffer overflow when changing number of channels and sample format
Last modified: 2015-12-07 16:21:50 EST
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:
Created audiofile tracking bugs for this issue:
Affects: fedora-all [bug 1269769]
> Proposed fix:
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.
expected 1, got -101
expected 28, got 29
I've added that as a comment to the pull request.
Looks like this was introduced via:
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.