From 825927e85933322e6f195f0d937359017a9a9b97 Mon Sep 17 00:00:00 2001 From: Fan Xin Date: Wed, 7 Jun 2017 17:11:56 +0900 Subject: libtiff: Upgrade to 4.0.8 1. Upgrade libtiff from 4.0.7 to 4.0.8 2. Delete the following patch file due to CVE-2017-5225 has been fixed in 4.0.8 libtiff-CVE-2017-5225.patch Signed-off-by: Fan Xin Signed-off-by: Ross Burton --- .../libtiff/files/libtiff-CVE-2017-5225.patch | 92 ---------------------- meta/recipes-multimedia/libtiff/tiff_4.0.7.bb | 49 ------------ meta/recipes-multimedia/libtiff/tiff_4.0.8.bb | 48 +++++++++++ 3 files changed, 48 insertions(+), 141 deletions(-) delete mode 100644 meta/recipes-multimedia/libtiff/files/libtiff-CVE-2017-5225.patch delete mode 100644 meta/recipes-multimedia/libtiff/tiff_4.0.7.bb create mode 100644 meta/recipes-multimedia/libtiff/tiff_4.0.8.bb (limited to 'meta/recipes-multimedia/libtiff') diff --git a/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2017-5225.patch b/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2017-5225.patch deleted file mode 100644 index 3263353a75..0000000000 --- a/meta/recipes-multimedia/libtiff/files/libtiff-CVE-2017-5225.patch +++ /dev/null @@ -1,92 +0,0 @@ -From a24df1e93833dfeaa69bf4d510518dc4684db64d Mon Sep 17 00:00:00 2001 -From: Li Zhou -Date: Wed, 25 Jan 2017 17:07:21 +0800 -Subject: [PATCH] libtiff: fix CVE-2017-5225 - -tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow -and cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based -overflow. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and -http://bugzilla.maptools.org/show_bug.cgi?id=2657 - -Upstream-Status: Backport -CVE: CVE-2017-5225 -Signed-off-by: Li Zhou ---- - ChangeLog | 7 +++++++ - tools/tiffcp.c | 24 ++++++++++++++++++++++-- - 2 files changed, 29 insertions(+), 2 deletions(-) - -diff --git a/ChangeLog b/ChangeLog -index 9b9d397..7e82795 100644 ---- a/ChangeLog -+++ b/ChangeLog -@@ -1,3 +1,10 @@ -+2017-01-11 Even Rouault -+ -+ * tools/tiffcp.c: error out cleanly in cpContig2SeparateByRow and -+ cpSeparate2ContigByRow if BitsPerSample != 8 to avoid heap based overflow. -+ Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2656 and -+ http://bugzilla.maptools.org/show_bug.cgi?id=2657 -+ - 2016-11-19 Bob Friesenhahn - - * libtiff 4.0.7 released. -diff --git a/tools/tiffcp.c b/tools/tiffcp.c -index 338a3d1..2e84577 100644 ---- a/tools/tiffcp.c -+++ b/tools/tiffcp.c -@@ -592,7 +592,7 @@ static copyFunc pickCopyFunc(TIFF*, TIFF*, uint16, uint16); - static int - tiffcp(TIFF* in, TIFF* out) - { -- uint16 bitspersample, samplesperpixel = 1; -+ uint16 bitspersample = 1, samplesperpixel = 1; - uint16 input_compression, input_photometric = PHOTOMETRIC_MINISBLACK; - copyFunc cf; - uint32 width, length; -@@ -1068,6 +1068,16 @@ DECLAREcpFunc(cpContig2SeparateByRow) - register uint32 n; - uint32 row; - tsample_t s; -+ uint16 bps = 0; -+ -+ (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); -+ if( bps != 8 ) -+ { -+ TIFFError(TIFFFileName(in), -+ "Error, can only handle BitsPerSample=8 in %s", -+ "cpContig2SeparateByRow"); -+ return 0; -+ } - - inbuf = _TIFFmalloc(scanlinesizein); - outbuf = _TIFFmalloc(scanlinesizeout); -@@ -1121,6 +1131,16 @@ DECLAREcpFunc(cpSeparate2ContigByRow) - register uint32 n; - uint32 row; - tsample_t s; -+ uint16 bps = 0; -+ -+ (void) TIFFGetField(in, TIFFTAG_BITSPERSAMPLE, &bps); -+ if( bps != 8 ) -+ { -+ TIFFError(TIFFFileName(in), -+ "Error, can only handle BitsPerSample=8 in %s", -+ "cpSeparate2ContigByRow"); -+ return 0; -+ } - - inbuf = _TIFFmalloc(scanlinesizein); - outbuf = _TIFFmalloc(scanlinesizeout); -@@ -1763,7 +1783,7 @@ pickCopyFunc(TIFF* in, TIFF* out, uint16 bitspersample, uint16 samplesperpixel) - uint32 w, l, tw, tl; - int bychunk; - -- (void) TIFFGetField(in, TIFFTAG_PLANARCONFIG, &shortv); -+ (void) TIFFGetFieldDefaulted(in, TIFFTAG_PLANARCONFIG, &shortv); - if (shortv != config && bitspersample != 8 && samplesperpixel > 1) { - fprintf(stderr, - "%s: Cannot handle different planar configuration w/ bits/sample != 8\n", --- -1.9.1 - diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb deleted file mode 100644 index e58173604e..0000000000 --- a/meta/recipes-multimedia/libtiff/tiff_4.0.7.bb +++ /dev/null @@ -1,49 +0,0 @@ -SUMMARY = "Provides support for the Tag Image File Format (TIFF)" -LICENSE = "BSD-2-Clause" -LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" - -CVE_PRODUCT = "libtiff" - -SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ - file://libtool2.patch \ - file://libtiff-CVE-2017-5225.patch \ - " - -SRC_URI[md5sum] = "77ae928d2c6b7fb46a21c3a29325157b" -SRC_URI[sha256sum] = "9f43a2cfb9589e5cecaa66e16bf87f814c945f22df7ba600d63aac4632c4f019" - -# exclude betas -UPSTREAM_CHECK_REGEX = "tiff-(?P\d+(\.\d+)+).tar" - -inherit autotools - -CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no" - -PACKAGECONFIG ?= "cxx jpeg zlib lzma \ - strip-chopping extrasample-as-alpha check-ycbcr-subsampling" - -PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,," -PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg," -PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib," -PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz," - -# Convert single-strip uncompressed images to multiple strips of specified -# size (default: 8192) to reduce memory usage -PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,," - -# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA -PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,," - -# Control picking up YCbCr subsample info. Disable to support files lacking -# the tag -PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,," - -# Support a mechanism allowing reading large strips (usually one strip files) -# in chunks when using TIFFReadScanline. Experimental 4.0+ feature -PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,," - -PACKAGES =+ "tiffxx tiff-utils" -FILES_tiffxx = "${libdir}/libtiffxx.so.*" -FILES_tiff-utils = "${bindir}/*" - -BBCLASSEXTEND = "native" diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb b/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb new file mode 100644 index 0000000000..4a7aeccd23 --- /dev/null +++ b/meta/recipes-multimedia/libtiff/tiff_4.0.8.bb @@ -0,0 +1,48 @@ +SUMMARY = "Provides support for the Tag Image File Format (TIFF)" +LICENSE = "BSD-2-Clause" +LIC_FILES_CHKSUM = "file://COPYRIGHT;md5=34da3db46fab7501992f9615d7e158cf" + +CVE_PRODUCT = "libtiff" + +SRC_URI = "http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \ + file://libtool2.patch \ + " + +SRC_URI[md5sum] = "2a7d1c1318416ddf36d5f6fa4600069b" +SRC_URI[sha256sum] = "59d7a5a8ccd92059913f246877db95a2918e6c04fb9d43fd74e5c3390dac2910" + +# exclude betas +UPSTREAM_CHECK_REGEX = "tiff-(?P\d+(\.\d+)+).tar" + +inherit autotools + +CACHED_CONFIGUREVARS = "ax_cv_check_gl_libgl=no" + +PACKAGECONFIG ?= "cxx jpeg zlib lzma \ + strip-chopping extrasample-as-alpha check-ycbcr-subsampling" + +PACKAGECONFIG[cxx] = "--enable-cxx,--disable-cxx,," +PACKAGECONFIG[jpeg] = "--enable-jpeg,--disable-jpeg,jpeg," +PACKAGECONFIG[zlib] = "--enable-zlib,--disable-zlib,zlib," +PACKAGECONFIG[lzma] = "--enable-lzma,--disable-lzma,xz," + +# Convert single-strip uncompressed images to multiple strips of specified +# size (default: 8192) to reduce memory usage +PACKAGECONFIG[strip-chopping] = "--enable-strip-chopping,--disable-strip-chopping,," + +# Treat a fourth sample with no EXTRASAMPLE_ value as being ASSOCALPHA +PACKAGECONFIG[extrasample-as-alpha] = "--enable-extrasample-as-alpha,--disable-extrasample-as-alpha,," + +# Control picking up YCbCr subsample info. Disable to support files lacking +# the tag +PACKAGECONFIG[check-ycbcr-subsampling] = "--enable-check-ycbcr-subsampling,--disable-check-ycbcr-subsampling,," + +# Support a mechanism allowing reading large strips (usually one strip files) +# in chunks when using TIFFReadScanline. Experimental 4.0+ feature +PACKAGECONFIG[chunky-strip-read] = "--enable-chunky-strip-read,--disable-chunky-strip-read,," + +PACKAGES =+ "tiffxx tiff-utils" +FILES_tiffxx = "${libdir}/libtiffxx.so.*" +FILES_tiff-utils = "${bindir}/*" + +BBCLASSEXTEND = "native" -- cgit 1.2.3-korg