From: ebiederm@xmission.com (Eric W. Biederman)
To: Paul Jackson <pj@sgi.com>
Cc: Andrew Morton <akpm@osdl.org>,
laurent.riffard@free.fr, jesper.juhl@gmail.com,
linux-kernel@vger.kernel.org, rjw@sisk.pl, mbligh@mbligh.org,
clameter@engr.sgi.com
Subject: Re: 2.6.16-rc5-mm1
Date: Tue, 28 Feb 2006 21:15:41 -0700 [thread overview]
Message-ID: <m1wtfepzpu.fsf@ebiederm.dsl.xmission.com> (raw)
In-Reply-To: <20060228190535.41a8c697.pj@sgi.com> (Paul Jackson's message of "Tue, 28 Feb 2006 19:05:35 -0800")
Paul Jackson <pj@sgi.com> writes:
> I have popped the patch stack back to including:
>> trivial-cleanup-to-proc_check_chroot.patch
>> proc-fix-the-inode-number-on-proc-pid-fd.patch
>
> but not past that. It boots now, unlike before with the full patch
> stack.
>
> I will continue the hunt.
>
> Meanwhile, on the side, I have a couple of permission problems to
> report to Eric Biederman with apps that are complaining about not being
> able to access /proc/<pid>/fd/[0-9]* files when before they could:
>
> 1) Logged in as root, running "/bin/ls -l /proc/*/fd/*"
> causes some complaints. For example:
>
> # /bin/ls -l /proc/2868/fd/?
> /bin/ls: cannot read symbolic link /proc/2868/fd/6: Permission denied
> /bin/ls: cannot read symbolic link /proc/2868/fd/7: Permission denied
> lr-x------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/0 -> /dev/null
> lrwx------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/1 -> /dev/pts/10
> lrwx------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/2 -> /dev/pts/10
> lr-x------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/3 ->
> /proc/sal/cmc/event
> lrwx------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/4 -> /proc/sal/cmc/data
> l-wx------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/6
> lr-x------ 1 root root 64 Feb 28 18:39 /proc/2868/fd/7
>
> I don't recall seeing any similar complaints before. My first reaction
> is "wtf - I'm root - what's this permission denied error ?!?"
>
> 2) I have an SGI specific application that runs out of init on boot
> that spews out some 50 or so "Permission denied" errors on
> various /proc/<pid>/fd/* files, which it never did before that
> I can recall.
>
> For example, this app complained:
>
> Cannot stat file /proc/1688/fd/3: Permission denied
> Cannot stat file /proc/1688/fd/4: Permission denied
> Cannot stat file /proc/1688/fd/5: Permission denied
> Cannot stat file /proc/1688/fd/6: Permission denied
> Cannot stat file /proc/1688/fd/7: Permission denied
> Cannot stat file /proc/2781/fd/3: Permission denied
> Cannot stat file /proc/2802/fd/1: Permission denied
> Cannot stat file /proc/2802/fd/3: Permission denied
> Cannot stat file /proc/2802/fd/4: Permission denied
> Cannot stat file /proc/2878/fd/6: Permission denied
> Cannot stat file /proc/2878/fd/7: Permission denied
>
> You can see it is not complaining about all the fd's of a task,
> but just some.
>
> I might be confused in what patches I'm running, but I believe that
> I am getting these permission denied errors with just the patches:
So the function that will be giving you trouble is proc_check_dentry_visible.
The patch should be called something like:
proc-Properly-filter-out-files-that-are-not-visible-to-a-process
It was the 8th patch on my stack when I submitted it.
Largely what is happening is that I fixed the permission checks that
have been in the kernel since 2.2 so that they work. I'm not saying
that what I am doing right now is correct but it is something we need
to consider.
The logic is can I access this file in some other way besides through
/proc.
When applied to /proc/<pid>/exe
When applied to /proc/<pid>/root
When applied to /proc/<pid>/cwd
I have some concerns about it's correctness but when applied to
/proc/<pid>/fd/<#>
my only concern is if the checks are complete, or if we even want them.
There may be a capability I need to check that says anything goes.
There are 2 sets out file descriptors that will now be unaccessible.
- Files on internal filesystems like pipefs.
- Files on outside of your filesystem root or filesystem namespace.
If you share the struct file with the process everything should be visible.
We may want different checks for readlink and follow link.
If you want to kill the permission checks to stop the noise for a while
it should be straight forward.
Eric
next prev parent reply other threads:[~2006-03-01 4:17 UTC|newest]
Thread overview: 74+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-28 12:24 2.6.16-rc5-mm1 Andrew Morton
2006-02-28 14:41 ` 2.6.16-rc5-mm1 Cornelia Huck
2006-02-28 14:55 ` 2.6.16-rc5-mm1 Martin Schwidefsky
2006-02-28 15:08 ` 2.6.16-rc5-mm1 gsmith
2006-02-28 15:01 ` 2.6.16-rc5-mm1 Michal Piotrowski
2006-02-28 16:20 ` 2.6.16-rc5-mm1 Michal Piotrowski
2006-03-01 2:16 ` 2.6.16-rc5-mm1 Nick Piggin
2006-03-01 2:44 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 3:10 ` 2.6.16-rc5-mm1 Nick Piggin
2006-03-01 3:21 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 3:30 ` 2.6.16-rc5-mm1 Nick Piggin
2006-03-01 3:42 ` 2.6.16-rc5-mm1 Andrew Morton
2006-02-28 19:40 ` usb usb5: Manufacturer: Linux 2.6.16-rc5-mm1 ehci_hcd Alexey Dobriyan
2006-02-28 20:48 ` [linux-usb-devel] " Alan Stern
2006-02-28 20:48 ` 2.6.16-rc5-mm1 Mattia Dongili
2006-02-28 23:49 ` 2.6.16-rc5-mm1 Alessandro Zummo
2006-02-28 21:13 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-02-28 22:27 ` 2.6.16-rc5-mm1 Jiri Slaby
2006-02-28 22:30 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-02-28 23:18 ` 2.6.16-rc5-mm1 Laurent Riffard
2006-02-28 23:57 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-03-01 0:21 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 0:33 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-03-01 3:05 ` 2.6.16-rc5-mm1 Paul Jackson
2006-03-01 3:20 ` 2.6.16-rc5-mm1 Paul Jackson
2006-03-01 4:15 ` Eric W. Biederman [this message]
2006-03-01 4:26 ` 2.6.16-rc5-mm1 Paul Jackson
2006-03-01 4:57 ` 2.6.16-rc5-mm1 Eric W. Biederman
2006-03-01 10:06 ` 2.6.16-rc5-mm1 Laurent Riffard
2006-03-01 10:32 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 11:25 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 18:14 ` 2.6.16-rc5-mm1 Ashok Raj
2006-03-01 18:48 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 19:31 ` 2.6.16-rc5-mm1 Ashok Raj
2006-03-01 13:58 ` 2.6.16-rc5-mm1 Mike Galbraith
2006-03-01 14:50 ` 2.6.16-rc5-mm1 Laurent Riffard
2006-03-01 15:33 ` 2.6.16-rc5-mm1 Mike Galbraith
2006-03-01 20:12 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 20:19 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 20:35 ` 2.6.16-rc5-mm1 Peter Staubach
2006-03-01 20:43 ` 2.6.16-rc5-mm1 Eric W. Biederman
2006-03-02 4:52 ` 2.6.16-rc5-mm1 Nick Piggin
2006-03-02 16:37 ` [PATCH] proc: Use sane permission checks on the /proc/<pid>/fd/ symlinks Eric W. Biederman
2006-03-03 8:49 ` Andrew Morton
2006-03-03 12:00 ` Eric W. Biederman
2006-03-01 14:22 ` 2.6.16-rc5-mm1 J.A. Magallon
2006-03-02 4:51 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-02 21:11 ` 2.6.16-rc5-mm1 J.A. Magallon
2006-03-02 22:31 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-02 3:10 ` 2.6.16-rc5-mm1 Paul Jackson
2006-03-01 10:35 ` 2.6.16-rc5-mm1 Laurent Riffard
2006-03-01 10:47 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-02 1:41 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-03-02 20:16 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-03-02 22:34 ` 2.6.16-rc5-mm1 Eric W. Biederman
2006-03-06 0:05 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-02-28 23:15 ` 2.6.16-rc5-mm1 Andrew Morton
2006-02-28 23:33 ` 2.6.16-rc5-mm1 Jesper Juhl
2006-02-28 22:34 ` 2.6.16-rc5-mm1 Rafael J. Wysocki
2006-02-28 23:48 ` 2.6.16-rc5-mm1 Andrew Morton
2006-03-01 0:52 ` 2.6.16-rc5-mm1 Eric W. Biederman
2006-03-01 11:42 ` 2.6.16-rc5-mm1 Rafael J. Wysocki
2006-02-28 23:56 ` 2.6.16-rc5-mm1 Martin Bligh
2006-03-01 16:45 ` [PATCH] Fix powerpc bad_page_fault output (Re: 2.6.16-rc5-mm1) Olof Johansson
2006-03-02 0:09 ` Paul E. McKenney
2006-03-02 0:35 ` Paul Mackerras
2006-03-02 1:14 ` Martin Bligh
2006-03-02 2:22 ` Olof Johansson
2006-03-02 5:24 ` Anton Blanchard
2006-03-02 5:16 ` Paul Mackerras
2006-03-02 10:27 ` 2.6.16-rc5-mm1 -- strange load balancing problems Peter Williams
2006-03-02 22:23 ` Peter Williams
2006-03-13 4:46 ` Peter Williams
2006-03-03 15:32 ` 2.6.16-rc5-mm1: USB compile errors Adrian Bunk
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=m1wtfepzpu.fsf@ebiederm.dsl.xmission.com \
--to=ebiederm@xmission.com \
--cc=akpm@osdl.org \
--cc=clameter@engr.sgi.com \
--cc=jesper.juhl@gmail.com \
--cc=laurent.riffard@free.fr \
--cc=linux-kernel@vger.kernel.org \
--cc=mbligh@mbligh.org \
--cc=pj@sgi.com \
--cc=rjw@sisk.pl \
/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