v4.0.10.html 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327
  1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
  2. <HTML>
  3. <HEAD>
  4. <TITLE>
  5. Changes in TIFF v4.0.10
  6. </TITLE>
  7. <STYLE>
  8. table, th, td {
  9. border: 1px solid black;
  10. border-collapse: collapse;
  11. }
  12. th, td {
  13. padding: 8pt;
  14. text-align: center;
  15. }
  16. th {
  17. text-align: center;
  18. }
  19. td {
  20. text-align: center;
  21. }
  22. ul li {
  23. padding: 3pt;
  24. }
  25. ul.a {
  26. list-style-type: circle;
  27. }
  28. ul.b {
  29. list-style-type: square;
  30. }
  31. ol.c {
  32. list-style-type: upper-roman;
  33. }
  34. ol.d {
  35. list-style-type: lower-alpha;
  36. }
  37. </STYLE>
  38. </HEAD>
  39. <BODY BGCOLOR=white>
  40. <FONT FACE="Helvetica, Arial, Sans">
  41. <BASEFONT SIZE=4>
  42. <B><FONT SIZE=+3>T</FONT>IFF <FONT SIZE=+2>C</FONT>HANGE <FONT SIZE=+2>I</FONT>NFORMATION</B>
  43. <BASEFONT SIZE=3>
  44. <UL>
  45. <HR SIZE=4 WIDTH=65% ALIGN=left>
  46. <B>Current Version</B>: v4.0.10<BR>
  47. <B>Previous Version</B>: <A HREF=v4.0.9.html>v4.0.9</a><BR>
  48. <B>Master Download Site</B>: <A HREF="https://download.osgeo.org/libtiff">
  49. download.osgeo.org</a>, directory pub/libtiff</A><BR>
  50. <B>Master HTTP Site #1</B>: <A HREF="http://www.simplesystems.org/libtiff/">
  51. http://www.simplesystems.org/libtiff/</a><BR>
  52. <B>Master HTTP Site #2</B>: <A HREF="http://libtiff.maptools.org/">
  53. http://libtiff.maptools.org/</a>
  54. <HR SIZE=4 WIDTH=65% ALIGN=left>
  55. </UL>
  56. <P>
  57. This document describes the changes made to the software between the
  58. <I>previous</I> and <I>current</I> versions (see above). If you don't
  59. find something listed here, then it was not done in this timeframe, or
  60. it was not considered important enough to be mentioned. The following
  61. information is located here:
  62. <UL>
  63. <LI><A HREF="#highlights">Major Changes</A>
  64. <LI><A HREF="#configure">Changes in the software configuration</A>
  65. <LI><A HREF="#libtiff">Changes in libtiff</A>
  66. <LI><A HREF="#tools">Changes in the tools</A>
  67. <LI><A HREF="#contrib">Changes in the contrib area</A>
  68. </UL>
  69. <p>
  70. <P><HR WIDTH=65% ALIGN=left>
  71. <!--------------------------------------------------------------------------->
  72. <A NAME="highlights"><B><FONT SIZE=+3>M</FONT>AJOR CHANGES:</B></A>
  73. <UL>
  74. <LI> The libtiff source repository is changed from CVS to Git and the master libtiff source repository is now at <A HREF="https://gitlab.com/libtiff/libtiff">Gitlab</A>. This is the first release to be made from the new Git repository.</LI>
  75. </UL>
  76. <P><HR WIDTH=65% ALIGN=left>
  77. <!--------------------------------------------------------------------------->
  78. <A NAME="configure"><B><FONT SIZE=+3>C</FONT>HANGES IN THE SOFTWARE CONFIGURATION:</B></A>
  79. <UL>
  80. <LI>Minimum CMake version is now v2.8.11 for the CMake-based build.</LI>
  81. <LI>Libwebp will be automatically detected and used by configure/cmake if present.
  82. <LI>Libzstd will be automatically detected and used by configure/cmake if present.
  83. </UL>
  84. <P><HR WIDTH=65% ALIGN=left>
  85. <!--------------------------------------------------------------------------->
  86. <A NAME="libtiff"><B><FONT SIZE=+3>C</FONT>HANGES IN LIBTIFF:</B></A>
  87. <UL>
  88. <LI>
  89. <P>Added ZSTD compression codec.
  90. <A HREF="https://github.com/facebook/zstd">Zstandard<A> or zstd as
  91. short version, is a fast lossless compression algorithm, targeting
  92. real-time compression scenarios at zlib-level and better
  93. compression ratios. It's backed by a very fast entropy stage,
  94. provided by Huff0 and FSE library.</P>
  95. <P>We require libzstd >= 1.0.0 so as to be able to use streaming
  96. compression and decompression methods.</P>
  97. <P>The default compression level we have selected is 9 (range goes
  98. from 1 to 22), which experimentally offers equivalent or better
  99. compression ratio than the default deflate/ZIP level of 6, and
  100. much faster compression.</P>
  101. <P>For example on a 6600x4400 16bit image, tiffcp -c zip runs in
  102. 10.7 seconds, while tiffcp -c zstd runs in 5.3
  103. seconds. Decompression time for zip is 840 ms, and for zstd 650
  104. ms. File size is 42735936 for zip, and 42586822 for zstd. Similar
  105. findings on other images.</P>
  106. <P>On a 25894x16701 16bit image,</P>
  107. <TABLE>
  108. <TR><TH>Compressor</TH> <TH>Compression time</TH> <TH>Decompression time</TH> <TH>File size</TH></TR>
  109. <TR><TD>ZSTD</TD> <TD>35 s</TD> <TD>3.2 s</TD> <TD>399 700 498</TD></TR>
  110. <TR><TD>ZIP/Deflate</TD> <TD>1m 20 s</TD> <TD>4.9 s </TD> <TD>419 622 336</TD></TR>
  111. </TABLE>
  112. <P>Please note that COMPRESSION_ZSTD is self-assigned the id 50000
  113. by the libtiff project and is not officially registered with Adobe
  114. since Adobe's registration function is defunct.</P>
  115. </LI>
  116. <LI><P>Added WebP compression codec.
  117. <A HREF="https://developers.google.com/speed/webp/">WebP</A> is
  118. a high performance compressor intended for photos as commonly used
  119. on the Web. The WebP encoder is not designed for huge images, but
  120. serves very well for compressing strips and tiles in TIFF as long
  121. as the strips or tiles do not exceed the capability of the
  122. encoder.</P>
  123. <P>As a test of compression performance metrics, GraphicsMagick
  124. was used on an extremely high quality 8-bit TIFF image from a
  125. Hasselblad H4D-200MS camera with pixel dimensions of
  126. 16352x12264. The image was re-encoded with 1024x1024 tiles and
  127. various compression algorithms, using default settings for each
  128. algorithm. Based on this test, the compression and decompression
  129. performance (in iterations per second), the resulting file size,
  130. and the calculated total PSNR are provided here. It can be seen
  131. that WebP provided excellent encode and decode performance, and
  132. the compressed file size was very small:</P>
  133. <TABLE>
  134. <caption>Compressor Relative Performance</caption>
  135. <TR><TH>Compressor</TH> <TH>Compression</TH> <TH>Decompression</TH> <TH>File size</TH> <TH>PSNR</TH></TR>
  136. <TR><TD>None</TD> <TD>0.536 iter/s</TD> <TD>1.506 iter/s</TD> <TD>576.03MiB</TD> <TD>Inf</TD></TR>
  137. <TR><TD>LZW</TD> <TD>0.105 iter/s</TD> <TD>0.266 iter/s</TD> <TD>270.68MiB</TD> <TD>Inf</TD></TR>
  138. <TR><TD>ZStd</TD> <TD>0.020 iter/s</TD> <TD>0.518 iter/s</TD> <TD>238.42MiB</TD> <TD>Inf</TD></TR>
  139. <TR><TD>LZMA</TD> <TD>0.009 iter/s</TD> <TD>0.056 iter/s</TD> <TD>247.61MiB</TD> <TD>Inf</TD></TR>
  140. <TR><TD>ZIP</TD> <TD>0.009 iter/s</TD> <TD>0.301 iter/s</TD> <TD>247.88MiB</TD> <TD>Inf</TD></TR>
  141. <TR><TD>JPEG</TD> <TD>0.446 iter/s</TD> <TD>0.760 iter/s</TD> <TD>18.59MiB</TD> <TD>39.00</TD></TR>
  142. <TR><TD>WebP</TD> <TD>0.019 iter/s</TD> <TD>0.330 iter/s</TD> <TD>9.38MiB</TD> <TD>37.78</TD></TR>
  143. </TABLE>
  144. <P>Please note that COMPRESSION_WEBP is self-assigned the id 50001
  145. by the libtiff project and is not officially registered with Adobe
  146. since Adobe's registration function is defunct.</P>
  147. </LI>
  148. <LI>TIFFPrintDirectory(): fix null pointer dereference on corrupted
  149. file. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2770">Bug
  150. 2770 - NULL Pointer Dereference in tiffinfo.c with crafted TIFF
  151. image</A>.</LI>
  152. <LI>_TIFFVGetField(): fix heap out-of-bounds access when requesting
  153. TIFFTAG_NUMBEROFINKS on a EXIF
  154. directory. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2765">Bug
  155. 2765 - Heap Out-Of-Bounds Memory Access - 68122422</A>. Reported by
  156. Google Autofuzz project</LI>
  157. <LI>Fix a memory leak in TIFFStreamOpen. TIFFStreamOpen allocates a
  158. new tiff{o,i}s_data, but if TIFFClientOpen fails then that struct is
  159. leaked.</LI>
  160. <LI><P>Fix for bug 2772. It is possible to craft a TIFF document where
  161. the IFD list is circular, leading to an infinite loop while
  162. traversing the chain. The libtiff directory reader has a failsafe
  163. that will break out of this loop after reading 65535 directory
  164. entries, but it will continue processing, consuming time and
  165. resources to process what is essentially a bogus TIFFdocument.</P>
  166. <P>This change fixes the above behavior by breaking out of processing
  167. when a TIFF document has >= 65535 directories and terminating with an
  168. error.</P></LI>
  169. <LI>ChopUpSingleUncompressedStrip: avoid memory exhaustion
  170. (CVE-2017-11613). In ChopUpSingleUncompressedStrip(), if the
  171. computed number of strips is big enough and we are in read only
  172. mode, validate that the file size is consistent with that number of
  173. strips to avoid useless attempts at allocating a lot of memory for
  174. the td_stripbytecount and td_stripoffset
  175. arrays. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2724">Bug
  176. 2724 - memory exhaustion in ChopUpSingleUncompressedStrip</A></LI>
  177. <LI>Port code: Add strtol, strtoll and strtoull. Also update
  178. strtoul. All use the same implementation from NetBSD libc.</LI>
  179. <LI>Fix for CVE-2018-7456 "NULL pointer dereference in
  180. TIFFPrintDirectory".</LI>
  181. <LI>TIFFWriteDirectorySec: avoid
  182. assertion. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2795">Bug
  183. 2795 - There is a reachable assertion abort in function
  184. TIFFWriteDirectorySec() of libtiff 4.0.9. A crafted input will lead
  185. to remote denial of attack. (CVE-2018-10963)</A>.</LI>
  186. <LI>LZWDecodeCompat(): fix potential index-out-of-bounds
  187. write. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2780">Bug
  188. 2780 - A heap-buffer-overflow in function LZWDecodeCompat in
  189. libtiff4.0.9 (CVE-2018-8905)</A>. The fix consists in using the
  190. similar code as LZWDecode() to validate we don't write outside of
  191. the output buffer.</LI>
  192. <LI><P>Remove builtin support for GUI warning and error message
  193. boxes. Now warnings always go to the console by default unless
  194. applications define their own warning and error handlers.</P>
  195. <P>GUI applications (and Windows CE) are required to define such handlers.</P></LI>
  196. <LI>Add tag and pseudo-tag definitions for ESRI LERC codec (out of
  197. tree codec whose source is
  198. at <A HREF="https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c">
  199. https://github.com/OSGeo/gdal/blob/master/gdal/frmts/gtiff/tif_lerc.c</A>).</LI>
  200. <LI>Fix libtiff 4.0.8 regression when reading LZW-compressed strips with scanline API
  201. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2800">
  202. Bug 2800 - Regression: Opening a tiff file with v4.0.9 gives an error with LZWDecode</A>.</LI>
  203. <LI>TIFFSetupStrips(): avoid potential uint32 overflow on 32-bit
  204. systems with large number of strips. Probably relates
  205. to <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2788">Bug
  206. 2788 - Heap Buffer Overflow in TIFFWriteScanline of tif_write.c
  207. (CVE-2018-10779)</A></LI>
  208. <LI>Fix out-of-bound read on some tiled images.</LI>
  209. <LI>Avoid potential int32 overflows in multiply_ms().</LI>
  210. <LI>Only read/write TIFFTAG_GROUP3OPTIONS or TIFFTAG_GROUP4OPTIONS
  211. if compression is COMPRESSION_CCITTFAX3 or
  212. COMPRESSION_CCITTFAX4.</LI>
  213. <LI>JBIG: fix potential out-of-bounds write in JBIGDecode(). Also
  214. fix a (harmless) potential use of uninitialized memory when
  215. tif->tif_rawsize > tif->tif_rawcc. In case libtiff is compiled with
  216. CHUNKY_STRIP_READ_SUPPORT, make sure that whole strip data is
  217. provided to JBIGDecode().</LI>
  218. <LI>LZMAPreEncode: emit verbose error if lzma_stream_encoder() fails
  219. (typically because not enough memory available)</LI>
  220. </UL>
  221. <P><HR WIDTH=65% ALIGN=left>
  222. <!-------------------------------------------------------------------------->
  223. <A NAME="tools"><B><FONT SIZE=+3>C</FONT>HANGES IN THE TOOLS:</B></A>
  224. <UL>
  225. <LI>tiff2pdf: Fix
  226. CVE-2017-9935, <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2704">Bug
  227. 2704 - There is a heap based buffer overflow in the tiff2pdf tool of
  228. the libtiff library. A crafted TIFF document can lead to a heap
  229. based buffer overflow resulting in multiple damages.</A>.</LI>
  230. <LI>pal2rgb: Add workaround to pal2rgb buffer overflow.</LI>
  231. <LI>tiffset: Add support for LONG8, SLONG8 and IFD8 field types</LI>
  232. <LI>tiff2bw: avoid null pointer dereference in case of out of memory
  233. situation. Fixes <A HREF="http://bugzilla.maptools.org/show_bug.cgi?id=2819">Bug
  234. 2819 - There is a NULL pointer dereference at function LZWDecode in
  235. libtiff 4.0.9 (CVE-2018-18661)</A></LI>
  236. </UL>
  237. <P><HR WIDTH=65% ALIGN=left>
  238. <!--------------------------------------------------------------------------->
  239. <A NAME="contrib"><B><FONT SIZE=+3>C</FONT>HANGES IN THE CONTRIB AREA:</B></A>
  240. <UL>
  241. <LI> None</LI>
  242. </UL>
  243. </BODY>
  244. </HTML>