A heap-based buffer overflow flaw was found in the way tiff2pdf, a TIFF image to a PDF document conversion tool, of libtiff, a library of functions for manipulating TIFF (Tagged Image File Format) image format files, performed write of TIFF image content into particular PDF document file, in the tp_process_jpeg_strip() function. A remote attacker could provide a specially-crafted TIFF image format file, that when processed by tiff2pdf would lead to tiff2pdf executable crash or, potentially, arbitrary code execution with the privileges of the user running the tiff2pdf binary. Acknowledgements: Red Hat would like to thank Emmanuel Bouillon (NCI Agency) for reporting this issue.
The attached patches upgrade t2p_process_jpeg_strip's JPEG-marker-parsing logic to some minimal semblance of sanity. It's still the case that what it's trying to do is fundamentally wrong/broken, but at least now it won't dump core on its way to producing a non-standards-compliant output file.
Created attachment 736500 [details] patch against CVS head (works for 3.9 too)
Created attachment 736501 [details] patch against 3.8.2
This issue has been assigned CVE-2013-1960
Created libtiff tracking bugs for this issue Affects: fedora-all [bug 958609]
Created mingw-libtiff tracking bugs for this issue Affects: fedora-all [bug 958610]
Public via: http://seclists.org/oss-sec/2013/q2/254
Patches pushed to upstream CVS.
libtiff-4.0.3-6.fc18 has been pushed to the Fedora 18 stable repository. If problems still persist, please make note of it in this bug report.
libtiff-3.9.7-2.fc17 has been pushed to the Fedora 17 stable repository. If problems still persist, please make note of it in this bug report.
This issue has been addressed in following products: Red Hat Enterprise Linux 5 Via RHSA-2014:0223 https://rhn.redhat.com/errata/RHSA-2014-0223.html
This issue has been addressed in following products: Red Hat Enterprise Linux 6 Via RHSA-2014:0222 https://rhn.redhat.com/errata/RHSA-2014-0222.html
Statement: (none)