lkml.org 
[lkml]   [2008]   [Feb]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: [patch 00/10] mount ownership and unprivileged mount syscall (v8)
From
Date
> On Sat, Feb 23, 2008 at 06:33:13PM +0100, Miklos Szeredi wrote:
> > > c) just what is limited by that sysctl? AFAICS, rbind is allowed
> > > if mountpoint is on user vfsmount and it seems to create vfsmounts without
> > > eating into that limit just fine... What's the point of limiting the
> > > amount of vfsmounts marked user when you do not limit the number of vfsmount
> > > one can allocate?
> >
> > The limit is there, so that unprivileged users cannot create insane
> > number of mounts. It's just a safety thing, analogous to
> > /proc/sys/fs/file-max.
>
> Can't they? Looks like one can create any number of vfsmounts without
> getting more than one marked MNT_USER...

permit_mount() will set MS_SETUSER in flags, and do_loopback() will
set CL_SETUSER based on that flag.

> If you are trying to limit the number of superblocks (i.e. active instances
> of filesystems), then I'd say that vfsmounts make piss-poor proxies for
> those and it would be better to count the objects you really want to count...

I think I really want to limit vfsmounts. But not because these take
so much memory or anything, just to be safe against a stupid users
playing rbind and propagation, and things like that.

Miklos


\
 
 \ /
  Last update: 2008-02-23 20:51    [W:0.037 / U:0.508 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site