[lkml]   [2011]   [May]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: procfs: boot- and runtime configurable access mode for /proc/<pid> dirs
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.
> 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.

 \ /
  Last update: 2011-05-26 12:59    [W:0.062 / U:2.504 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site