pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Nathan Bossart <nathandbossart@gmail.com>
Cc: pgsql-hackers@postgresql.org <pgsql-hackers@postgresql.org>
Subject: Re: allow building trusted languages without the untrusted versions
Date: Mon, 23 May 2022 18:42:48 -0400
Message-ID: <1354561.1653345768@sss.pgh.pa.us> (raw)
In-Reply-To: <CA+TgmoYZKLxftaZZvj4_-zHQ27CBeUs+KvggyU3qS79-7aQEPA@mail.gmail.com>
References: <20220520225619.GA876272@nathanxps13>
	<571753.1653092411@sss.pgh.pa.us>
	<20220523165403.GC938919@nathanxps13>
	<1290329.1653326228@sss.pgh.pa.us>
	<CA+TgmoY-Xy_ObfYVUTSamD8BmW8npaktbr65JtnkW-c1VQobVA@mail.gmail.com>
	<1333860.1653338790@sss.pgh.pa.us>
	<CA+TgmoYZKLxftaZZvj4_-zHQ27CBeUs+KvggyU3qS79-7aQEPA@mail.gmail.com>

Robert Haas <robertmhaas@gmail.com> writes:
> It's not just a question of whether it was meant to be SQL-callable --
> it's also a question of what arguments it was expecting to be called
> with. At the very least, you can cause the server to core dump if you
> pass something that isn't a valid pointer to a function that is
> expecting a pointer, which is something a CSP very likely does not
> want a customer to be able to do. I think, however, that there's every
> possibility that you can create more havoc than that. You can
> basically call a function that's expecting a pointer with a pointer to
> anything you can find or guess the memory address of. Maybe that's not
> enough control to cause anything worse than a server crash, but I sure
> wouldn't bet on it. There's a lot of functions floating around, and if
> none of them can be tricked into doing filesystem access today, well
> someone might add a new one tomorrow.

[ shrug... ]  So is your point that we shouldn't bother to do anything?
I don't personally have a problem with leaving things where they stand
in this area.  However, if we're going to do something, I think at
minimum it should involve blocking off everything we can identify as
straightforward reproducible methods to get disk access.

			regards, tom lane





view thread (35+ messages)  latest in thread

Message-ID: <1354561.1653345768@sss.pgh.pa.us>
Permalink:  ../1354561.1653345768@sss.pgh.pa.us/
Also on:    postgresql.org/message-id/1354561.1653345768@sss.pgh.pa.us

 · 

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: tgl@sss.pgh.pa.us, robertmhaas@gmail.com, nathandbossart@gmail.com
  Subject: Re: allow building trusted languages without the untrusted versions
  In-Reply-To: <1354561.1653345768@sss.pgh.pa.us>

* 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