public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: andrea@cpushare.com
To: Ingo Molnar <mingo@elte.hu>
Cc: ajwade@cpe001346162bf9-cm0011ae8cd564.cpe.net.cable.rogers.com,
	Lee Revell <rlrevell@joe-job.com>,
	"Randy.Dunlap" <rdunlap@xenotime.net>,
	Andrew Morton <akpm@osdl.org>,
	bunk@stusta.de, linux-kernel@vger.kernel.org
Subject: Re: [2.6 patch] let CONFIG_SECCOMP default to n
Date: Thu, 13 Jul 2006 03:16:58 +0200	[thread overview]
Message-ID: <20060713011658.GB9102@opteron.random> (raw)
In-Reply-To: <20060712211358.GA10811@elte.hu>

I think this thread is not worth reading but since you tell me that I
am affected by NIH syndrome...

On Wed, Jul 12, 2006 at 11:13:58PM +0200, Ingo Molnar wrote:
> But he chose not to do so - and that has nothing to do with being unable 
> to improve ptrace - it evidently is improvable. So i see SECCOMP being 
> the result of the NIH syndrome.

	http://www.cpushare.com/hypermail/cpushare-discuss/06/01/0086.html

	"so if you walk this thought-experiment a bit, you'll quickly arrive to a 
	virtual machine that is actually pretty useful already, and is fully 
	provable. You should not dismiss this as "I dont trust it because it's 
	at ring 0", unless you can show some fatal flaw in my thinking."

In short a few months ago you told me that instead of using SECCOMP I
should filter and run the resulting filtered (but originally
untrusted) bytecode in ring0 inside the kernel without any memory
protection, because your filter was a lot more than the "int 0x80
checks plus jump offsets checks" (that Alan just mentioned), you
suggested a sort of kernel virtual machine that you just invented that
would verify where the bytecode could touch the ram. So the first bug
in this hugely complicated (and IMHO nearly impossible to implement
filter due the lack of memory protection) gives the attacker ring0
privilege because it all runs inside the kernel...

If it's you, inventing it the huge complicated insecure and probably
impossible to realize virtual machine in the kernel, it's ok. While if
it's me, I should be using ptrace instead of the simpler and much more
secure seccomp. If the above is not NIH syndrome I don't know what
that is.

About your first claim, as far as I'm concerned, if I use seccomp or
ptrace it doesn't change anything at all for me. It only changes for
the *users* because if I use ptrace they'll be less secure.

If not obvious yet the reasons of seccomp are multiple.

1) gdb (all buyers of the CPU resources will need a way to debug their
   own bytecode by running the sell client on their own machine, if
   something goes wrong). If seccomp will be used by others to do
   secure decompression, the fact gdb will keep working will be
   welcome for the same reason.
2) strace (I used it quite a lot of times to debug problems in seccomp
   bytecode myself already, it has been a fundamental debugging tool
   as usual)
3) not being susceptible to the newest ptrace addition of the day (you
   just mentioned a ptrace rework with the utrace framework).
4) I didn't want to require an userland knowledge of kernel details
   like syscall numbers and signal details for all archs (the signal
   part could even go out of sync with the kernel).
5) being simple, so less likely to be buggy. ptrace security is
   extremely complex, just the case where the ptracer tasks gets
   killed and the ptraced tasks must be synchronously sigkilled too is
   a controlled race in itself (that again could break after the
   frequent ptrace reworks you just mentioned and since it's a race
   condition it may go unnoticed for a while).
6) Ptrace is generally not being used for critical security features,
   it's primarly a debugging kludge, and others (including my ex. prof) are
   using it for virtualization similar in UML. But they're not running
   untrusted bytecode inside UML or in their virtualization software.
   No major outbreak would happen if ptrace suddenly breaks after one
   of the frequent reworks that you just mentioned.

  reply	other threads:[~2006-07-13  1:16 UTC|newest]

Thread overview: 71+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-06-29 19:21 [2.6 patch] let CONFIG_SECCOMP default to n Adrian Bunk
2006-06-30  0:44 ` Lee Revell
2006-06-30  1:07   ` Andrew Morton
2006-06-30  1:40     ` Adrian Bunk
2006-06-30  4:52       ` Andrea Arcangeli
2006-06-30  9:47         ` Ingo Molnar
2006-06-30 14:58           ` andrea
2006-07-11  7:36             ` [patch] " Ingo Molnar
2006-07-11 14:17               ` andrea
2006-07-11 14:32                 ` Arjan van de Ven
2006-07-11 15:31                   ` andrea
2006-07-11 15:54                     ` Arjan van de Ven
2006-07-11 16:13                       ` andrea
2006-07-11 16:23                         ` Arjan van de Ven
2006-07-11 16:57                         ` Alan Cox
2006-07-11 16:25                       ` Alan Cox
2006-07-11 16:02                     ` Adrian Bunk
2006-07-11 16:16                       ` andrea
2006-07-11 16:24                     ` Alan Cox
2006-07-12 15:43                       ` Andi Kleen
2006-07-12 21:07                         ` Ingo Molnar
2006-07-12 22:06                           ` Andi Kleen
2006-07-12 22:19                             ` Ingo Molnar
2006-07-12 22:33                               ` Andi Kleen
2006-07-12 22:49                                 ` Ingo Molnar
2006-07-13  3:16                               ` Andrea Arcangeli
2006-07-13 11:23                                 ` Jeff Dike
2006-07-13 11:35                                   ` Ingo Molnar
2006-07-13  3:04                             ` Andrea Arcangeli
2006-07-13  3:12                               ` Linus Torvalds
2006-07-13  4:40                                 ` Andrea Arcangeli
2006-07-13  4:51                                   ` andrea
2006-07-13  5:12                                   ` Linus Torvalds
2006-07-13  6:22                                     ` andrea
2006-07-13  1:51                           ` Andrew Morton
2006-07-13  2:00                             ` Linus Torvalds
2006-07-13  7:44                             ` James Bruce
2006-07-13  8:34                               ` andrea
2006-07-13  9:18                                 ` Andrew Morton
2006-07-14  6:09                                   ` [PATCH] TIF_NOTSC and SECCOMP prctl andrea
2006-07-14  6:27                                     ` Andrew Morton
2006-07-14  6:33                                       ` andrea
2006-07-13 12:13                             ` [patch] let CONFIG_SECCOMP default to n Andi Kleen
2006-07-12 21:22                         ` Ingo Molnar
2006-07-12 22:11                           ` Andi Kleen
2006-07-11 15:54                 ` Pavel Machek
2006-06-30 12:39       ` [2.6 patch] " Alan Cox
2006-06-30  2:35     ` Randy.Dunlap
2006-06-30 15:03       ` Lee Revell
2006-07-08  9:23         ` Andrea Arcangeli
2006-07-11  1:59           ` Andrew James Wade
2006-07-11  4:16             ` andrea
2006-07-11 20:19               ` Andrew James Wade
2006-07-12 21:05                 ` andrea
2006-07-12 22:02                   ` Alan Cox
2006-07-12 23:44                     ` andrea
2006-07-13 21:29                       ` Pavel Machek
2006-07-13 23:11                         ` andrea
2006-07-13 23:20                           ` Pavel Machek
2006-07-14  0:34                             ` andrea
2006-07-15  2:55                           ` Valdis.Kletnieks
2006-07-16  0:51                             ` andrea
2006-07-16  1:54                               ` Pavel Machek
2006-07-16 15:36                                 ` andrea
2006-07-13  2:56                     ` Andrew James Wade
2006-07-12 21:13                 ` Ingo Molnar
2006-07-13  1:16                   ` andrea [this message]
2006-07-13  1:37                   ` Andrew James Wade
  -- strict thread matches above, loose matches on Subject: below --
2006-06-26 16:26 Adrian Bunk
2006-04-27 20:33 Adrian Bunk
2006-04-18 22:07 Adrian Bunk

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=20060713011658.GB9102@opteron.random \
    --to=andrea@cpushare.com \
    --cc=ajwade@cpe001346162bf9-cm0011ae8cd564.cpe.net.cable.rogers.com \
    --cc=akpm@osdl.org \
    --cc=bunk@stusta.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rdunlap@xenotime.net \
    --cc=rlrevell@joe-job.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