[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAJfpegtT7y-1HhbEVAMKkdQugTG_w7G_epGtQHGvQLpcZB5FVA@mail.gmail.com>
Date: Thu, 15 Aug 2013 11:29:01 +0200
From: Miklos Szeredi <miklos@...redi.hu>
To: "Eric W. Biederman" <ebiederm@...ssion.com>
Cc: "Serge E. Hallyn" <serge@...lyn.com>,
Al Viro <viro@...iv.linux.org.uk>,
Linux-Fsdevel <linux-fsdevel@...r.kernel.org>,
Kernel Mailing List <linux-kernel@...r.kernel.org>,
Andy Lutomirski <luto@...capital.net>
Subject: Re: DoS with unprivileged mounts
On Thu, Aug 15, 2013 at 8:45 AM, Eric W. Biederman
<ebiederm@...ssion.com> wrote:
> Part of me does prefer the semantics Andy has suggested where instead of
> unmounting things we have something like a skeleton of the mount tree
> unioned with dcaches of the filesystems themselves. With "struct
> mountpoint" we are amazing close to that already.
>
> A mount skeleton would allow us to always remove and rename directories
> and files without really caring, about what mounts were present.
> Probably with just a quick lookup to see if we need to set
> DCACHE_MOUNTED.
Yes, we could have a separate dentry tree just for anchoring mounts
and we could make a union with the real dentry tree. But implementing
that in a low overhead manner is not trivial. Anchoring mounts on
real dentries is *rather* convenient. And yes, we only actually need
the skeleton dentries when the real ones disappear, but that doesn't
make the implementation any simpler.
> The big practical problem I can see with MNT_VOLATILE is mount points in
> shared directories like /tmp but without the sticky set. At which point
> it would be possible to delete another users mount points. Perhaps we
> need restrictions on where a user can mount.
I think if user X mounts something on /tmp/foo owned by user Y and
user Y removes /tmp/foo then that shouldn't really surprise user X. I
don't see this an issue.
Thanks,
Miklos
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists