linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Miklos Szeredi <miklos@szeredi.hu>
To: Ashish Sangwan <ashishsangwan2@gmail.com>
Cc: Nikolaus Rath <Nikolaus@rath.org>,
	fuse-devel <fuse-devel@lists.sourceforge.net>,
	linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] fuse: callback for invalidating cached children dentries for a directory
Date: Tue, 31 May 2016 11:10:42 +0200	[thread overview]
Message-ID: <CAJfpegtOQFCO8Czb2Ko5qrw=_ZXkFC7EySzMLzMo4MeVecproQ@mail.gmail.com> (raw)
In-Reply-To: <1464685454-19650-1-git-send-email-ashishsangwan2@gmail.com>

On Tue, May 31, 2016 at 11:04 AM, Ashish Sangwan
<ashishsangwan2@gmail.com> wrote:
> This patch solves a long standing bug.
> "([bug #15](https://github.com/libfuse/libfuse/issues/15)): if the
> `default_permissions` mount option is not used, the results of the
> first permission check performed by the file system for a directory
> entry will be re-used for subsequent accesses as long as the inode of
> the accessed entry is present in the kernel cache - even if the
> permissions have since changed, and even if the subsequent access is
> made by a different user.
> This bug needs to be fixed in the Linux kernel and has been known
> since 2006 but unfortunately no fix has been applied yet. If you
> depend on correct permission handling for FUSE file systems, the only
> workaround is to use `default_permissions` (which does not currently
> support ACLs), or to completely disable caching of directory entry
> attributes. Alternatively, the severity of the bug can be somewhat
> reduced by not using the `allow_other` mount option."
>
> This patch introduce a callback which the user space implementation can use
> to invalidate the cached entries of a parent directory, for example when
> the execute permissions are revoked and force real lookup.

This doesn't solve the real problem.

As I just mentioned, the bigger problem is that when doing cached
lookups we ignore the credentials of the current process.  Without
that (and without default_permission) we just can't make a good
decision whether to allow the cached lookup or not.

Thanks,
Miklos

  reply	other threads:[~2016-05-31  9:10 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-05-31  9:04 [PATCH] fuse: callback for invalidating cached children dentries for a directory Ashish Sangwan
2016-05-31  9:10 ` Miklos Szeredi [this message]
2016-05-31  9:44   ` Ashish Sangwan
2016-05-31  9:58     ` Miklos Szeredi
2016-05-31 16:01     ` Nikolaus Rath

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='CAJfpegtOQFCO8Czb2Ko5qrw=_ZXkFC7EySzMLzMo4MeVecproQ@mail.gmail.com' \
    --to=miklos@szeredi.hu \
    --cc=Nikolaus@rath.org \
    --cc=ashishsangwan2@gmail.com \
    --cc=fuse-devel@lists.sourceforge.net \
    --cc=linux-fsdevel@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).