Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1378760 - (CVE-2016-7528) CVE-2016-7528 ImageMagick: out of bound access for viff file coder
CVE-2016-7528 ImageMagick: out of bound access for viff file coder
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=20160124,repor...
: Security
Depends On: 1378790
Blocks: 1378785
  Show dependency treegraph
 
Reported: 2016-09-23 04:52 EDT by Adam Mariš
Modified: 2017-05-19 05:09 EDT (History)
13 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2017-05-19 05:09:21 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)
Comment 1 Adam Mariš 2016-09-23 05:35:19 EDT
Created ImageMagick tracking bugs for this issue:

Affects: fedora-all [bug 1378790]
Comment 2 Stefan Cornelius 2016-09-29 06:45:48 EDT
coders/viff.c:
> number_pixels=(MagickSizeType) image->columns*image->rows;
> for (y=0; y < (ssize_t) image->rows; y++)
> {
>   q=QueueAuthenticPixels(image,0,y,image->columns,1,exception);
>   if (q == (PixelPacket *) NULL)
>    break;
>   for (x=0; x < (ssize_t) image->columns; x++)
>   {
>       SetPixelRed(q,ScaleCharToQuantum(*p));
>       SetPixelGreen(q,ScaleCharToQuantum(*(p+number_pixels)));
>       SetPixelBlue(q,ScaleCharToQuantum(*(p+2*number_pixels)));
>       if (image->colors != 0)

Depending on the image dimensions, number_pixels can be quite large
> number_pixels=(MagickSizeType) image->columns*image->rows;

This causes problems when adding this to "p" to calculate the address. It could wrap around and cause an access to invalid memory.
>       SetPixelGreen(q,ScaleCharToQuantum(*(p+number_pixels)));
>       SetPixelBlue(q,ScaleCharToQuantum(*(p+2*number_pixels)));

I'm not sure if the upstream patch properly protects against that.
Comment 3 Stefan Cornelius 2017-05-19 05:09:38 EDT
Statement:

Red Hat Product Security has rated this issue as having Moderate security impact. This issue is not currently planned to be addressed in future updates. For additional information, refer to the Issue Severity Classification: https://access.redhat.com/security/updates/classification/.

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