Bug 2079 - CVE-2009-2347 libtiff: integer overflows in various inter-color space conversion tools
: CVE-2009-2347 libtiff: integer overflows in various inter-color space convers...
Status: RESOLVED FIXED
: libtiff
default
: 3.8.2
: All All
: P2 major
: ---
Assigned To:
: https://bugzilla.redhat.com/show_bug....
:
:
:
:
  Show dependency treegraph
 
Reported: 2009-07-13 15:32 by
Modified: 2016-07-10 07:52 (History)


Attachments
patch for CVE-2009-2347 (5.02 KB, patch)
2009-07-13 15:32, Tom Lane
Details | Diff
patch relative to 3.9 branch (3.38 KB, patch)
2009-08-20 15:25, Jay Berkenbilt
Details | Diff
portion of patch still not applied in 3.9.3 (2.81 KB, patch)
2010-06-11 19:59, Tom Lane
Details | Diff


Note

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


Description From 2009-07-13 15:32:08
Created an attachment (id=324) [details]
patch for CVE-2009-2347

tiff2rgba and rgb2ycbcr fail to guard against integer overflow while computing
the size of the required raster buffer.  A malicious input file could therefore
overwrite heap memory and potentially achieve arbitrary code execution.

I have applied the attached patch for Red Hat's releases of 3.8.2 and prior
versions.  I have not looked at 3.9 or later.
------- Comment #1 From 2009-08-20 15:21:33 -------
I'm attaching a patch for this problem that applies cleanly to the current 3.9
branch.
------- Comment #2 From 2009-08-20 15:25:31 -------
Created an attachment (id=327) [details]
patch relative to 3.9 branch

Looking at the patch I'm posting and comparing it to the patch already posted
here, I see that they are a little different.  The one I've provided (which I
didn't originally create but could trace if needed) has a little bit more code
duplication and also changes a variable name for clarity (the original code
shadows a variable).  Anyway, you might just want to apply the original patch,
manually adjusting as needed.  I didn't have any trouble adjusting the patch
for the 3.9 branch, but it did require a few hunks to be applied manually.
------- Comment #3 From 2009-08-20 20:31:15 -------
Applied to 3.9 branch.
------- Comment #4 From 2009-08-21 18:49:45 -------
Am I right that this still hasn't been applied to the trunk?
------- Comment #5 From 2009-08-24 17:16:21 -------
Fixes applied to CVS HEAD.
------- Comment #6 From 2009-12-03 19:09:37 -------
I was disappointed to find out that this is only partially fixed as of 3.9.2. 
There are three vulnerable spots in tiff2rgba.c and only one got fixed.  Please
see my original patch.
------- Comment #7 From 2010-06-11 19:59:48 -------
Created an attachment (id=389) [details]
portion of patch still not applied in 3.9.3

This portion of the original patch is still missing in the 3.9 branch, as per
my previous comment.
------- Comment #8 From 2010-06-11 21:57:25 -------
The missing patch is now applied to the 3.9 branch and will appear in 3.9.4. 
Sorry about that.