linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: Will Drewry <wad@chromium.org>
To: Eric Paris <eparis@redhat.com>
Cc: linux-mips@linux-mips.org, linux-sh@vger.kernel.org,
	Peter Zijlstra <peterz@infradead.org>,
	Frederic Weisbecker <fweisbec@gmail.com>,
	Heiko Carstens <heiko.carstens@de.ibm.com>,
	Oleg Nesterov <oleg@redhat.com>,
	David Howells <dhowells@redhat.com>,
	Paul Mackerras <paulus@samba.org>,
	"H. Peter Anvin" <hpa@zytor.com>,
	sparclinux@vger.kernel.org, Jiri Slaby <jslaby@suse.cz>,
	linux-s390@vger.kernel.org, Russell King <linux@arm.linux.org.uk>,
	x86@kernel.org, James Morris <jmorris@namei.org>,
	Linus Torvalds <torvalds@linux-foundation.org>,
	Ingo Molnar <mingo@redhat.com>, Ingo Molnar <mingo@elte.hu>,
	"Serge E. Hallyn" <serge@hallyn.com>,
	Steven Rostedt <rostedt@goodmis.org>, Tejun Heo <tj@kernel.org>,
	Thomas Gleixner <tglx@linutronix.de>,
	kees.cook@canonical.com, linux-arm-kernel@lists.infradead.org,
	Michal Marek <mmarek@suse.cz>, Michal Simek <monstr@monstr.eu>,
	linuxppc-dev@lists.ozlabs.org, linux-kernel@vger.kernel.org,
	Ralf Baechle <ralf@linux-mips.org>,
	Paul Mundt <lethal@linux-sh.org>,
	Martin Schwidefsky <schwidefsky@de.ibm.com>,
	linux390@de.ibm.com, Andrew Morton <akpm@linux-foundation.org>,
	agl@chromium.org, "David S. Miller" <davem@davemloft.net>
Subject: Re: [PATCH 3/5] v2 seccomp_filters: Enable ftrace-based system call filtering
Date: Fri, 13 May 2011 11:29:06 -0500	[thread overview]
Message-ID: <BANLkTinDO0OSav7NgjuE4E5E-Yu2==EQwg@mail.gmail.com> (raw)
In-Reply-To: <1305302141.2076.56.camel@localhost.localdomain>

On Fri, May 13, 2011 at 10:55 AM, Eric Paris <eparis@redhat.com> wrote:
> On Fri, 2011-05-13 at 17:23 +0200, Peter Zijlstra wrote:
>> On Fri, 2011-05-13 at 11:10 -0400, Eric Paris wrote:
>> > Then again, I certainly don't see a
>> > reason that this syscall hardening patch should be held up while a who=
le
>> > new concept in computer security is contemplated...
>>
>> Which makes me wonder why this syscall hardening stuff is done outside
>> of LSM? Why isn't is part of the LSM so that say SELinux can have a
>> syscall bitmask per security context?
>
> I could do that, but I like Will's approach better. =A0From the PoV of
> meeting security goals of information flow, data confidentiality,
> integrity, least priv, etc limiting on the syscall boundary doesn't make
> a lot of sense. =A0You just don't know enough there to enforce these
> things. =A0These are the types of goals that SELinux and other LSMs have
> previously tried to enforce. =A0From the PoV of making the kernel more
> resistant to attacks and making a process more resistant to misbehavior
> I think that the syscall boundary is appropriate. =A0Although I could do
> it in SELinux it don't really want to do it there.

There's also the problem that there are no hooks per-system call for
LSMs, only logical hooks that sometimes mirror system call names and
are called after user data has been parsed.  If system call enter
hooks, like seccomp's, were added for LSMs, it would allow the lsm
bitmask approach, but it still wouldn't satisfy the issues you raise
below (and I wholeheartedly agree with).

> In case people are interested or confused let me give my definition of
> two words I've used a bit in these conversations: discretionary and
> mandatory. =A0Any time I talk about a 'discretionary' security decision i=
t
> is a security decisions that a process imposed upon itself. =A0Aka the
> choice to use seccomp is discretionary. =A0The choice to mark our own fil=
e
> u-wx is discretionary. =A0This isn't the best definition but it's one tha=
t
> works well in this discussion. =A0Mandatory security is one enforce by a
> global policy. =A0It's what selinux is all about. =A0SELinux doesn't give
> hoot what a process wants to do, it enforces a global policy from the
> top down. =A0You take over a process, well, too bad, you still have no
> choice but to follow the mandatory policy.
>
> The LSM does NOT enforce a mandatory access control model, it's just how
> it's been used in the past. =A0Ingo appears to me (please correct me if
> I'm wrong) to really be a fan of exposing the flexibility of the LSM to
> a discretionary access control model. =A0That doesn't seem like a bad
> idea. =A0And maybe using the filter engine to define the language to do
> this isn't a bad idea either. =A0But I think that's a 'down the road'
> project, not something to hold up a better seccomp.
>
>> Making it part of the LSM also avoids having to add this prctl().
>
> Well, it would mean exposing some new language construct to every LSM
> (instead of a single prctl construct) and it would mean anyone wanting
> to use the interface would have to rely on the LSM implementing those
> hooks the way they need it. =A0Honestly chrome can already get all of the
> benefits of this patch (given a perfectly coded kernel) and a whole lot
> more using SELinux, but (surprise surprise) not everyone uses SELinux.
> I think it's a good idea to expose a simple interface which will be
> widely enough adopted that many userspace applications can rely on it
> for hardening.
>
> The existence of the LSM and the fact that there exists multiple
> security modules that may or may not be enabled really leads application
> developers to be unable to rely on LSM for security. =A0If linux had a
> single security model which everyone could rely on we wouldn't really
> have as big of an issue but that's not possible. =A0So I'm advocating for
> this series which will provide a single useful change which applications
> can rely upon across distros and platforms to enhance the properties and
> abilities of the linux kernel.
>
> -Eric
>
>

  reply	other threads:[~2011-05-13 16:29 UTC|newest]

Thread overview: 77+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <1304017638.18763.205.camel@gandalf.stny.rr.com>
2011-05-12  3:02 ` [PATCH 3/5] v2 seccomp_filters: Enable ftrace-based system call filtering Will Drewry
2011-05-12  7:48   ` Ingo Molnar
2011-05-12  9:24     ` Kees Cook
2011-05-12 10:49       ` Ingo Molnar
2011-05-12 11:44     ` James Morris
2011-05-12 13:01       ` Ingo Molnar
2011-05-12 16:26         ` Will Drewry
2011-05-16 12:55           ` Ingo Molnar
2011-05-16 14:42             ` Will Drewry
2011-05-13  0:18         ` James Morris
2011-05-13 12:10           ` Ingo Molnar
2011-05-13 12:19             ` Peter Zijlstra
2011-05-13 12:26               ` Ingo Molnar
2011-05-13 12:39                 ` Peter Zijlstra
2011-05-13 12:43                   ` Peter Zijlstra
2011-05-13 12:54                     ` Ingo Molnar
2011-05-13 13:08                       ` Peter Zijlstra
2011-05-13 13:18                         ` Ingo Molnar
2011-05-13 13:55                           ` Peter Zijlstra
2011-05-13 14:57                             ` Ingo Molnar
2011-05-13 15:27                               ` Peter Zijlstra
2011-05-14  7:05                                 ` Ingo Molnar
2011-05-16 16:23                               ` Steven Rostedt
2011-05-16 16:52                                 ` Ingo Molnar
2011-05-16 17:03                                   ` Steven Rostedt
2011-05-17 12:42                                     ` Ingo Molnar
2011-05-17 13:05                                       ` Steven Rostedt
2011-05-17 13:19                                         ` Ingo Molnar
2011-05-19  4:07                                           ` Will Drewry
2011-05-19 12:22                                             ` Steven Rostedt
2011-05-19 21:05                                               ` Will Drewry
2011-05-24 15:59                                                 ` Will Drewry
2011-05-24 16:20                                                   ` Peter Zijlstra
2011-05-24 16:25                                                     ` Thomas Gleixner
2011-05-24 19:00                                                       ` Will Drewry
2011-05-24 19:54                                                     ` Ingo Molnar
2011-05-24 20:10                                                       ` Ingo Molnar
2011-05-25 10:35                                                       ` Thomas Gleixner
2011-05-25 15:01                                                         ` Ingo Molnar
2011-05-25 17:43                                                           ` Peter Zijlstra
2011-05-29 20:17                                                             ` Ingo Molnar
2011-05-25 17:48                                                           ` Thomas Gleixner
2011-05-26  8:43                                                             ` Ingo Molnar
2011-05-26  9:15                                                             ` Ingo Molnar
2011-05-24 20:08                                                   ` Ingo Molnar
2011-05-24 20:14                                                     ` Steven Rostedt
2011-05-13 15:17                           ` Eric Paris
2011-05-13 15:29                             ` [PATCH 3/5] v2 seccomp_filters: Enable ftrace-based system callfiltering David Laight
2011-05-16 12:03                               ` Ingo Molnar
2011-05-13 12:49                   ` [PATCH 3/5] v2 seccomp_filters: Enable ftrace-based system call filtering Ingo Molnar
2011-05-13 13:55                     ` Peter Zijlstra
2011-05-13 15:02                       ` Ingo Molnar
2011-05-13 15:10             ` Eric Paris
2011-05-13 15:23               ` Peter Zijlstra
2011-05-13 15:55                 ` Eric Paris
2011-05-13 16:29                   ` Will Drewry [this message]
2011-05-14  7:30               ` Ingo Molnar
2011-05-14 20:57                 ` Will Drewry
2011-05-16 12:43                   ` Ingo Molnar
2011-05-16 15:29                     ` Will Drewry
2011-05-17 12:57                       ` Ingo Molnar
2011-05-16  0:36             ` James Morris
2011-05-16 15:08               ` Ingo Molnar
2011-05-17  2:24                 ` James Morris
2011-05-17 13:10                   ` Ingo Molnar
2011-05-17 13:29                     ` James Morris
2011-05-17 18:34                       ` Ingo Molnar
2011-05-26  6:27               ` Pavel Machek
2011-05-26  8:35                 ` Ingo Molnar
2011-05-12 12:15     ` Frederic Weisbecker
2011-05-12 11:33   ` James Morris
2011-05-13 19:35   ` Arnd Bergmann
2011-05-14 20:58     ` Will Drewry
2011-05-15  6:42       ` Arnd Bergmann
2011-05-16 12:00         ` Ingo Molnar
2011-05-16 15:26   ` Steven Rostedt
2011-05-16 15:28     ` Will Drewry

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='BANLkTinDO0OSav7NgjuE4E5E-Yu2==EQwg@mail.gmail.com' \
    --to=wad@chromium.org \
    --cc=agl@chromium.org \
    --cc=akpm@linux-foundation.org \
    --cc=davem@davemloft.net \
    --cc=dhowells@redhat.com \
    --cc=eparis@redhat.com \
    --cc=fweisbec@gmail.com \
    --cc=heiko.carstens@de.ibm.com \
    --cc=hpa@zytor.com \
    --cc=jmorris@namei.org \
    --cc=jslaby@suse.cz \
    --cc=kees.cook@canonical.com \
    --cc=lethal@linux-sh.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mips@linux-mips.org \
    --cc=linux-s390@vger.kernel.org \
    --cc=linux-sh@vger.kernel.org \
    --cc=linux390@de.ibm.com \
    --cc=linux@arm.linux.org.uk \
    --cc=linuxppc-dev@lists.ozlabs.org \
    --cc=mingo@elte.hu \
    --cc=mingo@redhat.com \
    --cc=mmarek@suse.cz \
    --cc=monstr@monstr.eu \
    --cc=oleg@redhat.com \
    --cc=paulus@samba.org \
    --cc=peterz@infradead.org \
    --cc=ralf@linux-mips.org \
    --cc=rostedt@goodmis.org \
    --cc=schwidefsky@de.ibm.com \
    --cc=serge@hallyn.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=tglx@linutronix.de \
    --cc=tj@kernel.org \
    --cc=torvalds@linux-foundation.org \
    --cc=x86@kernel.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;
as well as URLs for NNTP newsgroup(s).