Re: [RCF] [PATCH] unprivileged mount/umount

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



> > >  	dentry = file->f_dentry;
> > >  	mnt = file->f_vfsmnt;
> > >  	inode = dentry->d_inode;
> > > +	if(mnt->mnt_namespace != current->namespace)
> > > +		goto out_putf;
> > >  
> > >  	error = -ENOTDIR;
> > >  	if (!S_ISDIR(inode->i_mode))
> > > 
> > 
> > Does this actually fix the problem?  The open is done in the right
> > namespace, and mount() doesn't call open().
> 
> Right but this fix disallows fchdir into a directory belonging to
> a different namespace.  And hence would disallow the ability to
> cross mount across namespaces.

Ahh, sorry.  I thought that check was in open(), but I see now it's in
fchdir().  Next time please use '-p' option of diff, to avoid
confusing thoughtless readers like me :)

Though your patch does fix the bug, I still think it's wrong, since
mounting from a different namespace has legitimate uses, and is not a
security problem.

Miklos
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux