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 03:09:52PM +0200, Willy TARREAU wrote:
> chroot("/var/empty") (read-only directory or file-system)
> chdir("/")
> listen(), accept(), fork(), whatever...
> -> external code injection from a cracker :
> mount("none", "..", "ramfs")
> mkdir("../mydir")
> chdir("../mydir")
> the cracker now installs whatever he wants here.

That's a BS. Same effect would be achieved by replacing ".." with ".".
Or mounting on any existing subdirectory.

If attacker can mount of chroot - you've LOST. Already. End of story.
-
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:40    [W:0.065 / U:1.220 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site