Bug 1325090 (CVE-2016-3624)

Summary: CVE-2016-3624 libtiff: out of bounds write in the rgb2ycybr tool
Product: [Other] Security Response Reporter: Andrej Nemec <anemec>
Component: vulnerabilityAssignee: Red Hat Product Security <security-response-team>
Status: CLOSED WONTFIX QA Contact:
Severity: low Docs Contact:
Priority: low    
Version: unspecifiedCC: carnil, erik-fedora, nforro, phracek
Target Milestone: ---Keywords: Security
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-05-11 10:18:09 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1316881    

Description Andrej Nemec 2016-04-08 08:09:17 UTC
Out of bounds write vulnerability was found in cvtClump function in rgb2ycybr.c, allowing attacker to cause a denial of service via a crafted TIFF image.

Vulnerable code:

libtiff-master/libtiff/rgb2ycbcr.c:193

187         lumaGreen[TIFFGetG(RGB)] +
188         lumaBlue[TIFFGetB(RGB)];
189     /* accumulate chrominance */
190     Cb += (TIFFGetB(RGB) - Y) * D1;
191     Cr += (TIFFGetR(RGB) - Y) * D2;
192     /* emit luminence */
193     *op++ = V2Code(Y,
194         refBlackWhite[0], refBlackWhite[1], 255);
195                 }

Public via:

http://seclists.org/oss-sec/2016/q2/28

Comment 1 Andrej Nemec 2016-04-08 08:10:20 UTC
Acknowledgments:

Name: Mei Wang (Qihoo 360)

Comment 3 Stefan Cornelius 2017-05-11 10:18:09 UTC
The command line parameters passed to the tool influence the calculations within the cvtRaster() function in gb2ycbcr.c. This can lead to a call to _TIFFmalloc() with a bogus size. If this allocation fails, NULL is returned. The application doesn't check for this condition, which ultimately leads to an access violation when the cvtClump() function tries to write "into" it.

I've not really investigated what happens if the allocation succeeds - worst case could be a memory corruption, but since this issue depends on far-fetched custom command line parameters, I consider the likelyhood and impact of this to be minimal.

Comment 4 Stefan Cornelius 2017-05-11 10:18:18 UTC
External References:

http://bugzilla.maptools.org/show_bug.cgi?id=2568

Comment 5 Stefan Cornelius 2017-05-11 10:18:24 UTC
Statement:

Red Hat Product Security has rated this issue as having Low 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/.