From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Christoph Berg <myon@debian.org>
Cc: PostgreSQL Hackers <pgsql-hackers@lists.postgresql.org>
Subject: Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
Date: Thu, 09 Jan 2020 17:02:18 -0500
Message-ID: <17448.1578607338@sss.pgh.pa.us> (raw)
In-Reply-To: <CAA8=A79goycZqfJVXsuCryFRJSvzx2LQ+C_gqXUty_RBp3VNqg@mail.gmail.com>
References: <f941b95e-27ad-cb5c-2495-13c44f90b1bc@2ndQuadrant.com>
<20200109103014.GA4192@msg.df7cb.de>
<CA+Tgmob9kmZt7RU+hd5AXWSphO1F9tFa2RNOiBiXSh-5VqP+-w@mail.gmail.com>
<CAA8=A79goycZqfJVXsuCryFRJSvzx2LQ+C_gqXUty_RBp3VNqg@mail.gmail.com>
Andrew Dunstan <andrew.dunstan@2ndquadrant.com> writes:
> On Fri, Jan 10, 2020 at 1:21 AM Robert Haas <robertmhaas@gmail.com> wrote:
>> I share the concern about the security issue here. I can't testify to
>> whether Christoph's whole analysis is here, but as a general point,
>> non-superusers can't be allowed to do things that cause the server to
>> access arbitrary local files.
> It's probably fairly easy to do (c.f. 6136e94dcb). I'm not (yet)
> convinced that there is any significant security threat here. This
> doesn't give the user or indeed any postgres code any access to the
> contents of these files. But if there is a consensus to restrict this
> I'll do it.
Well, even without access to the file contents, the mere ability to
probe the existence of a file is something we don't want unprivileged
users to have. And (I suppose) this is enough for that, by looking
at what error you get back from trying it.
regards, tom lane
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, andrew.dunstan@2ndquadrant.com, robertmhaas@gmail.com, myon@debian.org, pgsql-hackers@lists.postgresql.org
Subject: Re: Allow 'sslkey' and 'sslcert' in postgres_fdw user mappings
In-Reply-To: <17448.1578607338@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