Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

From: Nathan Bossart <nathandbossart(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gurjeet Singh <gurjeet(at)singh(dot)im>, Postgres Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
Date: 2022-07-21 23:48:32
Message-ID: 20220721234832.GA3815415@nathanxps13
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Thu, Jul 21, 2022 at 07:30:20PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart(at)gmail(dot)com> writes:
>> + StartTransactionCommand();
>> process_session_preload_libraries();
>> + CommitTransactionCommand();
>
> Yeah, that way would avoid any questions about changing the order of
> operations, but it seems like a mighty expensive solution: it's
> adding a transaction to each backend start on the off chance that
> (a) session_preload_libraries/local_preload_libraries is nonempty and
> (b) the loaded libraries are going to do anything where it'd matter.
> So that's why I thought of moving the call inside a pre-existing
> transaction.
>
> If we had to back-patch this into any released versions, I'd agree with
> taking the performance hit in order to reduce the chance of side-effects.
> But I think as long as we only have to do it in v15, it's not too late to
> possibly cause some compatibility issues for extensions.

Yeah, fair point.

--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Kyotaro Horiguchi 2022-07-22 00:20:37 Re: standby recovery fails (tablespace related) (tentative patch and discussion)
Previous Message Gurjeet Singh 2022-07-21 23:37:40 Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS