Re: pg_amcheck option to install extension

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Mark Dilger <mark(dot)dilger(at)enterprisedb(dot)com>
Cc: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Andrew Dunstan <andrew(at)dunslane(dot)net>, Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: pg_amcheck option to install extension
Date: 2021-04-20 03:06:55
Message-ID: YH5FT37FKRcLEpus@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, Apr 19, 2021 at 07:15:23PM -0700, Mark Dilger wrote:
> There is another issue to consider. Installing pg_amcheck in no way
> opens up an avenue of attack that I can see. It is just a client
> application with no special privileges. But installing amcheck
> arguably opens a line of attack; not one as significant as
> installing pageinspect, but of the same sort. Amcheck allows
> privileged database users to potentially get information from the
> tables that would otherwise be invisible even to them according to
> mvcc rules. (Is this already the case via some other functionality?
> Maybe this security problem already exists?) If the privileged
> database user has file system access, then this is not at all
> concerning, since they can already just open the files in a tool of
> their choice, but I don't see any reason why installations should
> require that privileged database users also be privileged to access
> the file system.

By default, any functions deployed with amcheck have their execution
rights revoked from public, meaning that only a superuser can run them
with a default installation. A non-superuser could execute them only
once GRANT'd access to them.
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Thomas Munro 2021-04-20 03:07:16 Re: Bogus collation version recording in recordMultipleDependencies
Previous Message Amit Langote 2021-04-20 03:06:44 Re: Forget close an open relation in ReorderBufferProcessTXN()