From: Paul Moore <pmoore@redhat.com>
To: Eduardo Otubo <otubo@linux.vnet.ibm.com>, coreyb@linux.vnet.ibm.com
Cc: aliguori@us.ibm.com, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCHv2 3/4] Support for "double whitelist" filters
Date: Fri, 02 Nov 2012 17:29:07 -0400 [thread overview]
Message-ID: <1451403.LXhkiqE48F@sifl> (raw)
In-Reply-To: <1350971732-16621-3-git-send-email-otubo@linux.vnet.ibm.com>
On Tuesday, October 23, 2012 03:55:31 AM Eduardo Otubo wrote:
> This patch includes a second whitelist right before the main loop. It's
> a smaller and more restricted whitelist, excluding execve() among many
> others.
>
> v2: * ctx changed to main_loop_ctx
> * seccomp_on now inside ifdef
> * open syscall added to the main_loop whitelist
>
> Signed-off-by: Eduardo Otubo <otubo@linux.vnet.ibm.com>
Unfortunately qemu.org seems to be down for me today so I can't grab the
latest repo to review/verify this patch (some of my comments/assumptions below
may be off) but I'm a little confused, hopefully you guys can help me out,
read below ...
The first call to seccomp_install_filter() will setup a whitelist for the
syscalls that have been explicitly specified, all others will hit the default
action TRAP/KILL. The second call to seccomp_install_filter() will add a
second whitelist for another set of explicitly specified syscalls, all others
will hit the default action TRAP/KILL.
The problem occurs when the filters are executed in the kernel when a syscall
is executed. On each syscall the first filter will be executed and the action
will either be ALLOW or TRAP/KILL, next the second filter will be executed and
the action will either be ALLOW or TRAP/KILL; since the kernel always takes
the most restrictive (lowest integer action value) action when multiple
filters are specified, I think your double whitelist value is going to have
some inherent problems. I might suggest an initial, fairly permissive
whitelist followed by a follow-on blacklist if you want to disable certain
syscalls.
--
paul moore
security and virtualization @ redhat
next prev parent reply other threads:[~2012-11-02 21:29 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-10-23 5:55 [Qemu-devel] [PATCHv2 1/4] Adding new syscalls (bugzilla 855162) Eduardo Otubo
2012-10-23 5:55 ` [Qemu-devel] [PATCHv2 2/4] Setting "-sandbox on" as deafult Eduardo Otubo
2012-10-23 5:55 ` [Qemu-devel] [PATCHv2 3/4] Support for "double whitelist" filters Eduardo Otubo
2012-10-23 15:10 ` Corey Bryant
2012-10-24 20:06 ` Eduardo Otubo
2012-10-25 20:16 ` Eduardo Otubo
2012-11-02 21:29 ` Paul Moore [this message]
2012-11-02 22:00 ` Corey Bryant
2012-11-02 22:14 ` Paul Moore
2012-11-05 14:39 ` Corey Bryant
2012-11-05 21:58 ` Paul Moore
2012-11-05 22:26 ` Corey Bryant
2012-11-02 22:01 ` Anthony Liguori
2012-10-23 5:55 ` [Qemu-devel] [PATCHv2 4/4] Warning messages on net devices hotplug Eduardo Otubo
2012-10-23 15:59 ` Corey Bryant
2012-10-23 16:39 ` Eric Blake
2012-11-01 21:43 ` [Qemu-devel] [PATCHv2 1/4] Adding new syscalls (bugzilla 855162) Paul Moore
2012-11-02 2:29 ` Eduardo Otubo
2012-11-02 14:10 ` Paul Moore
2012-11-02 13:48 ` Corey Bryant
2012-11-02 14:10 ` Paul Moore
2012-11-02 14:38 ` Paul Moore
2012-11-02 14:43 ` Corey Bryant
2012-11-02 14:46 ` Paul Moore
2012-11-02 14:49 ` Corey Bryant
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=1451403.LXhkiqE48F@sifl \
--to=pmoore@redhat.com \
--cc=aliguori@us.ibm.com \
--cc=coreyb@linux.vnet.ibm.com \
--cc=otubo@linux.vnet.ibm.com \
--cc=qemu-devel@nongnu.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 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.