summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/libtiff-CVE-2016-5321.patch
diff options
context:
space:
mode:
authorLeo Famulari <leo@famulari.name>2016-08-23 15:34:16 -0400
committerLeo Famulari <leo@famulari.name>2016-08-29 20:20:52 -0400
commited5940b6172bbdf5b4787183b19623219f6c7347 (patch)
treee2372977a36958f4d1e433e41062ea86ec58ce28 /gnu/packages/patches/libtiff-CVE-2016-5321.patch
parent9c85fea912df843cf223cf14e765a553043c354a (diff)
gnu: libtiff: Fix CVE-2016-{3623,3945,3990,3991,5321,5323}.
* gnu/packages/image.scm (libtiff)[replacement]: New field. (libtiff/fixed): New variable. * gnu/packages/patches/libtiff-CVE-2016-3623.patch, gnu/packages/patches/libtiff-CVE-2016-3945.patch, gnu/packages/patches/libtiff-CVE-2016-3990.patch, gnu/packages/patches/libtiff-CVE-2016-3991.patch, gnu/packages/patches/libtiff-CVE-2016-5321.patch, gnu/packages/patches/libtiff-CVE-2016-5323.patch: New files. * gnu/local.mk (dist_patch_DATA): Add them.
Diffstat (limited to 'gnu/packages/patches/libtiff-CVE-2016-5321.patch')
-rw-r--r--gnu/packages/patches/libtiff-CVE-2016-5321.patch25
1 files changed, 25 insertions, 0 deletions
diff --git a/gnu/packages/patches/libtiff-CVE-2016-5321.patch b/gnu/packages/patches/libtiff-CVE-2016-5321.patch
new file mode 100644
index 0000000000..2afca18e1d
--- /dev/null
+++ b/gnu/packages/patches/libtiff-CVE-2016-5321.patch
@@ -0,0 +1,25 @@
+Fix CVE-2016-5321.
+
+https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-5321
+http://bugzilla.maptools.org/show_bug.cgi?id=2558
+
+Patch extracted from upstream CVS repo with:
+$ cvs diff -u -r1.35 -r1.36 tools/tiffcrop.c
+
+Index: tools/tiffcrop.c
+===================================================================
+RCS file: /cvs/maptools/cvsroot/libtiff/tools/tiffcrop.c,v
+retrieving revision 1.35
+retrieving revision 1.36
+diff -u -r1.35 -r1.36
+--- libtiff/tools/tiffcrop.c 19 Aug 2015 02:31:04 -0000 1.35
++++ libtiff/tools/tiffcrop.c 11 Jul 2016 21:26:03 -0000 1.36
+@@ -989,7 +989,7 @@
+ nrow = (row + tl > imagelength) ? imagelength - row : tl;
+ for (col = 0; col < imagewidth; col += tw)
+ {
+- for (s = 0; s < spp; s++)
++ for (s = 0; s < spp && s < MAX_SAMPLES; s++)
+ { /* Read each plane of a tile set into srcbuffs[s] */
+ tbytes = TIFFReadTile(in, srcbuffs[s], col, row, 0, s);
+ if (tbytes < 0 && !ignore)