Return-Path: <awaresystems.be+caf_=filtered=awaresystems.be@gmail.com>
Delivered-To: filtered@awaresystems.be
Received: from mx8.public.one.com ([10.246.18.28])
	by mail6.local.one.com (Dovecot) with LMTP id T1RND2oSalnAlwEAsyOMew
	for <filtered@awaresystems.be>; Sat, 15 Jul 2017 13:24:36 +0000
X-HalOne-ID: f056a2e4-6960-11e7-9c48-549f350a57e2
Received: from mail-oi0-f47.google.com (unknown [209.85.218.47])
	by mx8.public.one.com (Halon) with ESMTPS
	id f056a2e4-6960-11e7-9c48-549f350a57e2;
	Sat, 15 Jul 2017 13:24:33 +0000 (UTC)
Received: by mail-oi0-f47.google.com with SMTP id x187so90086086oig.3
        for <filtered@awaresystems.be>; Sat, 15 Jul 2017 06:24:33 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
        d=1e100.net; s=20161025;
        h=x-original-authentication-results:x-gm-message-state:delivered-to
         :from:to:date:message-id:user-agent:in-reply-to:references
         :mime-version:subject:precedence:list-id:list-unsubscribe
         :list-archive:list-post:list-help:list-subscribe:mime-version:sender
         :errors-to;
        bh=N0SuFupdOwLrOT2qyLO6xdT4YmOrorBYVru6Sopj4sc=;
        b=RFiX/S2bkWkFvpY8trUofOSn3gi0hxljQaeuFtFoyYkgtGZwf5zbtS120igkV8ga3Z
         uA/Nn2lq5zLU2LxPdua2UmQZqp+q9xWyQgw0KIOmsQbICErpyEsSCYf2YYhF9zcXhRQR
         6vqV+u1vJvBi8nq3R2ZwQy6G4cv/npCKqgq3Qlj9ShfXaduSjlxz7Sziiyyk4tNJe7pH
         Q4i1w4F7VwNc34fPumHLjChzEmtrybZ09cgwS7VmxF2s5RItuqZzb8SelsXsIa5lOAs6
         HhpoAlyCVb/UfS7y/2+O0LsKn1bzGmOlj8XeDjGpa9HvFaKXGWqIPffzmcecNN1davGr
         Srcg==
X-Original-Authentication-Results: mx.google.com;       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
X-Gm-Message-State: AIVw113t/J9D+Vr0aLFxKtVSIy1bH4+wzxQYN9h37C48fepbb7qJTmrl
	yatqzNve/yZKKOJVQEcyHoDUgn9/IiXnIA95pSEH3g==
X-Received: by 10.202.89.10 with SMTP id n10mr7458610oib.95.1500125072251;
        Sat, 15 Jul 2017 06:24:32 -0700 (PDT)
X-Forwarded-To: filtered@awaresystems.be
X-Forwarded-For: awaresystems.be@gmail.com filtered@awaresystems.be
Delivered-To: awaresystems.be@gmail.com
Received: by 10.202.64.84 with SMTP id n81csp2109095oia;
        Sat, 15 Jul 2017 06:24:30 -0700 (PDT)
X-Received: by 10.223.139.70 with SMTP id v6mr6678946wra.97.1500125070689;
        Sat, 15 Jul 2017 06:24:30 -0700 (PDT)
ARC-Seal: i=1; a=rsa-sha256; t=1500125070; cv=none;
        d=google.com; s=arc-20160816;
        b=FeWJ3PN+djjNTwsyw8W9Fy7YAfERM27q9Us0OE4SEy6mCSB8Zyc6VA4o3RbXe8qe1F
         CGGeqJYNq/pBTSC/G2BPyc7dKxBHQup6FmzG+2Pn8kMhjp+VKGazt9QCzNG+fuOjwwr3
         sdppfr1SwuZaVcjgSHkKetVnA5/1Q9X1U+9cE8hxqWp3+1kWFghYoQ4TzoeCwIfNHqKG
         LeoL8wfZ3zWn34tJi0CLrHS2P2OG57e3lRDWIob+Kuhf+sU6wCzdzrjRCH3+Hu3n9NDV
         9k62+jr7Z4FULq2QIupfYi68lW6mAupBUW16tyi4uN2XJz5x8q0lROUjfermMr0b4ZAL
         yUWQ==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816;
        h=errors-to:sender:mime-version:list-subscribe:list-help:list-post
         :list-archive:list-unsubscribe:list-id:precedence:subject
         :mime-version:references:in-reply-to:user-agent:message-id:date:to
         :from:arc-authentication-results;
        bh=N0SuFupdOwLrOT2qyLO6xdT4YmOrorBYVru6Sopj4sc=;
        b=boYbHtnEv/RMFidxbhhfBay/o+zDG/4fMgIboPPjDQ3VuJ2AZt1Rpd43mHW6E+QgMw
         bFywQMBTz3ROvH5SDuCPCywbfsP6l11qoEytAA02xm9G+N2nKywQytGKE69DPU8SPTko
         W9a4Kw/ljRtmcIjQhVN+wZblHhGxnbtBuH5A+oeOGpJ2N2svR1XF9TVou17gIhs/1skx
         CmaORpOH5ehvsChfzxv1o5lLoBuNKI57klhEEuh6yWIkyJmDUPbU+DX2++i/4UZhR/bQ
         Sy2fWvGoXhXXsTvzw04y45HC71vZJwro8M2ObLMp+Lca4kysLJm5E92xDa0ZYK1Xvwz0
         sUhA==
ARC-Authentication-Results: i=1; mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Return-Path: <tiff-bounces@lists.maptools.org>
Received: from lists.maptools.org (ks365428.kimsufi.com. [94.23.4.142])
        by mx.google.com with ESMTP id p64si5010491wma.190.2017.07.15.06.24.30;
        Sat, 15 Jul 2017 06:24:30 -0700 (PDT)
Received-SPF: neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) client-ip=94.23.4.142;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 94.23.4.142 is neither permitted nor denied by best guess record for domain of tiff-bounces@lists.maptools.org) smtp.mailfrom=tiff-bounces@lists.maptools.org
Received: from [10.1.0.241] (localhost.localdomain [127.0.0.1])
	by lists.maptools.org (Postfix) with ESMTP id CE6BD35C030;
	Sat, 15 Jul 2017 08:23:05 -0500 (EST)
Received: from smtp5-g21.free.fr (smtp5-g21.free.fr [212.27.42.5])
	by lists.maptools.org (Postfix) with ESMTPS id E1CD935C02D
	for <tiff@lists.maptools.org>; Sat, 15 Jul 2017 08:20:48 -0500 (EST)
Received: from even-i700.localnet (unknown [78.233.66.187])
	(Authenticated sender: even.rouault)
	by smtp5-g21.free.fr (Postfix) with ESMTPSA id 1082C5FFAA
	for <tiff@lists.maptools.org>; Sat, 15 Jul 2017 15:20:46 +0200 (CEST)
From: Even Rouault <even.rouault@spatialys.com>
To: tiff@lists.maptools.org
Date: Sat, 15 Jul 2017 15:20:46 +0200
Message-ID: <2245758.8IO8nFeoKr@even-i700>
User-Agent: KMail/5.1.3 (Linux/4.4.0-83-generic; KDE/5.18.0; x86_64; ; )
In-Reply-To: <2644347.OAbtANbETx@even-i700>
References: <2644347.OAbtANbETx@even-i700>
MIME-Version: 1.0
Subject: Re: [Tiff] Need for still supporting truncated
	StripByteCount/StripOffsets tag ?
X-BeenThere: tiff@lists.maptools.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: TIFF and libtiff discussion <tiff.lists.maptools.org>
List-Unsubscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=unsubscribe>
List-Archive: <http://lists.maptools.org/mailman/private/tiff>
List-Post: <mailto:tiff@lists.maptools.org>
List-Help: <mailto:tiff-request@lists.maptools.org?subject=help>
List-Subscribe: <http://lists.maptools.org/mailman/listinfo/tiff>,
	<mailto:tiff-request@lists.maptools.org?subject=subscribe>
Content-Type: multipart/mixed; boundary="===============0656530108=="
Mime-version: 1.0
Sender: tiff-bounces@lists.maptools.org
Errors-To: tiff-bounces@lists.maptools.org

This is a multi-part message in MIME format.

--===============0656530108==
Content-Type: multipart/alternative; boundary="nextPart3840055.4f8DvuZRBC"
Content-Transfer-Encoding: 7Bit

This is a multi-part message in MIME format.

--nextPart3840055.4f8DvuZRBC
Content-Transfer-Encoding: 7Bit
Content-Type: text/plain; charset="us-ascii"

> I'd be in favor of removing that capability, or perhaps limiting this up to
> a not so big number of tiles (let's say 1 million, with a warning stating
> this is an invalid file. And beyond that, error out with an error message)

I went on implementing this per

2017-07-15  Even Rouault <even.rouault at spatialys.com>

        * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the
        arrays that hold StripOffsets/StripByteCounts, when they are smaller
        than the expected number of striles, up to 1 million striles, and
        error out beyond. Can be tweaked by setting the environment variable
        LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT.
        This partially goes against a change added on 2002-12-17 to accept
        those arrays of wrong sizes, but is needed to avoid denial of services.
        Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350
        Credit to OSS Fuzz

/cvs/maptools/cvsroot/libtiff/ChangeLog,v  <--  ChangeLog
new revision: 1.1272; previous revision: 1.1271
/cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v  <--  libtiff/tif_dirread.c
new revision: 1.214; previous revision: 1.213

Even

-- 
Spatialys - Geospatial professional services
http://www.spatialys.com

--nextPart3840055.4f8DvuZRBC
Content-Transfer-Encoding: 7Bit
Content-Type: text/html; charset="us-ascii"

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0//EN" "http://www.w3.org/TR/REC-html40/strict.dtd">
<html><head><meta name="qrichtext" content="1" /><style type="text/css">
p, li { white-space: pre-wrap; }
</style></head><body style=" font-family:'Sans Serif'; font-size:9pt; font-weight:400; font-style:normal;">
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; I'd be in favor of removing that capability, or perhaps limiting this up to</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; a not so big number of tiles (let's say 1 million, with a warning stating</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">&gt; this is an invalid file. And beyond that, error out with an error message)</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">I went on implementing this per</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">2017-07-15  Even Rouault &lt;even.rouault at spatialys.com&gt;</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        * libtiff/tif_read.c: in TIFFFetchStripThing(), only grow the</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        arrays that hold StripOffsets/StripByteCounts, when they are smaller</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        than the expected number of striles, up to 1 million striles, and</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        error out beyond. Can be tweaked by setting the environment variable</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        LIBTIFF_STRILE_ARRAY_MAX_RESIZE_COUNT.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        This partially goes against a change added on 2002-12-17 to accept</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        those arrays of wrong sizes, but is needed to avoid denial of services.</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        Fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=2350</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">        Credit to OSS Fuzz</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">/cvs/maptools/cvsroot/libtiff/ChangeLog,v  &lt;--  ChangeLog</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">new revision: 1.1272; previous revision: 1.1271</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">/cvs/maptools/cvsroot/libtiff/libtiff/tif_dirread.c,v  &lt;--  libtiff/tif_dirread.c</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">new revision: 1.214; previous revision: 1.213</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Even</p>
<p style="-qt-paragraph-type:empty; margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; ">&nbsp;</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">-- </p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">Spatialys - Geospatial professional services</p>
<p style=" margin-top:0px; margin-bottom:0px; margin-left:0px; margin-right:0px; -qt-block-indent:0; text-indent:0px; -qt-user-state:0;">http://www.spatialys.com</p></body></html>
--nextPart3840055.4f8DvuZRBC--


--===============0656530108==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
Tiff mailing list: Tiff@lists.maptools.org
http://lists.maptools.org/mailman/listinfo/tiff
http://www.remotesensing.org/libtiff/
--===============0656530108==--
