Re: file_fdw target file ownership
От | Andres Freund |
---|---|
Тема | Re: file_fdw target file ownership |
Дата | |
Msg-id | 20130909195812.GE841236@alap2.anarazel.de обсуждение исходный текст |
Ответ на | Re: file_fdw target file ownership ("Daniel Vérité" <daniel.verite@gmail.com>) |
Ответы |
Re: file_fdw target file ownership
Re: file_fdw target file ownership |
Список | pgsql-hackers |
On 2013-09-09 21:41:00 +0200, Daniel Vérité wrote: > Tom Lane writes: > > > Andres Freund <andres@2ndquadrant.com> writes: > > > > One would be to use open(O_NOFOLLOW)? > > > > That would only stop symlink attacks, not hardlink variants; > > and it'd probably stop some legitimate use-cases too. > > The creation of the hardlink is denied by the OS based on the > attacker not having sufficient permissions to the target file. > In principle the mentioned loophole is limited to a symlink, which > is not restricted at create time. It only requires search privileges, doesn't it? andres@alap2:~$ ln /etc/shadow /tmp/frak andres@alap2:~$ cat /tmp/frak cat: /tmp/frak: Permission denied andres@alap2:~$ ls -l /tmp/frak -rw-r----- 2 root shadow 1652 Jun 4 22:05 /tmp/frak There are patches around preventing that kind of thing, but they aren't too widespread yet. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services
В списке pgsql-hackers по дате отправления: