qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Paul Moore <pmoore@redhat.com>
To: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Cc: coreyb@linux.vnet.ibm.com, wad@chromium.org, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH] seccomp: adding a second whitelist
Date: Fri, 30 Aug 2013 11:32:43 -0400	[thread overview]
Message-ID: <1424756.02OYxZYj2d@sifl> (raw)
In-Reply-To: <5220ABD0.7000802@linux.vnet.ibm.com>

On Friday, August 30, 2013 11:27:28 AM Eduardo Otubo wrote:
> On 08/29/2013 09:56 AM, Paul Moore wrote:
> > On Wednesday, August 28, 2013 10:04:32 PM Eduardo Otubo wrote:
> >> Now there's a second whitelist, right before the vcpu starts. The second
> >> whitelist is the same as the first one, except for exec() and select().
> >> 
> >> Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
> > 
> > We talked about this in a previous thread, but as a reminder, the kernel's
> > seccomp BPF filter works by executing all of the loaded filters for each
> > syscall and taking the least permissive action for all of the results.  In
> > other words, if one filter returns ALLOW for a given syscall and another
> > filter returns KILL, the kernel will select the KILL action for the
> > syscall.
> > 
> > With that in mind, I think the best option is to keep the existing
> > whitelist and instead of creating a second whitelist, create a second
> > *blacklist* that removes the syscalls you don't want to allow anymore,
> > e.g. exec() and select().  This approach should be easier to maintain and
> > would result in less overhead in the kernel's seccomp evaluator (the
> > blacklist filter would be much smaller than a second whitelist filter).
> 
> You're correct. I was thinking in a whole other approach, but your point
> makes a lot more sense. As I mentioned on the IRC, I should call
> seccomp_init(SCMP_ACT_ALLOW) and seccomp_rule_add(ctx, SCMP_ACT_KILL,
> list[i].num, 0); is that correct?

Yes, just basically swap the actions.

Also, as an FYI, while I may be in the IRC room, I typically don't actually 
monitor the room unless you direct a comment at me (it starts blinking and 
grabs my attention).

-- 
paul moore
security and virtualization @ redhat

      reply	other threads:[~2013-08-30 15:33 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-08-29  1:04 [Qemu-devel] [PATCH] seccomp: adding a second whitelist Eduardo Otubo
2013-08-29  8:34 ` Stefan Hajnoczi
2013-08-29  8:56   ` Paolo Bonzini
2013-08-30 14:22     ` Eduardo Otubo
2013-08-30 14:21   ` Eduardo Otubo
2013-08-30 15:23     ` Stefan Hajnoczi
2013-08-30 15:42       ` Paul Moore
2013-09-02  9:05         ` Stefan Hajnoczi
2013-09-03 18:02     ` Corey Bryant
2013-09-03 18:08       ` Corey Bryant
2013-09-03 18:21         ` Paul Moore
2013-09-03 18:23           ` Corey Bryant
2013-09-03 20:07           ` Eduardo Otubo
2013-09-03 21:49             ` Paul Moore
2013-09-03 20:05       ` Eduardo Otubo
2013-09-03 21:08         ` Corey Bryant
2013-08-29 12:56 ` Paul Moore
2013-08-30 14:27   ` Eduardo Otubo
2013-08-30 15:32     ` Paul Moore [this message]

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=1424756.02OYxZYj2d@sifl \
    --to=pmoore@redhat.com \
    --cc=coreyb@linux.vnet.ibm.com \
    --cc=otubo@linux.vnet.ibm.com \
    --cc=qemu-devel@nongnu.org \
    --cc=wad@chromium.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).