Received: from malur.postgresql.org ([2a02:16a8:dc51::56]) by arkaria.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyNDg-0008HO-HY for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Sep 2018 20:19:08 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.89) (envelope-from ) id 1fyNDe-0002lB-0M for pgsql-bugs@arkaria.postgresql.org; Fri, 07 Sep 2018 20:19:06 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyNDd-0002l4-Mv for pgsql-bugs@lists.postgresql.org; Fri, 07 Sep 2018 20:19:05 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.89) (envelope-from ) id 1fyNDW-0003t0-RJ for pgsql-bugs@lists.postgresql.org; Fri, 07 Sep 2018 20:19:04 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.4/8.14.4) with ESMTP id w87KIt8D020017; Fri, 7 Sep 2018 16:18:56 -0400 From: Tom Lane To: Michael Paquier cc: Jeremy Evans , pgsql-bugs@lists.postgresql.org Subject: Re: BUG #15367: Crash in pg_fe_scram_free when using foreign tables In-reply-to: <20180907181522.GB32058@paquier.xyz> References: <153626613985.23143.4743626885618266803@wrigleys.postgresql.org> <20180906215836.GP2726@paquier.xyz> <20180906222843.GF17425@jeremyevans.local> <20180907165103.GH17425@jeremyevans.local> <20180907175518.GI17425@jeremyevans.local> <20180907181522.GB32058@paquier.xyz> Comments: In-reply-to Michael Paquier message dated "Fri, 07 Sep 2018 11:15:22 -0700" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <20015.1536351535.1@sss.pgh.pa.us> Date: Fri, 07 Sep 2018 16:18:55 -0400 Message-ID: <20016.1536351535@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Michael Paquier writes: > Thanks. This fails when freeing the password field in fe_scram_state. I had been studying that when the report first arrived. I'm not really happy with the coding in pg_saslprep(): it leaves garbage in its output parameter in some code paths, and I think it leaks memory in others. But I couldn't see a path that would lead to the observed failure. regards, tom lane