Re: procfs: boot- and runtime configurable access mode for/proc/<pid> dirs
From: Al Viro
Date: Thu May 26 2011 - 06:56:54 EST
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.
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/