Bug 1269766 (CVE-2015-7747) - CVE-2015-7747 audiofile: Buffer overflow when changing number of channels and sample format
Summary: CVE-2015-7747 audiofile: Buffer overflow when changing number of channels and...
Alias: CVE-2015-7747
Product: Security Response
Classification: Other
Component: vulnerability
Version: unspecified
Hardware: All
OS: Linux
Target Milestone: ---
Assignee: Red Hat Product Security
QA Contact:
Depends On: 1269769
Blocks: 1269767
TreeView+ depends on / blocked
Reported: 2015-10-08 07:52 UTC by Adam Mariš
Modified: 2019-09-29 13:37 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Last Closed: 2015-10-26 10:14:24 UTC

Attachments (Terms of Use)

Description Adam Mariš 2015-10-08 07:52:07 UTC
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:


Proposed fix:


CVE assignment:


Comment 1 Adam Mariš 2015-10-08 07:54:13 UTC
Created audiofile tracking bugs for this issue:

Affects: fedora-all [bug 1269769]

Comment 2 Michael Schwendt 2015-10-08 09:57:46 UTC
> 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.


  $ ./sixteen-stereo-to-eight-mono
  expected 1, got -101


  $ ./sixteen-stereo-to-eight-mono
  expected 28, got 29

I've added that as a comment to the pull request.

Comment 3 Stefan Cornelius 2015-10-26 09:53:25 UTC
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.

Comment 5 Fedora Update System 2015-11-01 02:43:02 UTC
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.

Comment 6 Fedora Update System 2015-12-07 21:21:50 UTC
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.

Note You need to log in before you can comment on or make changes to this bug.