lkml.org 
[lkml]   [1998]   [Jan]   [9]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: Security Anti Symlink Attack Patch for 2.1.71
Date
  Christoph Lameter <chris@waterf.org> writes:
>
> without any complaints by the kernel. Then if root tries to write to a
> file in /tmp that has been redirected with a user symlink, a permission
> denied results and the script to be run by root fails. Not good.
>
But that is easy to fix; instead of returning EPERM, delete the symlink (if
the file is opened with O_CREAT) and proceed normally.

> 1. They cannot be absolute (i.e. they cannot begin with /)
> 2. They are not allowed to point to a higher directory
IMHO that is too complicated. The rule "only follow your own symlinks in
"sticky" directories" is easy, and I cannot think of any program which
would require different behavior.

> And maybe the functionality should be switchable on and off by writing to
> a file in /proc/sys/kernel/xxxx ?
>
Yep. But IMHO it is overkill to specify that on a per-directory basis.
Per filesystem, maybe, as a mount option (NFS does not support any special
EXT2 options we might want to invent).

--
Matthias Urlichs
noris network GmbH

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