lkml.org 
[lkml]   [2003]   [Jun]   [29]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [RFC][PATCH-2.4] Prevent mounting on ".."
On Sun, Jun 29, 2003 at 04:20:47PM +0200, Willy TARREAU wrote:
> No, it works only with "..", and not with "." ! I don't know why, I believe
> it's because the process is still attached to the old FS when mounting on ".".

So? chdir around and you'll get to the covering directory.

> > If attacker can mount of chroot - you've LOST. Already. End of story.
>
> To me, it seems this is the *only* remaining case in an *empty* read-only
> directory. The fact is that the attacker needs at least a mount point to mount
> something. Not providing him one is efficient, but here he can only exploit
> "..".
>
> Please reconsider the question, Al, because I really think that with this, we
> can get reliable jails for network daemons which don't need file access at all.

Sigh... We _can't_ do that via chroot(). Please, stop fooling yourself -
if attacker gets control over root process, the fight is over. In particular,
attacker can chmod your read-only directory and/or remount the thing.
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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