Bug 2661 - Integer overflow in gtTileContig (tif_getimage.c)
: Integer overflow in gtTileContig (tif_getimage.c)
Status: RESOLVED LATER
: libtiff
default
: unspecified
: PC Linux
: P2 enhancement
: ---
Assigned To:
:
:
: migrated_to_gitlab
:
:
  Show dependency treegraph
 
Reported: 2017-01-17 14:11 by
Modified: 2019-10-01 14:20 (History)


Attachments


Note

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


Description From 2017-01-17 14:11:10
In gtTileContig, w, tw are uint32. tw is obtained from TIFFGetField(tif,
TIFFTAG_TILEWIDTH, &tw); so it could be very large in corrupted files.

fromskew, toskew are int32. There are several places in gtTileContig where
these are assigned to computations using w, tw. Examples:
toskew = -(int32)(tw + w);
fromskew = tw - (w - tocol);

This can result in integer overflows which cause other problems, as pointers
are shifted by toskew/fromskew later on.
------- Comment #1 From 2019-10-01 14:20:15 -------
Bugzilla is no longer used for tracking libtiff issues. Remaining open tickets,
such as this one, have been migrated to the libtiff GitLab instance at
https://gitlab.com/libtiff/libtiff/issues .

The migrated tickets have their summary prefixed with [BZ#XXXX] where XXXX is
the initial Bugzilla issue number.