All of lore.kernel.org
 help / color / mirror / Atom feed
From: Al Viro <viro@ZenIV.linux.org.uk>
To: tux2002@front.ru
Cc: linux-kernel@vger.kernel.org
Subject: Re: Re: [PATCH] subsystem: pr??oc filesystem
Date: Sun, 16 Dec 2012 14:28:10 +0000	[thread overview]
Message-ID: <20121216142810.GB4939@ZenIV.linux.org.uk> (raw)
In-Reply-To: <5dca9c1a0bb851ebaa08ffb05941f90454ea3d6a@mail.qip.ru>

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.

      reply	other threads:[~2012-12-16 14:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-12-13 13:15 [PATCH] subsystem: proc filesystem tux2002
2012-12-13 16:22 ` Al Viro
2012-12-16 12:02   ` Re: [PATCH] subsystem: pr­oc filesystem tux2002
2012-12-16 14:28     ` 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=20121216142810.GB4939@ZenIV.linux.org.uk \
    --to=viro@zeniv.linux.org.uk \
    --cc=linux-kernel@vger.kernel.org \
    --cc=tux2002@front.ru \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.