Bug 1257859 - (CVE-2015-0852) CVE-2015-0852 freeimage: integer overflow in PluginPCX.cpp
CVE-2015-0852 freeimage: integer overflow in PluginPCX.cpp
Status: NEW
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=20150827,repor...
: Security
Depends On: 1257862 1257860 1257861
Blocks:
  Show dependency treegraph
 
Reported: 2015-08-28 05:30 EDT by Martin Prpič
Modified: 2015-08-30 11:11 EDT (History)
6 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed:
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 Martin Prpič 2015-08-28 05:30:50 EDT
The following flaw was reported in FreeImage:

Affected Version: <= 3.17.0
URL : http://freeimage.sourceforge.net/

Description :
An integer overflow issue in the FreeImage project was reported and fixed recently.

Upstream fix: Revision 1.18 
http://freeimage.cvs.sourceforge.net/viewvc/freeimage/FreeImage/Source/FreeImage/PluginPCX.cpp?view=log&pathrev=MAIN

Details:

The PluginPCX.cpp file(version 3.17.0) has:

371 unsigned width = header.window[2] - header.window[0] + 1;
372 unsigned height = header.window[3] - header.window[1] + 1;
373 unsigned bitcount = header.bpp * header.planes;

However, it's possible that header.window[2] < header.window[0], and also header.window[3] < header.window[1]. In this 
two cases, width and height can be overflowed. And this can lead further issue in the rest of the code. Take the 
following lines for example:

568 for (x = 0; x < width; x++) {
569 bits[x * 3 + FI_RGBA_RED] = pline[x];
570 }

The write operation on buffer bits can help an attacker to corrupt the heap.

Original report:
http://seclists.org/oss-sec/2015/q3/450
Comment 1 Martin Prpič 2015-08-28 05:31:22 EDT
Created freeimage tracking bugs for this issue:

Affects: fedora-all [bug 1257860]
Affects: epel-all [bug 1257862]
Comment 2 Martin Prpič 2015-08-28 05:31:24 EDT
Created mingw-freeimage tracking bugs for this issue:

Affects: fedora-all [bug 1257861]

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