Messages in this thread | | | Date | Sun, 16 Dec 2012 14:28:10 +0000 | From | Al Viro <> | Subject | Re: Re: [PATCH] subsystem: pr??oc filesystem |
| |
On Sun, Dec 16, 2012 at 04:02:03PM +0400, tux2002@front.ru wrote: > Not, this permissions saved for all users for later, check please.
... and that's why it's bogus. umask of whoever had done lookup for /proc/<something> affects everybody else. For as long as the thing stays in dcache. At which point it's up for grabs (in that sense) again. Do (umask 777; ls -l /proc) with your kernel and watch the results. Note that you don't need to be root to cause that - anyone can do it.
Realize that dentries and inodes in /proc/<pid>/* are created on demand whenever somebody does a lookup. So running ps(1) suddenly makes you a creator of a bunch of those. Unless somebody else had done ps(1) (or ls -l /proc, or...) first. Basing any security decisions on _that_ is insane.
| |