linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Eric Paris <eparis@redhat.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: Ensure FMODE_NONOTIFY is not set by userspace
Date: Fri, 29 Oct 2010 12:10:07 -0400	[thread overview]
Message-ID: <1288368607.3017.26.camel@localhost.localdomain> (raw)
In-Reply-To: <20101029142752.GF26242@lsanfilippo.unix.rd.tt.avira.com>

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


      reply	other threads:[~2010-10-29 16:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-29 10:02 Ensure FMODE_NONOTIFY is not set by userspace Lino Sanfilippo
2010-10-29 13:52 ` Eric Paris
2010-10-29 14:27   ` Lino Sanfilippo
2010-10-29 16:10     ` Eric Paris [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1288368607.3017.26.camel@localhost.localdomain \
    --to=eparis@redhat.com \
    --cc=LinoSanfilippo@gmx.de \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).