From: Al Viro <viro@ZenIV.linux.org.uk>
To: Christian Kujau <lists@nerdbynature.de>
Cc: Daniel Reichelt <debian@nachtgeist.net>,
LKML <linux-kernel@vger.kernel.org>
Subject: Re: procfs: boot- and runtime configurable access mode for /proc/<pid> dirs
Date: Thu, 26 May 2011 11:56:47 +0100 [thread overview]
Message-ID: <20110526105647.GD11521@ZenIV.linux.org.uk> (raw)
In-Reply-To: <alpine.DEB.2.01.1103251418300.4945@trent.utfs.org>
On Fri, Mar 25, 2011 at 02:24:48PM -0700, Christian Kujau wrote:
>
> Not sure If I understand correctly, but:
>
> On Thu, 24 Mar 2011 at 20:37, Al Viro wrote:
> > Bull. /proc/<pid>/foo contents is sensitive, your patch doesn't do
> > you any good. fork(), open /proc/<child's PID>/foo in parent, then
> > exec suid-root binary in child.
>
> ...you would have to roll your own suid-root binary to be able to look
> into other /proc/PID directories, no? But making a binary suid-root
> requires root to begin with.
No. You could look into /proc/PID/foo of process running a suid-root binary
that you have execve()'ed. A binary that had been there legitimately. If
these files have sensitive contents, you have a bad problem on hands (and we
had quite a few of those); IOW, you need to do checks at read(2) time, since
the identity of owner can change between open() and read(). And if you do
those checks there, you don't need to care about open-time checks at all,
since any attempt to do IO will be rejected anyway.
prev parent reply other threads:[~2011-05-26 10:56 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-24 4:09 procfs: boot- and runtime configurable access mode for /proc/<pid> dirs Daniel Reichelt
2011-03-24 7:32 ` Alexey Dobriyan
2011-03-24 8:41 ` Daniel Reichelt
2011-03-24 18:22 ` Alexey Dobriyan
2011-03-24 18:44 ` Al Viro
2011-03-24 18:49 ` Daniel Reichelt
2011-03-24 19:18 ` Daniel Reichelt
2011-03-24 20:37 ` Al Viro
2011-03-25 21:24 ` Christian Kujau
2011-05-26 10:56 ` Al Viro [this message]
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=20110526105647.GD11521@ZenIV.linux.org.uk \
--to=viro@zeniv.linux.org.uk \
--cc=debian@nachtgeist.net \
--cc=linux-kernel@vger.kernel.org \
--cc=lists@nerdbynature.de \
/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