9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
From: Nathaniel W Filardo <nwf@cs.jhu.edu>
To: Fans of the OS Plan 9 from Bell Labs <9fans@9fans.net>
Subject: Re: [9fans] sendfd() on native Plan 9?
Date: Tue, 30 Dec 2008 03:22:45 -0500	[thread overview]
Message-ID: <20081230082245.GA8355@masters10.cs.jhu.edu> (raw)
In-Reply-To: <DB7B6E64-CBE4-4FD5-898B-15E523416776@sun.com>

[-- Attachment #1: Type: text/plain, Size: 2519 bytes --]

On Sat, Dec 27, 2008 at 12:21:49PM -0800, Roman Shaposhnik wrote:
> True. But why that should be a problem in practice? If the process
> belongs to a user X that means user X has control over it. Thus the
> behavior of accidental consumption of an fd that was meant to be consumed
> by some other process can only be attributed to bugs in the code, not
> malicious intent.

If one buys this argument, then namespaces are not valid security constructs
either, and Plan 9 security boundaries are defined solely by user id.  That
is, the claim that "a process spawned without access to your home directory
cannot get it" is flawed if that process runs as your user.  (Even if I
can't mount it, I can attach a debugger to a process that can and make it
make system calls for me.  You now have to intermediate my #p (/proc)
service.  You have to ensure that I can't dial it and authenticate with
factotum.  It's a mess!)

I may be tainted by the capability microkernel koolaid, but I don't like the
idea that users are the sole security domain objects, and I really dislike
that I can build stronger security constructs when using multiple kernels
rather than just one.  Especially in a system like Plan 9, where namespaces
are cheap and capabilties exist in the form of file descriptors.

That is, I want to be able to build processes that cannot access resources
that they were not explicitly granted when their namespace was constructed.
Currently, #p and #s are rather large, open-ended, potent capabilities to
grant, and refusing grant of #p and #s requires some rather careful coding
and prevents a number of conveniences, as you might imagine.

That is, I want, essentially, to run multiple Plan 9 systems on one Plan 9
kernel without needing to get my whole domain to know about multiple
instances of my user (e.g. nwf/browser, nwf/grid, nwf, ...).  Or rather, the
ability to do that is a sufficient, but not necessary, condition.  I can
build exactly these resource-restricted namespaces if I devote an entire
kernel -- and thereby an entire machine or emulation -- to it.  I simply
avoid granting that machine my P9 secret and (tada!) even though the uid may
be "nwf", that doesn't mean anything.

If #s can be virtualized -- ala srv^2 or devcapsrv or something else -- then
the system is one step closer to supporting the above.  There is some
machinery for sealing off #p that I do not recall in full detail but may
well be sufficient, at least for my desires.

--nwf;

[-- Attachment #2: Type: application/pgp-signature, Size: 204 bytes --]

  reply	other threads:[~2008-12-30  8:22 UTC|newest]

Thread overview: 37+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-12-23 18:01 Nathaniel W Filardo
2008-12-23 22:52 ` Rodolfo kix Garcia
2008-12-23 23:53   ` Francisco J Ballesteros
2008-12-24  1:10     ` Nathaniel W Filardo
2008-12-24  1:39       ` erik quanstrom
2008-12-24  3:00         ` Nathaniel W Filardo
2008-12-24  4:14           ` erik quanstrom
2008-12-24  7:36             ` Nathaniel W Filardo
2008-12-24 13:36               ` erik quanstrom
2008-12-27 20:27                 ` Roman Shaposhnik
2008-12-27 20:34                   ` Eric Van Hensbergen
2008-12-27 20:21       ` Roman Shaposhnik
2008-12-30  8:22         ` Nathaniel W Filardo [this message]
2008-12-30 15:04           ` Eric Van Hensbergen
2008-12-30 15:31           ` erik quanstrom
2009-01-01 22:53             ` Roman V. Shaposhnik
2009-01-01 23:57               ` Nathaniel W Filardo
2009-01-03 21:23                 ` Roman V. Shaposhnik
2009-01-03 21:41                   ` erik quanstrom
2009-01-03 21:59                     ` Roman V. Shaposhnik
2009-01-03 23:57                   ` Nathaniel W Filardo
2009-01-04  5:19                     ` lucio
2009-01-04  5:48                       ` erik quanstrom
2009-01-04  6:10                         ` Nathaniel W Filardo
2009-01-04  6:43                           ` lucio
2009-01-05  1:12                             ` Roman V. Shaposhnik
2009-01-05  1:32                               ` erik quanstrom
2009-01-05  3:48                                 ` lucio
2009-01-04 17:32                           ` erik quanstrom
2009-01-04 18:23                             ` lucio
2009-01-05  1:24                               ` Roman V. Shaposhnik
2009-01-04  5:58                       ` Nathaniel W Filardo
2009-01-04  6:26                         ` lucio
2009-01-04 15:46                           ` erik quanstrom
2009-01-05  4:30                     ` Roman V. Shaposhnik
2008-12-24  1:17   ` Nathaniel W Filardo
2008-12-27 17:06 ` Russ 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=20081230082245.GA8355@masters10.cs.jhu.edu \
    --to=nwf@cs.jhu.edu \
    --cc=9fans@9fans.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;
as well as URLs for NNTP newsgroup(s).