From d9d3051169620f9c1e3aa6925d1ccd4a0e64004f Mon Sep 17 00:00:00 2001 From: "A. Wilcox" Date: Fri, 6 Jul 2018 02:21:21 -0500 Subject: user/tiff: pull in, take, fix --- user/tiff/APKBUILD | 75 ++++++++++++++++++++++++++++++++++++++++++ user/tiff/CVE-2017-18013.patch | 34 +++++++++++++++++++ 2 files changed, 109 insertions(+) create mode 100644 user/tiff/APKBUILD create mode 100644 user/tiff/CVE-2017-18013.patch (limited to 'user/tiff') diff --git a/user/tiff/APKBUILD b/user/tiff/APKBUILD new file mode 100644 index 000000000..f05bcbc2f --- /dev/null +++ b/user/tiff/APKBUILD @@ -0,0 +1,75 @@ +# Contributor: Sergei Lukin +# Contributor: Leonardo Arena +# Maintainer: A. Wilcox +pkgname=tiff +pkgver=4.0.9 +pkgrel=2 +pkgdesc="Library to read, create, and manipulate TIFF image files" +url="http://www.libtiff.org/" +arch="all" +license="MIT" +depends= +depends_dev="zlib-dev libjpeg-turbo-dev" +makedepends="libtool autoconf automake $depends_dev" +subpackages="$pkgname-doc $pkgname-dev $pkgname-tools" +source="http://download.osgeo.org/libtiff/$pkgname-$pkgver.tar.gz + CVE-2017-18013.patch + " +# secfixes: +# 4.0.9-r1: +# - CVE-2017-18013 +# 4.0.9-r0: +# - CVE-2017-16231 +# - CVE-2017-16232 +# 4.0.8-r1: +# - CVE-2017-9936 +# - CVE-2017-10688 +# 4.0.7-r2: +# - CVE-2017-7592 +# - CVE-2017-7593 +# - CVE-2017-7594 +# - CVE-2017-7595 +# - CVE-2017-7596 +# - CVE-2017-7598 +# - CVE-2017-7601 +# - CVE-2017-7602 +# 4.0.7-r1: +# - CVE-2017-5225 + +prepare() { + cd "$builddir" + update_config_sub + default_prepare +} + +build() { + cd "$builddir" + ./configure \ + --build=$CBUILD \ + --host=$CHOST \ + --prefix=/usr \ + --sysconfdir=/etc \ + --mandir=/usr/share/man \ + --infodir=/usr/share/info \ + --disable-cxx + make +} + +check() { + cd "$builddir" + make check +} + +package() { + cd "$builddir" + make DESTDIR="$pkgdir" install +} + +tools() { + pkgdesc="Command-line utility programs for manipulating TIFF files" + mkdir -p "$subpkgdir"/usr/ + mv "$pkgdir"/usr/bin "$subpkgdir"/usr/ +} + +sha512sums="04f3d5eefccf9c1a0393659fe27f3dddd31108c401ba0dc587bca152a1c1f6bc844ba41622ff5572da8cc278593eff8c402b44e7af0a0090e91d326c2d79f6cd tiff-4.0.9.tar.gz +2baa66963302ff51e34774d6e0703f769ba1ca7f527456ae13ea230af69280e024440390df9b5a51776fc29cb6d2d40713431a2c2d98f29e50e3f8f5a7f4d73b CVE-2017-18013.patch" diff --git a/user/tiff/CVE-2017-18013.patch b/user/tiff/CVE-2017-18013.patch new file mode 100644 index 000000000..5a1d90082 --- /dev/null +++ b/user/tiff/CVE-2017-18013.patch @@ -0,0 +1,34 @@ +From c6f41df7b581402dfba3c19a1e3df4454c551a01 Mon Sep 17 00:00:00 2001 +From: Even Rouault +Date: Sun, 31 Dec 2017 15:09:41 +0100 +Subject: [PATCH] libtiff/tif_print.c: TIFFPrintDirectory(): fix null pointer dereference on corrupted file. Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2770 + +--- + libtiff/tif_print.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/libtiff/tif_print.c b/libtiff/tif_print.c +index 9959d35..8deceb2 100644 +--- a/libtiff/tif_print.c ++++ b/libtiff/tif_print.c +@@ -665,13 +665,13 @@ TIFFPrintDirectory(TIFF* tif, FILE* fd, long flags) + #if defined(__WIN32__) && (defined(_MSC_VER) || defined(__MINGW32__)) + fprintf(fd, " %3lu: [%8I64u, %8I64u]\n", + (unsigned long) s, +- (unsigned __int64) td->td_stripoffset[s], +- (unsigned __int64) td->td_stripbytecount[s]); ++ td->td_stripoffset ? (unsigned __int64) td->td_stripoffset[s] : 0, ++ td->td_stripbytecount ? (unsigned __int64) td->td_stripbytecount[s] : 0); + #else + fprintf(fd, " %3lu: [%8llu, %8llu]\n", + (unsigned long) s, +- (unsigned long long) td->td_stripoffset[s], +- (unsigned long long) td->td_stripbytecount[s]); ++ td->td_stripoffset ? (unsigned long long) td->td_stripoffset[s] : 0, ++ td->td_stripbytecount ? (unsigned long long) td->td_stripbytecount[s] : 0); + #endif + } + } +-- +libgit2 0.26.0 + -- cgit v1.2.3-70-g09d2