Re: logfile subprocess and Fancy File Functions

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: logfile subprocess and Fancy File Functions
Дата
Msg-id
28684.1090620901@sss.pgh.pa.us
Ответ на
Список
Дерево обсуждения
logfile subprocess and Fancy File Functions Andreas Pflug <pgadmin@pse-consulting.de>
Re: logfile subprocess and Fancy File Functions Andreas Pflug <pgadmin@pse-consulting.de>
Re: logfile subprocess and Fancy File Functions Bruce Momjian <pgman@candle.pha.pa.us>
Re: logfile subprocess and Fancy File Functions Andreas Pflug <pgadmin@pse-consulting.de>
Re: logfile subprocess and Fancy File Functions Bruce Momjian <pgman@candle.pha.pa.us>
Re: logfile subprocess and Fancy File Functions Peter Eisentraut <peter_e@gmx.net>
Re: logfile subprocess and Fancy File Functions Bruce Momjian <pgman@candle.pha.pa.us>
Re: logfile subprocess and Fancy File Functions Peter Eisentraut <peter_e@gmx.net>
Re: logfile subprocess and Fancy File Functions Bruce Momjian <pgman@candle.pha.pa.us>
Re: logfile subprocess and Fancy File Functions Andreas Pflug <pgadmin@pse-consulting.de>
Bruce Momjian  writes:
> Tom Lane wrote:
>> As for the analogy to COPY, the addition of unlink/rename to a hacker's
>> tool set renders the situation far more dangerous than if he only has
>> write.  Write will not allow him to hack write-protected files, but he
>> might be able to rename them out of the way and create new trojaned
>> versions...

> Yes, I realized that later, that rename/unlink is based on the directory
> permissions, not the file permissions.  That is clearly a new capability
> that could be seen as opening a new door.

> However, file creation via COPY is based on the directory permissions
> too.

Right, but the point is that a write-protected file in a writable
directory is not vulnerable to an attacker armed only with write().
If he can do rename() or delete() then it *is* vulnerable.  This is
quite relevant to Postgres seeing that it's hardly practical to
make the $PGDATA directory non-writable to the postmaster, while one
might well think it worthwhile to make pg_hba.conf non-writable.

			regards, tom lane
В списке pgsql-patches по дате отправления
От: Bruce Momjian
Дата:
От: Tom Lane
Дата:
FAQ