Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZSD7-0008Ly-Qh for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Nov 2020 05:16:53 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kZSD6-00060p-Cb for pgsql-bugs@arkaria.postgresql.org; Mon, 02 Nov 2020 05:16:52 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZSD6-00060i-6u for pgsql-bugs@lists.postgresql.org; Mon, 02 Nov 2020 05:16:52 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kZSD3-0007cE-U3 for pgsql-bugs@lists.postgresql.org; Mon, 02 Nov 2020 05:16:51 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0A25GjSF592337; Mon, 2 Nov 2020 00:16:45 -0500 From: Tom Lane To: Andrey Borodin cc: tvijlbrief@gmail.com, pgsql-bugs@lists.postgresql.org, Tomas Vondra Subject: Re: BUG #16694: Server hangs in 100% CPU loop when decompressing a specific TOAST Postgis linestring In-reply-to: References: <16694-f107871e499ec114@postgresql.org> <543595.1604267856@sss.pgh.pa.us> <578150.1604274357@sss.pgh.pa.us> Comments: In-reply-to Andrey Borodin message dated "Mon, 02 Nov 2020 10:02:40 +0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <592335.1604294205.1@sss.pgh.pa.us> Date: Mon, 02 Nov 2020 00:16:45 -0500 Message-ID: <592336.1604294205@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Andrey Borodin writes: > I'm not sure protection from corrupt input is complete within pglz. We > still do not protect from matches with offsets before source data. Yeah, I was wondering about that. Not quite sure it's worth adding cycles to defend against though. I don't buy the "security" aspect, since there's no plausible route for an attacker to inject corrupted compressed data unless they already have full access to the database. The "maybe core dump" argument is a bit stronger, but not very much so. regards, tom lane