Re: Ensure FMODE_NONOTIFY is not set by userspace

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

 



On Fri, 2010-10-29 at 16:27 +0200, Lino Sanfilippo wrote:
> On Fri, Oct 29, 2010 at 09:52:50AM -0400, Eric Paris wrote:
> > 
> > Did you find a place where the user was able to set FMODE_NONOTIFY?
> > That would be a problem.  But that's not what is happening here and
> > that's not what you are fixing.
> 
> I know its not happening here, but doing something like
> 
> #define MY_FLAG 0x1000000
> 
>  open("file/within/fanotify_protection", O_RDONLY | MY_FLAG);
> 
> from userspace is all that is needed to be ignored by fanotify :)
> There is nothing that checks if this flag has been set by userspace (or 
> did I miss something?)
> 
> Beside this since the flag should only be set within create_fd() or
> fanotify_init() there should never be a situation where 
> fsnotify_open() is called with a FMODE_NONOTIFY set (by the kernel).

You're right, I'm still not sure this is the best way to fix it, but
it's very broken.  I'll either commit your patch or post my own
today....

-Eric

--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html


[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux