mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Rémi Denis-Courmont" <rdenis@simphalempin.com>
To: Andi Kleen <andi@firstfloor.org>
Cc: Valdis.Kletnieks@vt.edu, Alan Cox <alan@lxorguk.ukuu.org.uk>,
	Michael Stone <michael@laptop.org>,
	linux-kernel@vger.kernel.org
Subject: Re: RFC: Network privilege separation.
Date: Tue, 13 Jan 2009 09:06:39 +0100	[thread overview]
Message-ID: <e81d9c0cbc85262051b2246783bb193b@chewa.net> (raw)
In-Reply-To: <20090112215001.GG23848@one.firstfloor.org>


   Hello,

On Mon, 12 Jan 2009 22:50:01 +0100, Andi Kleen <andi@firstfloor.org> wrote:
>> Fair enough. It's just way too much interface/adaptation work compared
>> to the benefit. Especially considering that it would be much easier, and
>> almost as secure, with a "relaxed" SECCOMP.
> 
> What system calls would you want in a relaxed SECCOMP?

I already listed them on a high level. At the very very least, brk(),
sbrk(), mmap(), mremap(), getpagesize() and munmap() so that we can re-use
the libc memory allocator. If one wants to limit memory usage, there is
always setrlimit() before enabling SECCOMP.

Also readv() and writev() could not hurt; I suppose neither could
vmsplice().

I don't know what are the security implications of inter-process futex(). I
assume it's possible to freeze, and perhaps busy loop other task that would
use the same futexes. That is OK to me. But it's not clear to me if
something really bad, like arbitrary memory access could be achieved.
Notably, with futex() allowable, we can also grant clone(), gettid() and
then we can run parallelized codecs on SMP.

>> And on top of that, it's causing
>> unnecessary overhead (we're also interested in those small Linux-based
> 
> Would be interesting to try that out -- just adding two memcpyies to
> the existing code and see how much slower it gets. My guess
> would be not very, even e.g. on a Atom system (which are really
> not all that slow).
> 
> Presumably you could always #ifdef it if it's really a problem
> on some specific system. That would be needed anyways for
> non linux systems.

In practice, I suspect the most work would come from reworking the build
system such that codecs are executable rather than libraries. I suspect a
plain fork() with _no_ exec() would leave to many unused anonymous pages
from the main media player process, not to mention information leakage.

I'd like to point out that, from my personnal experience, we've had more
problem this far with file format parsers than codecs. I don't know why. It
might be because they are easier for pirates to talk to, as they're one
step closer to the data than codecs. Or it is that the VideoLAN project is
writing overall more buggy code than, say, FFMPEG :-( ?

To sandbox parsers, we might need a whole lot more stuff, especially timers
and events handling stuff.

-- 
Rémi Denis-Courmont


  reply	other threads:[~2009-01-13  8:06 UTC|newest]

Thread overview: 39+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-07  5:48 Michael Stone
2009-01-07  5:48 ` [PATCH] Security: Implement and document RLIMIT_NETWORK Michael Stone
2009-01-07 11:47   ` Evgeniy Polyakov
2009-01-07 16:52     ` Rémi Denis-Courmont
2009-01-07 17:48       ` Evgeniy Polyakov
2009-01-07 20:54         ` Rémi Denis-Courmont
2009-01-07 21:42           ` Evgeniy Polyakov
2009-01-07 18:35     ` C. Scott Ananian
2009-01-07 19:02       ` Evgeniy Polyakov
2009-01-07 19:39         ` Evgeniy Polyakov
2009-01-07 21:07     ` Michael Stone
2009-01-07 21:59       ` Evgeniy Polyakov
2009-01-08  0:56         ` Michael Stone
2009-01-08  4:27           ` Evgeniy Polyakov
2009-01-08  1:22       ` James Morris
2009-01-08  3:34         ` Michael Stone
2009-01-07 21:10 ` RFC: Network privilege separation Andi Kleen
2009-01-08  2:31   ` Michael Stone
2009-01-08  3:10     ` Andi Kleen
2009-01-08  4:51       ` Michael Stone
2009-01-08  5:41         ` Andi Kleen
2009-01-08  7:05       ` Oliver Hartkopp
2009-01-08  7:52       ` david
2009-01-08 10:43     ` Alan Cox
2009-01-12 18:44       ` Valdis.Kletnieks
2009-01-12 19:09         ` Bryan Donlan
2009-01-12 19:43         ` Andi Kleen
2009-01-12 19:47           ` Rémi Denis-Courmont
2009-01-12 20:14             ` Andi Kleen
2009-01-12 20:15               ` Rémi Denis-Courmont
2009-01-12 20:27                 ` Evgeniy Polyakov
2009-01-12 20:39                 ` Andi Kleen
2009-01-12 20:30                   ` Rémi Denis-Courmont
2009-01-12 20:55                     ` Andi Kleen
2009-01-12 20:47                       ` Rémi Denis-Courmont
2009-01-12 21:50                         ` Andi Kleen
2009-01-13  8:06                           ` Rémi Denis-Courmont [this message]
2009-01-08 12:08 Herbert Xu
2009-01-08 12:10 Herbert Xu

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=e81d9c0cbc85262051b2246783bb193b@chewa.net \
    --to=rdenis@simphalempin.com \
    --cc=Valdis.Kletnieks@vt.edu \
    --cc=alan@lxorguk.ukuu.org.uk \
    --cc=andi@firstfloor.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=michael@laptop.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®