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 1krpaM-0007AG-Vk for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2020 21:52:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1krpaL-00023O-V5 for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2020 21:52:49 +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 1krpaL-00023H-Oe for pgsql-hackers@lists.postgresql.org; Tue, 22 Dec 2020 21:52:49 +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 1krpaJ-0003am-QW for pgsql-hackers@lists.postgresql.org; Tue, 22 Dec 2020 21:52:49 +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 0BMLqfFS662166; Tue, 22 Dec 2020 16:52:41 -0500 From: Tom Lane To: Robert Haas cc: Tomas Vondra , Andrey Borodin , Daniil Zakhlystov , Konstantin Knizhnik , Denis Smirnov , PostgreSQL Hackers Subject: Re: libpq compression In-reply-to: <654473.1608669987@sss.pgh.pa.us> References: <612f227d-cb27-9238-5922-1500f8b2eb96@postgrespro.ru> <160623927937.7563.15974279758478581796.pgcf@coridan.postgresql.org> <6811D196-E2FB-40CC-B1C9-F19427FBF675@yandex-team.ru> <93027ee4-fefa-a8ca-2cc7-245c912bf824@postgrespro.ru> <62527092-16BD-479F-B503-FA527AF3B0C2@yandex-team.ru> <579f308e-c46c-2e79-3f90-9846450a3d71@enterprisedb.com> <626075.1608663785@sss.pgh.pa.us> <1! ! f76b4b8-3bff-17af-ef63-872190411a60@enterprisedb.com> <630701.1608665602@sss.pgh.pa.us> <654473.1608669987@sss.pgh.pa.us> Comments: In-reply-to Tom Lane message dated "Tue, 22 Dec 2020 15:46:27 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <662164.1608673961.1@sss.pgh.pa.us> Date: Tue, 22 Dec 2020 16:52:41 -0500 Message-ID: <662165.1608673961@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk I wrote: > Robert Haas writes: >> But there is a privilege boundary between the sender and the receiver. >> What's alleged here is that the sender can do a thing which causes the >> receiver to burn through tons of memory. It doesn't help anything to >> say, well, the sender ought to use a window size of N or less. What if >> they don't? > The receiver rejects the data as though it were corrupt. (Having said that, I don't know whether it's possible for the user of libzstd to specify such behavior. But if it isn't, that's a CVE-worthy problem in libzstd.) regards, tom lane