Bug 974617 (CVE-2016-3624) - VUL-1: CVE-2016-3624: tiff: Out-of-bounds Write in the rgb2ycbcr tool
Summary: VUL-1: CVE-2016-3624: tiff: Out-of-bounds Write in the rgb2ycbcr tool
Status: RESOLVED INVALID
Alias: CVE-2016-3624
Product: SUSE Security Incidents
Classification: Novell Products
Component: Incidents (show other bugs)
Version: unspecified
Hardware: Other Other
: P4 - Low : Minor
Target Milestone: ---
Assignee: Fridrich Strba
QA Contact: Security Team bot
URL: https://smash.suse.de/issue/166798/
Whiteboard: CVSSv2:SUSE:CVE-2016-3624:4.3:(AV:N/A...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-04-08 08:17 UTC by Johannes Segitz
Modified: 2019-04-25 14:47 UTC (History)
3 users (show)

See Also:
Found By: Security Response Team
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
good.tiff (448 bytes, application/octet-stream)
2016-10-11 17:25 UTC, Marcus Meissner
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Johannes Segitz 2016-04-08 08:17:01 UTC
Details
=======

Product: libtiff
Affected Versions: <= 4.0.6
Vulnerability Type:  Out-of-bounds Write
Vendor URL: http://www.remotesensing.org/libtiff/
CVE ID: CVE-2016-3624
Credit: Mei Wang of the Cloud Security Team, Qihoo 360

Introduction
============

Out-of-bounds Write occurred in function cvtClump in rgb2ycbcr allows attackers to cause a denial of service when param v was set to -1.



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                 }



gdb rgb2ycbcr

(gdb) r -c none  -r -1  -h -1  -v -1 sample/rgb2ycbcr_cvtClump.tif 1.tif

Program received signal SIGSEGV, Segmentation fault.
0x0000000000401440 in cvtClump (op=0x1 <Address 0x1 out of bounds>, raster=0x7ffff7249f90, ch=152, cw=65312, w=65312)
    at rgb2ycbcr.c:193
193                             *op++ = V2Code(Y,
(gdb) p op
$6 = (unsigned char *) 0x1 <Address 0x1 out of bounds>
(gdb) p *op
Cannot access memory at address 0x1
(gdb) bt
#0  0x0000000000401440 in cvtClump (op=0x1 <Address 0x1 out of bounds>, raster=0x7ffff7249f90, ch=152, cw=65312, w=65312)
    at rgb2ycbcr.c:193
#1  0x0000000000401757 in cvtStrip (op=0x0, raster=0x7ffff7249f90, nrows=152, width=65312) at rgb2ycbcr.c:245
#2  0x00000000004018b7 in cvtRaster (tif=0x604010, raster=0x7ffff4cab010, width=65312, height=152) at rgb2ycbcr.c:267
#3  0x0000000000401f03 in tiffcvt (in=0x605560, out=0x604010) at rgb2ycbcr.c:352
#4  0x000000000040108a in main (argc=11, argv=0x7fffffffe3b8) at rgb2ycbcr.c:127

References:
http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-3624
http://seclists.org/oss-sec/2016/q2/28
Comment 1 Swamp Workflow Management 2016-04-08 22:00:39 UTC
bugbot adjusting priority
Comment 3 Marcus Meissner 2016-10-11 17:25:58 UTC
Created attachment 696823 [details]
good.tiff

The problem is in the commandline parameters, not in a tiff. you can use any tiff, I have attached it here.

QA REPRODUCER:
rgb2ycbcr -c none -r -1 -h -1 -v -1 good.tiff output.tiff
Comment 4 Alexander Bergmann 2016-11-23 17:00:15 UTC
CVE-2016-3624 (http://bugzilla.maptools.org/show_bug.cgi?id=2568#c1) has been marked as a duplicated of CVE-2016-3623 (http://bugzilla.maptools.org/show_bug.cgi?id=2569)

It uses the same fix.
https://github.com/vadz/libtiff/commit/bd024f07019f5d9fea236675607a69f74a66bc7b
Comment 5 Alexander Bergmann 2017-12-13 14:22:03 UTC
I cannot reproduce this problem with the latest tiff version on SLE.

Closing as invalid.