mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Willy Tarreau <willy@w.ods.org>
Cc: solar@openwall.com, tigran@aivazian.fsnet.co.uk, alan@redhat.com,
	marcelo.tosatti@cyclades.com, linux-kernel@vger.kernel.org
Subject: Re: question about /proc/<PID>/mem in 2.4 (fwd)
Date: Sun, 18 Jul 2004 16:15:49 -0700	[thread overview]
Message-ID: <20040718161549.5c61d4a9.pj@sgi.com> (raw)
In-Reply-To: <20040718212721.GC1545@alpha.home.local>

> What exactly is passed then ...

The patch /proc/self/mem will be evaluated just once, on the open
by the original shell.  Whatever bucket of bits that resolves to
will remain the source for fd == 0 reads.

That original shell's mem file will be read by whatever follows, exec or
not.  The 'exec' just stops the shell from forking before it exec's, and
certainly won't cause the path that was used earlier to open fd 0 to be
re-evaluated.

The setuidapp will see the shell's memory.  In general, a app, setuid or
not, should make no assumption that any open fd's handed to it at birth
were opened using the same priviledges that the app itself has.

Or, more to the point, no higher priviledge app, when calling down to a
lessor priviledge app (say a setuid or root app invoking a less trusted
app) should allow any open file descriptors across the fork or exec,
except those open on files to which it determines the lessor context has
rights.

-- 
                          I won't rest till it's the best ...
                          Programmer, Linux Scalability
                          Paul Jackson <pj@sgi.com> 1.650.933.1373

  reply	other threads:[~2004-07-18 23:18 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-07-07 13:28 Tigran Aivazian
2004-07-07 23:48 ` Solar Designer
2004-07-18 12:41   ` Tigran Aivazian
2004-07-18 12:59     ` Solar Designer
2004-07-18 21:27       ` Willy Tarreau
2004-07-18 23:15         ` Paul Jackson [this message]
2004-07-19  4:54           ` Willy Tarreau
2004-07-19  6:47             ` Paul Jackson
2004-07-22 20:34           ` Alan Cox
2004-07-22 21:23             ` Paul Jackson
2004-07-23 17:34     ` Alan Cox

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=20040718161549.5c61d4a9.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=alan@redhat.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcelo.tosatti@cyclades.com \
    --cc=solar@openwall.com \
    --cc=tigran@aivazian.fsnet.co.uk \
    --cc=willy@w.ods.org \
    /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

all inboxes | Powered by JetHome®