[lkml]   [1996]   [Oct]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: [linux-security] Re: t bit and symlinks patch
Igor wrote:
> I apologize if my comment is incorrect, but as I understand, you do
> the following: if the directory has bit 't' set and the user does not
> own the file that the symlink points to, your patch does not allow to
> follow the symlink.

No, not quite. The decision is made on whether the user owns the
symlink, not if they own the file that it points at.

Luckily Linux does have the concept of the owner of a
symlink. Apparently BSD4.4 doesn't have this concept so they would
need a different approach to this problem.

> Suppose that I am a hacker on a system with your patch applied. Suppose
> my goal is to create a symlink from /tmp/abc to /.rhosts (for example).
> That is, I would like to
> $ ln -fs /.rhosts /tmp/abc
> Since you do not allow me to do that, I do the following:
> $ ln -fs /.rhosts $HOME/xyz
> $ ln -fs $HOME/xyz /tmp/abc
> Wouldn't that fool your function?

No, because the symlink will be owned by you, so root (and other
users) won't follow it. It doesn't matter what file it points at.


 \ /
  Last update: 2005-03-22 13:38    [W:0.046 / U:0.804 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site