[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAKgNAkiS+VdFNy4Z3G+U0ck5r4vXPt5goptnQHQzEsF+tGVWoQ@mail.gmail.com>
Date: Tue, 22 Apr 2014 15:52:32 +0200
From: "Michael Kerrisk (man-pages)" <mtk.manpages@...il.com>
To: Jan Kara <jack@...e.cz>
Cc: Heinrich Schuchardt <xypron.glpk@....de>,
Eric Paris <eparis@...hat.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 1/1] fanotify: check permissions when creating file descriptor
On Tue, Apr 22, 2014 at 3:50 PM, Michael Kerrisk (man-pages)
<mtk.manpages@...il.com> wrote:
> On Tue, Apr 22, 2014 at 3:40 PM, Jan Kara <jack@...e.cz> wrote:
>> On Sat 19-04-14 22:53:53, Heinrich Schuchardt wrote:
>>> When monitoring a directory or a mount with the fanotify API
>>> the call to fanotify_init checks,
>>> * the process has cap_sys_admin capability
>>>
>>> The call to fanotify_mark checks,
>>> * the process has read authorization for directory or mount
>>>
>>> A directory or mount may contain files for which the process
>>> has no read or write authorization.
>>> Yet when reading from the fanotify file descriptor, structures
>>> fanotify_event_metadata are returned, which contain a file
>>> descriptor for these files, and will allow to read or write.
>>>
>>> The patch adds an authorization check for read and write
>>> permission. In case of missing permission, reading from the
>>> fanotify file descriptor returns EACCES.
>> OK, am I right you are concerned about a situation where fanotify group
>> descriptor is passed to an unpriviledged process which handles all the
>> incoming events? I'm asking because the permission checking can be
>> relatively expensive (think of acls) so we better do it for a reason.
>> I'd prefer to hear from Eric what the original intention regarding
>> permissions was...
>
> If I understand correctly, passing to an unprivileged process is the
sorry: s/is the/is not the/
--
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