All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pavel Machek <pavel@ucw.cz>
To: Adam Langley <agl@google.com>
Cc: linux-kernel@vger.kernel.org, markus@google.com
Subject: Re: [RFC 1/1] seccomp: Add bitmask of allowed system calls.
Date: Fri, 15 May 2009 21:56:44 +0200	[thread overview]
Message-ID: <20090515195644.GA1377@ucw.cz> (raw)
In-Reply-To: <396556a20805301217k293e5718h6bbf02b234897235@europa>

Hi!

> Briefly, it adds a second seccomp mode (2) where one uploads a bitmask.
> Syscall n is allowed if, and only if, bit n is true in the bitmask. If n
> is beyond the range of the bitmask, the syscall is denied.
> 
> If prctl is allowed by the bitmask, then a process may switch to mode 1,
> or may set a new bitmask iff the new bitmask is a subset of the current
> one. (Possibly moving to mode 1 should only be allowed if read, write,
> sigreturn, exit are in the currently allowed set.)
> 
> If a process forks/clones, the child inherits the seccomp state of the
> parent. (And hopefully I'm managing the memory correctly here.)

If you allow setuid exec here, you have added a security hole. Deny
setuid() to sendmail and have fun...

-- 
(english) http://www.livejournal.com/~pavelmachek
(cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html

  parent reply	other threads:[~2009-05-15 19:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-05-07 21:48 [RFC 1/1] seccomp: Add bitmask of allowed system calls Adam Langley
2009-05-07 22:14 ` Ingo Molnar
2009-05-07 22:34   ` Adam Langley
2009-05-07 23:00     ` Frederic Weisbecker
2009-05-08  5:32       ` Tom Zanussi
2009-05-08  9:19         ` Ingo Molnar
2009-05-08 11:12         ` Frederic Weisbecker
2009-05-08  9:20       ` Ingo Molnar
2009-05-08  2:37   ` James Morris
2009-05-08  9:44     ` Ingo Molnar
2009-05-15 19:56 ` Pavel Machek [this message]
2009-05-15 20:29   ` Adam Langley

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=20090515195644.GA1377@ucw.cz \
    --to=pavel@ucw.cz \
    --cc=agl@google.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=markus@google.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.