Bug 1301621 - (CVE-2016-0775) CVE-2016-0775 python-pillow: Buffer overflow in FliDecode.c
CVE-2016-0775 python-pillow: Buffer overflow in FliDecode.c
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=20160204,repor...
: Security
Depends On: 1300660
Blocks: 1298877 1301622
  Show dependency treegraph
 
Reported: 2016-01-25 09:31 EST by Adam Mariš
Modified: 2016-03-01 08:35 EST (History)
4 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 Adam Mariš 2016-01-25 09:31:22 EST
A buffer overflow vulnerability in FliDecode.c was reported, affecting all versions of python-pillow at least from 1.1.7 release.

Vulnerable code:

case 16:
	/* COPY chunk */
    for (y = 0; y < state->ysize; y++) {
    UINT8* buf = (UINT8*) im->image[y];
    memcpy(buf+x, data, state->xsize);
    data += state->xsize;
    }
	break;

x is used in several internal temporary variable roles, but can take a value up to the width of the image from different chunk sizes. im->image[y] is a set of row pointers to segments of memory that are the size of the row. At the max y, this will write the contents of the line off the end of the memory buffer. This writes into python object storage in a region where there are function pointers.

Reproducer and proposed fix can be found in original bug report:

https://bugzilla.redhat.com/show_bug.cgi?id=1300660
Comment 3 Stefan Cornelius 2016-02-03 15:13:53 EST
Acknowledgements:

Red Hat would like to thank the Pillow project for reporting this issue. Upstream acknowledges Alyssa Besseling as the original reporter.

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