Re: BUG #19092: scram_free() will free on address which was not malloc()-ed in pg_scram_mech

Michael Paquier <michael@paquier.xyz>

From: Michael Paquier <michael@paquier.xyz>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Daniel Gustafsson <daniel@yesql.se>, 13952878799@163.com, pgsql-bugs@lists.postgresql.org
Date: 2025-10-23T00:29:19Z
Lists: pgsql-bugs
On Tue, Oct 21, 2025 at 11:06:19AM -0400, Tom Lane wrote:
> We'd really need to see a concrete example to decide whether this is
> a PG bug or user error.  I think the SASL stuff is sufficiently poorly
> tested that it could be a previously-unknown PG bug, but it's not clear.

[ .. double-checking the code .. ]

FWIW, I doubt that this is something we need to worry about and I
suspect that there is no action item here.  dblink and WAL receivers
do their stuff so as the main backend code does not link with libpq,
and I doubt that we'd ever want to enter in the territory where
FRONTEND becomes a thing in libpq.

Of course, I may prove wrong.

> So: test case, please.

Yes.
--
Michael