From: Pavel Machek <pavel@ucw.cz>
To: Jeff Layton <jlayton@redhat.com>
Cc: kernel list <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 0/2] vfs: ensure that dentries are revalidated on open (try #2)
Date: Wed, 18 Nov 2009 18:38:17 +0100 [thread overview]
Message-ID: <20091118173817.GE25150@elf.ucw.cz> (raw)
In-Reply-To: <20091118072916.720471b0@tlielax.poochiereds.net>
Hi!
> > > This is the second attempt to fix this problem. The first one attempted
> > > to fix this in procfs, but Eric Biederman pointed out that file bind
> > > mounts have a similar problem. This set attempts to fix the issue at a
> > > higher level, in the generic VFS layer.
> > >
> > > In certain situations, when it knows that they are valid, the path
> > > walking code will skip revalidating dentries that it finds in the cache.
> > > This causes problems with filesystems such as NFSv4 and CIFS that depend
> > > on the d_revalidate routine to do opens during lookup.
> >
> > ...and it allows bypassing directory permissions. Could we fix both
> > here?
>
> Does it? Here's what I just did to check that:
Yes it does, see http://seclists.org/bugtraq/2009/Oct/179
> # cp /bin/sleep /root/sleep
>
> # ls -l /root /root/sleep
> dr-xr-x---. 19 root root 4096 2009-11-18 07:20 /root
> -rwxr-xr-x. 1 root root 29152 2009-11-18 07:20 /root/sleep
>
> # /root/sleep 600
>
> ...then as unprivileged user:
>
> $ ps -ef | grep sleep
> (find pid of sleep program that root is running)
>
> $ /proc/5258/exe 600
> bash: /proc/5258/exe: Permission denied
>
> ...it looks like directory permissions are respected here. Did I
> misunderstand what you're concerned about?
/proc does not allow you to use /proc/XX/fd of unrelated users; it is
another mechanism disallowing access. (Plus, I did my experiments with
/proc/XX/fd, not /exe).
Pavel
--
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html
next prev parent reply other threads:[~2009-11-18 17:38 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-11-10 16:27 Jeff Layton
2009-11-10 16:27 ` [PATCH 1/2] vfs: force reval of dentries for LAST_BIND symlinks on open Jeff Layton
2009-11-10 16:27 ` [PATCH 2/2] vfs: force reval on dentry of bind mounted files for LOOKUP_OPEN Jeff Layton
2009-11-11 7:57 ` [PATCH 0/2] vfs: ensure that dentries are revalidated on open (try #2) Miklos Szeredi
2009-11-11 8:26 ` Trond Myklebust
2009-11-11 8:33 ` Miklos Szeredi
2009-11-11 12:17 ` Trond Myklebust
2009-11-11 12:36 ` Jeff Layton
2009-11-18 4:19 ` Pavel Machek
2009-11-18 12:29 ` Jeff Layton
2009-11-18 17:38 ` Pavel Machek [this message]
2009-11-18 18:54 ` Jeff Layton
2009-11-18 19:33 ` Pavel Machek
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=20091118173817.GE25150@elf.ucw.cz \
--to=pavel@ucw.cz \
--cc=jlayton@redhat.com \
--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
all inboxes | Powered by JetHome®