Re: [patch] fix dblink security hole - Mailing list pgsql-hackers

From Marko Kreen
Subject Re: [patch] fix dblink security hole
Date
Msg-id e51f66da0809211343l30af8c30ue21c1dd686c9db96@mail.gmail.com
Whole thread Raw
In response to Re: [patch] fix dblink security hole  (Joe Conway <mail@joeconway.com>)
Responses Re: [patch] fix dblink security hole  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On 9/21/08, Joe Conway <mail@joeconway.com> wrote:
> Marko Kreen wrote:
> > You need to ignore pg_service also.  (And PGPASSWORD)
>
>  Why? pg_service does not appear to support wildcards, so what is the attack
> vector?

"service=foo host=custom"

>  And on PGPASSWORD, the fine manual says the following:
>
>   PGPASSWORD sets the password used if the server demands password
>   authentication. Use of this environment variable is not recommended
>   for security reasons (some operating systems allow non-root users to
>   see process environment variables via ps); instead consider using the
>   ~/.pgpass file (see Section 30.13).

That does not mean it's OK to handle it insecurely.

If you want to solve the immediate problem with hack, then the cleanest
hack would be "no-external-sources-for-connection-details"-hack.

Leaving the less probable paths open is just sloppy attitude.

>  At the moment the only real issue I can see is .pgpass when wildcards are
> used for hostname:port:database.

Well, the real issue is that lusers are allowed to freely launch
connections, that's the source for all the other problems.

-- 
marko


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Assert Levels
Next
From: Greg Smith
Date:
Subject: Re: Assert Levels