lkml.org 
[lkml]   [2005]   [May]   [13]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [RCF] [PATCH] unprivileged mount/umount
    From
    Date
    > > >  	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 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-05-13 19:20    [W:0.021 / U:30.448 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site