Bug 1269766 - (CVE-2015-7747) CVE-2015-7747 audiofile: Buffer overflow when changing number of channels and sample format
CVE-2015-7747 audiofile: Buffer overflow when changing number of channels and...
Status: CLOSED WONTFIX
Product: Security Response
Classification: Other
Component: vulnerability (Show other bugs)
unspecified
All Linux
medium Severity medium
: ---
: ---
Assigned To: Red Hat Product Security
impact=moderate,public=20151004,repor...
: Security
Depends On: 1269769
Blocks: 1269767
  Show dependency treegraph
 
Reported: 2015-10-08 03:52 EDT by Adam Mariš
Modified: 2015-12-07 16:21 EST (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2015-10-26 06:14:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Adam Mariš 2015-10-08 03:52:07 EDT
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
Comment 1 Adam Mariš 2015-10-08 03:54:13 EDT
Created audiofile tracking bugs for this issue:

Affects: fedora-all [bug 1269769]
Comment 2 Michael Schwendt 2015-10-08 05:57:46 EDT
> 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.
Comment 3 Stefan Cornelius 2015-10-26 05:53:25 EDT
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.
Comment 5 Fedora Update System 2015-10-31 22:43:02 EDT
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 16:21:50 EST
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.