public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Miquel van Smoorenburg <miquels@cistron.nl>
To: Alan Cox <alan@lxorguk.ukuu.org.uk>
Cc: Geoffrey McRae <geoff@rabidhost.com>,
	Nick Andrew <nick@nick-andrew.net>,
	linux-kernel@vger.kernel.org
Subject: Re: New Security Features, Please Comment
Date: Thu, 04 Dec 2008 00:39:23 +0100	[thread overview]
Message-ID: <1228347564.10407.18.camel@localhost.localdomain> (raw)
In-Reply-To: <20081203230820.4473a162@lxorguk.ukuu.org.uk>

On Wed, 2008-12-03 at 23:08 +0000, Alan Cox wrote:
> > The children are pre-forked, so the overhead is in the setup... then
> > when the app recieves a request, it sets the child's uid to the uid of
> > the website, and then passes the request to the child, which, now, the
> > child is running as the website owner.
> 
> But the child process may already have been trojanned by a previous user
> so it gains you nothing.
> 
> > It is more secure then just doing nothing.
> 
> I'm not convinced. Not remotely.

Well, in this particular case, and with this API, perhaps not.

But there really is something to be said for being able to limit the
setuid range of a process.

Right now, applications that want to switch to several different
UIDs/GIDs must be setuid root themself or at least have the right
capability. But once an app has that it can switch to any uid, including
root or other system users.

It would be great if you could say 'limit setuid() to saved-uid + uids
1000-2000' or something like that.

If then the userlevel NFS server gets owned you can at least be sure
none of the files in /bin have been modified ..

Note that there are patches on the net for linux, freebsd and probably
other OSes that do exactly this, so there definately is a need.

It could even be used to give normal users a range of uids to use for
sandboxes. Just an idea, I haven't really thought that through.

Mike.


  parent reply	other threads:[~2008-12-03 23:53 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-02 23:28 New Security Features, Please Comment Geoffrey McRae
2008-12-03  0:24 ` Geoffrey McRae
2008-12-03  0:53 ` Alan Cox
2008-12-03  1:44   ` Geoffrey McRae
2008-12-03  2:11     ` David Newall
2008-12-03  2:55     ` Valdis.Kletnieks
2008-12-03  4:02       ` Geoffrey McRae
2008-12-03  4:35         ` Peter Teoh
2008-12-03  5:02           ` Geoffrey McRae
2008-12-03  6:54             ` David Newall
2008-12-03 10:29     ` Alan Cox
2008-12-03 12:42     ` Nick Andrew
2008-12-03 12:46       ` Alan Cox
2008-12-03 22:44       ` Geoffrey McRae
2008-12-03 23:08         ` Alan Cox
2008-12-03 23:27           ` Peter Teoh
2008-12-03 23:40             ` Geoffrey McRae
2008-12-04 21:56               ` Valdis.Kletnieks
2008-12-04 22:30                 ` Geoffrey McRae
2008-12-05  3:35                   ` Valdis.Kletnieks
2008-12-05  3:44                     ` Nick Andrew
2008-12-05  3:50                     ` Geoffrey McRae
2008-12-05  4:03                       ` Valdis.Kletnieks
2008-12-03 23:39           ` Miquel van Smoorenburg [this message]
2008-12-04  0:00             ` Geoffrey McRae
2008-12-04  0:22               ` Peter Teoh
2008-12-04  0:08             ` 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=1228347564.10407.18.camel@localhost.localdomain \
    --to=miquels@cistron.nl \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=geoff@rabidhost.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=nick@nick-andrew.net \
    /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