Re: allow building trusted languages without the untrusted versions - Mailing list pgsql-hackers

From Tom Lane
Subject Re: allow building trusted languages without the untrusted versions
Date
Msg-id 1978948.1653503311@sss.pgh.pa.us
Whole thread Raw
In response to Re: allow building trusted languages without the untrusted versions  (Stephen Frost <sfrost@snowman.net>)
Responses Re: allow building trusted languages without the untrusted versions  (Stephen Frost <sfrost@snowman.net>)
Re: allow building trusted languages without the untrusted versions  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Stephen Frost <sfrost@snowman.net> writes:
> I really don't think this is going to be anywhere near as
> straight-forward as it might appear to be to prevent a superuser from
> being able to break out of PG.

This gets back to the point I made before about it not being worthwhile
to implement half-measures.  There is a whole lot of history and code
details associated with the presumption that superuser gives you OS
access, and I'm certainly prepared to believe that turning that off
is a fool's errand.

Perhaps a better answer for providers who need something like this
is to sandbox the Postgres server using OS-provided facilities.

> Instead, we should be moving in the
> direction of making it so that there doesn't need to be a superuser
> that's ever logged into except under serious emergency situations where
> the system is built to require multi-person access to do so.

I'm a little skeptical that our present design direction really moves
the needle very far in this area.  We've sliced and diced superuser
aplenty, but that doesn't make individual capabilities such as
pg_write_all_data or ALTER SYSTEM any less dangerous from the standpoint
of someone trying to prevent breaking out.

            regards, tom lane



pgsql-hackers by date:

Previous
From: Stephen Frost
Date:
Subject: Re: allow building trusted languages without the untrusted versions
Next
From: Stephen Frost
Date:
Subject: Re: allow building trusted languages without the untrusted versions