Re: Why are absolute paths considered a security risk? - Mailing list pgsql-general

From Tom Lane
Subject Re: Why are absolute paths considered a security risk?
Date
Msg-id 25797.1046219481@sss.pgh.pa.us
Whole thread Raw
In response to Why are absolute paths considered a security risk?  (Hadley Willan <hadley.willan@deeperdesign.co.nz>)
Responses Re: Why are absolute paths considered a security risk?
List pgsql-general
Hadley Willan <hadley.willan@deeperdesign.co.nz> writes:
> The documentation (7.2.1) mentions that allowing absolute paths when
> creating a db is a security risk and is off by default.
> However, it seems fairly hard to exploit, and I was wondering if anybody
> has any examples of how much of a risk this is?
> Reason I ask is we're considering turning them on in our server and want
> to consider these risks.

The difficulty is that someone who is allowed to create databases (but
isn't necessarily a superuser) will be able to cause the backend to
scribble in any directory that the postgres user has write access to.
The potential damage is somewhat limited since "base/DBOID" gets tacked
onto the user-specified string, and the user has little if any control
over the DBOID part.  Still, it's a risk.

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: 7.4?
Next
From: "Cristian Custodio"
Date:
Subject: OID or lo