Re: Bugtraq: Having Fun With PostgreSQL

From: Stephen Frost <sfrost(at)snowman(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Gregory Stark <stark(at)enterprisedb(dot)com>, Andrew Hammond <andrew(dot)george(dot)hammond(at)gmail(dot)com>, Andrew Sullivan <ajs(at)crankycanuck(dot)ca>, pgsql-hackers(at)postgresql(dot)org
Subject: Re: Bugtraq: Having Fun With PostgreSQL
Date: 2007-06-26 21:30:21
Message-ID: 20070626213021.GJ7531@tamriel.snowman.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

* Tom Lane (tgl(at)sss(dot)pgh(dot)pa(dot)us) wrote:
> Gregory Stark <stark(at)enterprisedb(dot)com> writes:
> > All that really has to happen is that dblink should by default not be
> > callable by any user other than Postgres.
>
> Yeah, that is not an unreasonable change. Someone suggested it far
> upthread, but we seem to have gotten distracted :-(

Indeed, I know I did, though I think there were others also. :)

> > The only problem with this is that dblink provides 36 different functions
>
> I think just having the install script revoke public execute access
> on the connection-establishing functions would be sufficient. There
> are only two of 'em.

Agreed. We might want to mention this issue in the documentation
somewhere also, though I'm not really sure where. :/ Basically:

"Be very careful with functions which allow a user to make a remote
connection (eg: dblink). When ident is used as an authentication
mechanism it may be possible for a regular user to gain superuser
priviledges. Functions run in the database backend, which runs as
the OS user the backend was started under. Therefore, connections from
the database backend will be authenticated as the OS user the backend
was started under would be- which using ident generally means a
password-less connection to the database superuser account by means of a
local filesystem socket."

Thanks,

Stephen

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Gregory Stark 2007-06-26 21:43:24 Re: Bugtraq: Having Fun With PostgreSQL
Previous Message Greg Smith 2007-06-26 21:27:16 Re: Bgwriter LRU cleaning: we've been going at this all wrong