qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PULL 00/05] seccomp branch queue
@ 2015-10-30 13:44 Eduardo Otubo
  2015-10-30 13:44 ` [Qemu-devel] [PULL 01/05] seccomp: add cacheflush to whitelist Eduardo Otubo
                   ` (5 more replies)
  0 siblings, 6 replies; 20+ messages in thread
From: Eduardo Otubo @ 2015-10-30 13:44 UTC (permalink / raw)
  To: qemu-devel; +Cc: namnamc, peter.maydell, drjones, Eduardo Otubo, dann.frazier

The following changes since commit c49d3411faae8ffaab8f7e5db47405a008411c10:

  Merge remote-tracking branch 'remotes/armbru/tags/pull-qapi-2015-10-12' into staging (2015-10-13 10:42:06 +0100)

are available in the git repository at:

  git://github.com/otubo/qemu.git tags/pull-seccomp-20151030

for you to fetch changes up to b1e1f0bbe7268d0bb8f63da220b41803b2e54081:

  seccomp: loosen library version dependency (2015-10-30 14:33:00 +0100)

----------------------------------------------------------------
seccomp branch queue

----------------------------------------------------------------
Andrew Jones (2):
      seccomp: add cacheflush to whitelist
      configure: arm/aarch64: allow enable-seccomp

Namsun Ch'o (2):
      seccomp: add madvise, shmget, and shmctl to whitelist
      seccomp: add setuid, setgid, chroot and setgroups to whitelist

dann frazier (1):
      seccomp: loosen library version dependency

 configure      | 32 ++++++++++++++++++++++-------
 qemu-seccomp.c | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++++----
 2 files changed, 86 insertions(+), 11 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 04/05] seccomp: add setuid, setgid, chroot and setgroups to whitelist
@ 2015-11-18  7:10 Namsun Ch'o
  0 siblings, 0 replies; 20+ messages in thread
From: Namsun Ch'o @ 2015-11-18  7:10 UTC (permalink / raw)
  To: eduardo.otubo; +Cc: qemu-devel

> I think this patch should not be applied, because it completely defeats
> the purpose of the sandbox.  With these syscalls whitelisted, -runas 
> and
> -chroot have absolutely no effect against an attacker, even with
> -sandbox on.
> 
> Paolo

Adding chroot() and set*id() doesn't break the purpose of the sandbox 
though,
because the only purpose of seccomp is to reduce kernel attack surface 
area.
Just because setuid() is permitted does not mean it can get root (and 
even if
it did, it would not escape the sandbox and be permitted to use denied
syscalls). The sandbox will be enforced no matter what your EUID.

The whitelist only means those calls are permitted, not that they will 
always
succeed without permission checks. If allowing them defeats the purpose 
of
-runas and -chroot, then both of those options would be useless without 
a
sandbox anyway. The only time I can think of where it wouldn't stop an
attacker is if you do -runas root with -chroot (which is silly because 
not
only does -runas root not work even if you are root, and root can break 
out of
a chroot anyway). Furthermore, if an attacker manages to find a kernel 
exploit
which gives them root anyway, they would do so without calling setuid() 
at
all. Which again shows that the purpose of the seccomp sandbox is to 
prevent
the kernel from being compromised, not to prevent a non-root process 
from
breaking out of a chroot or using setuid(0). That's what standard 
permission
checks are for, which a syscall whitelist does not replace or disable.

> Also, Namsun's emails are bouncing back. Don't know if it's worth to
> merge them with no valid author's contact.

My old email service had a hardware failure. I don't know when it'll be 
up.

^ permalink raw reply	[flat|nested] 20+ messages in thread
* Re: [Qemu-devel] [PULL 04/05] seccomp: add setuid, setgid, chroot and setgroups to whitelist
@ 2015-11-19  2:35 Namsun Ch'o
  0 siblings, 0 replies; 20+ messages in thread
From: Namsun Ch'o @ 2015-11-19  2:35 UTC (permalink / raw)
  To: eduardo.otubo; +Cc: qemu-devel

I have no idea why the lines didn't wrap in my last post... Sorry about 
that.

^ permalink raw reply	[flat|nested] 20+ messages in thread

end of thread, other threads:[~2015-11-19  2:35 UTC | newest]

Thread overview: 20+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-30 13:44 [Qemu-devel] [PULL 00/05] seccomp branch queue Eduardo Otubo
2015-10-30 13:44 ` [Qemu-devel] [PULL 01/05] seccomp: add cacheflush to whitelist Eduardo Otubo
2015-11-02 17:56   ` [Qemu-devel] [PATCH v2] " Andrew Jones
2015-11-02 18:09     ` Peter Maydell
2015-11-02 19:04       ` Andrew Jones
2015-11-02 20:37         ` Peter Maydell
2015-11-02 22:18           ` Andrew Jones
2015-11-02 22:53   ` [Qemu-devel] [PATCH v3] " Andrew Jones
2015-11-09 21:47     ` Andrew Jones
2015-11-11  8:23       ` Eduardo Otubo
2015-10-30 13:44 ` [Qemu-devel] [PULL 02/05] configure: arm/aarch64: allow enable-seccomp Eduardo Otubo
2015-10-30 13:44 ` [Qemu-devel] [PULL 03/05] seccomp: add madvise, shmget, and shmctl to whitelist Eduardo Otubo
2015-10-30 13:44 ` [Qemu-devel] [PULL 04/05] seccomp: add setuid, setgid, chroot and setgroups " Eduardo Otubo
2015-11-02  7:51   ` Paolo Bonzini
2015-11-11  8:25     ` Eduardo Otubo
2015-10-30 13:44 ` [Qemu-devel] [PULL 05/05] seccomp: loosen library version dependency Eduardo Otubo
2015-10-30 16:30 ` [Qemu-devel] [PULL 00/05] seccomp branch queue Peter Maydell
2015-10-30 18:35   ` Andrew Jones
  -- strict thread matches above, loose matches on Subject: below --
2015-11-18  7:10 [Qemu-devel] [PULL 04/05] seccomp: add setuid, setgid, chroot and setgroups to whitelist Namsun Ch'o
2015-11-19  2:35 Namsun Ch'o

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).