public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andrea Arcangeli <andrea@cpushare.com>
To: Ingo Molnar <mingo@elte.hu>
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: seccomp for 2.6.11-rc1-bk8
Date: Fri, 21 Jan 2005 21:24:20 +0100	[thread overview]
Message-ID: <20050121202420.GA11112@dualathlon.random> (raw)
In-Reply-To: <20050121124701.GA5179@elte.hu>

On Fri, Jan 21, 2005 at 01:47:01PM +0100, Ingo Molnar wrote:
> 
> * Ingo Molnar <mingo@elte.hu> wrote:
> 
> > > This is the seccomp patch ported to 2.6.11-rc1-bk8, that I need for
> > > Cpushare (until trusted computing will hit the hardware market). 
> > > [...]
> > 
> > why do you need any kernel code for this? This seems to be a limited
> > ptrace implementation: restricting untrusted userspace code to only be
> > able to exec read/write/sigreturn.
> > 
> > So this patch, unless i'm missing something, duplicates in essence what
> > ptrace can do [...]
> 
> there's one thing ptrace wont do: if the ptrace parent dies unexpectedly
> and the child was 'running' (there is a small window where the child

You got it, I couldn't use ptrace right now. Pavel already suggested it
and I told him the problem with the parent being killed by oom.

> might not be stopped and where this may happen) then the child can get
> runaway. While i think this is theoretical (UML doesnt suffer from this
> problem), it is simple to fix - find below a proof-of-concept patch that
> introduces PTRACE_ATTACH_JAIL - ptraced children can never escape out of
> such a jail. (barely tested - but you get the idea.)

IMHO the complexity of ptrace makes it by definition less secure than
seccomp. Seccomp is extremely simple and self contained. This is why I
still prefer seccomp to fixing ptrace w.r.t. security.

Fixing ptrace w.r.t. security-tracing it'd be still nice, but I'd prefer
not to relay on ptrace when something as simple and robust as seccomp
can be implemented instead.

However if the kerneel folks wants me to use a "fixed version of
ptrace", I could use it too (performance isn't the issue). In _theory_
you're right it'd be completely equivalent after fixing the problem with
the parent dying unexpectedly. But from my part in practice I prefer to
relay _only_ on the much simpler seccomp patch (and on trusted computing
as soon as the hardware is available).

Even trusted computing will be less secure than seccomp from the point
of view of the seller (because it's a lot more complicated than
seccomp), but unlike with ptrace, the buyer will get both privacy
guarantees and guarantees about reliably results too (only against
software attacks). Having those two guarantees for the buyer will be
fundamental, so it will worth to decrease the seller security a bit to
give these guarantees to the buyer (I'll most certainly leave an
exchange for seccomp at the same time I start the trusted computing
exchange, so if some seller doesn't trust the trusted computing code,
they can stick with the very secure seccomp approach), but right now,
seccomp seems the most secure solution from the seller standpoint, and
the buyer won't notice the difference between ptrace and seccomp.

Thanks.

  parent reply	other threads:[~2005-01-21 20:25 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-21 10:06 seccomp for 2.6.11-rc1-bk8 Andrea Arcangeli
2005-01-21 12:03 ` Ingo Molnar
2005-01-21 12:47   ` Ingo Molnar
2005-01-21 12:55     ` Ingo Molnar
2005-01-21 21:31       ` Roland McGrath
2005-01-22  3:25         ` Andrea Arcangeli
2005-01-21 20:24     ` Andrea Arcangeli [this message]
2005-01-21 17:39   ` Chris Wright
2005-01-21 18:39     ` Rik van Riel
2005-01-21 18:50       ` Chris Wright
2005-01-21 19:55         ` Ingo Molnar
2005-01-21 20:34           ` Andrea Arcangeli
2005-01-21 20:54             ` Ingo Molnar
2005-01-22  2:51               ` Andrea Arcangeli
2005-01-22 10:32             ` Pavel Machek
2005-01-22 17:25               ` Andrea Arcangeli
2005-01-22 19:42                 ` Pavel Machek
2005-01-22 23:34                   ` Andrea Arcangeli
2005-01-23  0:07                     ` Pavel Machek
2005-01-23  0:46                       ` Andrea Arcangeli
2005-01-23  0:43                     ` Rik van Riel
2005-01-23  0:52                       ` Andrea Arcangeli
2005-01-23  4:43                         ` Valdis.Kletnieks
2005-01-23  6:11                           ` Andrea Arcangeli
2005-01-21 18:59     ` David Wagner
2005-01-21 19:17       ` Chris Wright
2005-01-23  7:34         ` David Wagner
2005-01-24 15:10           ` Daniel Jacobowitz
2005-02-15  9:25           ` Andrea Arcangeli
2005-02-25 19:01             ` David Wagner
2005-01-21 12:11 ` Pavel Machek
2005-02-15  9:32 ` seccomp for 2.6.11-rc4 Andrea Arcangeli
2005-02-16  5:25   ` Herbert Poetzl
2005-02-18  2:25     ` Andrea Arcangeli

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=20050121202420.GA11112@dualathlon.random \
    --to=andrea@cpushare.com \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    /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