pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Nathan Bossart <nathandbossart@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Gurjeet Singh <gurjeet@singh.im>
Cc: Postgres Hackers <pgsql-hackers@postgresql.org>
Subject: Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
Date: Thu, 21 Jul 2022 16:48:32 -0700
Message-ID: <20220721234832.GA3815415@nathanxps13> (raw)
In-Reply-To: <348146.1658446220@sss.pgh.pa.us>
References: <CABwTF4XZvL4Mneo49MQZDBcRF+=8e2GOENViU3E-S9NGa8b90A@mail.gmail.com>
	<20220705174938.GB2566600@rfd.leadboat.com>
	<CABwTF4VEpwTHhRQ+q5MiC5ucngN-whN-PdcKeufX7eLSoAfbZA@mail.gmail.com>
	<335170.1658439851@sss.pgh.pa.us>
	<20220721222900.GA3813377@nathanxps13>
	<348146.1658446220@sss.pgh.pa.us>

On Thu, Jul 21, 2022 at 07:30:20PM -0400, Tom Lane wrote:
> Nathan Bossart <nathandbossart@gmail.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





view thread (25+ messages)  latest in thread

Message-ID: <20220721234832.GA3815415@nathanxps13>
Permalink:  ../20220721234832.GA3815415@nathanxps13/
Also on:    postgresql.org/message-id/20220721234832.GA3815415@nathanxps13

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: nathandbossart@gmail.com, tgl@sss.pgh.pa.us, gurjeet@singh.im
  Subject: Re: Fwd: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS
  In-Reply-To: <20220721234832.GA3815415@nathanxps13>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox