[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-id: <20090727183354.GM4231@webber.adilger.int>
Date: Mon, 27 Jul 2009 12:33:54 -0600
From: Andreas Dilger <adilger@....com>
To: Jamie Lokier <jamie@...reable.org>
Cc: Eric Paris <eparis@...hat.com>, linux-kernel@...r.kernel.org,
linux-fsdevel@...r.kernel.org, malware-list@...sg.printk.net,
Valdis.Kletnieks@...edu, greg@...ah.com, jcm@...hat.com,
douglas.leeder@...hos.com, tytso@....edu, arjan@...radead.org,
david@...g.hm, jengelh@...ozas.de, aviro@...hat.com,
mrkafk@...il.com, alexl@...hat.com, jack@...e.cz,
tvrtko.ursulin@...hos.com, a.p.zijlstra@...llo.nl,
hch@...radead.org, alan@...rguk.ukuu.org.uk, mmorley@....in,
pavel@...e.cz
Subject: Re: fanotify - overall design before I start sending patches
On Jul 25, 2009 01:29 +0100, Jamie Lokier wrote:
> Eric Paris wrote:
> > But maybe I should jsut do the 'if you have fanotify open, you don't
> > create other fanotify events'... so everyone gets what they expect...
>
> O_NONOTIFY. Similar security concerns, more control.
>
> The security concern is clear: If you allow a process with fanotify
> open to not create events, then any (root) process can open a fanotify
> socket to hide it's behaviour.
I think the "fanotify doesn't generate more fanotify events" makes the
most sense. Given that the open will be done in the kernel specifically
due to fanotify, this doesn't actually allow the listener to open files
without detection (unlike the "O_NONOTIFY" flag would). The fanotify
"opens" would only be in response to other processes opening the file.
It might also make sense to verify that the process doing the open has
at least permission to open the file in question (i.e. root) so that
some unauthorized process cannot just get file handles to arbitrary files.
Cheers, Andreas
--
Andreas Dilger
Sr. Staff Engineer, Lustre Group
Sun Microsystems of Canada, Inc.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists