public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Roger Luethi <rl@hellgate.ch>
To: Robert White <rwhite@casabyte.com>
Cc: "'Bill Davidsen'" <davidsen@tmr.com>, linux-kernel@vger.kernel.org
Subject: Re: Interesting race condition...
Date: Wed, 4 Aug 2004 22:42:16 +0200	[thread overview]
Message-ID: <20040804204216.GA23314@k3.hellgate.ch> (raw)
In-Reply-To: <!~!UENERkVCMDkAAQACAAAAAAAAAAAAAAAAABgAAAAAAAAA2ZSI4XW+fk25FhAf9BqjtMKAAAAQAAAAtvmiCqH5I06YSBiFSV8ZAgEAAAAA@casabyte.com>

On Wed, 04 Aug 2004 13:03:50 -0700, Robert White wrote:
> Using procps version 2.0.7 the inclusion of "e" in the arguments is
> documented to return environment of the process.

Not the environment of somebody else's process, though. But that is
currently possible in mainline, the problem is not with ps but with
the kernel.

> The question of why the original poster was getting the environment when
> only using "ps ax" is interesting.  I'd look for PS_PERSONALITY (etc) in

Basically, if anyone reads /proc/pid/cmdline early enough, when
mm->arg_end is still 0, the kernel will blast out the process environment
through that interface. Thus, you get the data of /proc/pid/environ
without the access restrictions of that file. Not good if you happen
to pass sensitive information using environment variables.

Check out the patch I posted earlier in this thread.

Roger

  reply	other threads:[~2004-08-04 20:46 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-23  3:04 Interesting race condition Rob Landley
2004-07-23  7:33 ` Barry K. Nathan
2004-07-23  7:56   ` Hugo Mills
2004-07-24  8:13   ` Rob Landley
2004-07-24 13:40     ` Marc Ballarin
2004-07-26 16:04       ` David Weinehall
2004-07-26 17:20       ` Marc Ballarin
2004-07-23 10:01 ` P. Benie
2004-07-24  8:17   ` Rob Landley
2004-07-24  9:08     ` P. Benie
2004-07-27 20:40     ` Bill Davidsen
2004-07-28  8:00       ` Paul Jackson
2004-08-04 20:03       ` Robert White
2004-08-04 20:42         ` Roger Luethi [this message]
2004-07-28  8:05 ` Paul Jackson
2004-07-28 11:54   ` Marc Ballarin
2004-07-28 16:46     ` Rob Landley
2004-07-28 16:42   ` Rob Landley
2004-07-28 17:08     ` Tristan Wibberley
2004-07-29 23:56 ` Roger Luethi
2004-07-30  0:18   ` Jesper Juhl
2004-07-30  0:22     ` Jesper Juhl
2004-07-30  8:27   ` Marc Ballarin
2004-07-30  8:38     ` Roger Luethi
2004-08-20 10:15   ` Lee Revell
2004-08-20 12:51     ` Marc Ballarin

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=20040804204216.GA23314@k3.hellgate.ch \
    --to=rl@hellgate.ch \
    --cc=davidsen@tmr.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=rwhite@casabyte.com \
    /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