From patchwork Fri Sep 1 10:58:18 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Eduardo Otubo X-Patchwork-Id: 9933921 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id A72C96016C for ; Fri, 1 Sep 2017 11:05:07 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id AC841285CC for ; Fri, 1 Sep 2017 11:05:07 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 9E8F928614; Fri, 1 Sep 2017 11:05:07 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 36EB9285CC for ; Fri, 1 Sep 2017 11:05:07 +0000 (UTC) Received: from localhost ([::1]:35209 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnjl4-0004e6-Cl for patchwork-qemu-devel@patchwork.kernel.org; Fri, 01 Sep 2017 07:05:06 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:51335) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1dnjfB-0000Kk-1B for qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:59:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1dnjfA-0001Rg-5C for qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:59:01 -0400 Received: from mx1.redhat.com ([209.132.183.28]:45910) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1dnjf9-0001RK-V6 for qemu-devel@nongnu.org; Fri, 01 Sep 2017 06:59:00 -0400 Received: from smtp.corp.redhat.com (int-mx02.intmail.prod.int.phx2.redhat.com [10.5.11.12]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D8B49C047B9B for ; Fri, 1 Sep 2017 10:58:58 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D8B49C047B9B Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx07.extmail.prod.ext.phx2.redhat.com; spf=fail smtp.mailfrom=otubo@redhat.com Received: from vader.redhat.com (ovpn-117-156.ams2.redhat.com [10.36.117.156]) by smtp.corp.redhat.com (Postfix) with ESMTP id 7002D7E5D2; Fri, 1 Sep 2017 10:58:57 +0000 (UTC) From: Eduardo Otubo To: qemu-devel@nongnu.org Date: Fri, 1 Sep 2017 12:58:18 +0200 Message-Id: <20170901105818.31956-7-otubo@redhat.com> In-Reply-To: <20170901105818.31956-1-otubo@redhat.com> References: <20170901105818.31956-1-otubo@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.12 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.31]); Fri, 01 Sep 2017 10:58:59 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCHv4 6/6] seccomp: adding documentation to new seccomp model X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: thuth@redhat.com Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: "Qemu-devel" X-Virus-Scanned: ClamAV using ClamSMTP Adding new documentation under docs/ to describe every one and each new option added by the refactoring patchset. Signed-off-by: Eduardo Otubo --- docs/seccomp.txt | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 docs/seccomp.txt diff --git a/docs/seccomp.txt b/docs/seccomp.txt new file mode 100644 index 0000000000..a5eca85a9b --- /dev/null +++ b/docs/seccomp.txt @@ -0,0 +1,31 @@ +QEMU Seccomp system call filter +=============================== + +Starting from QEMU version 2.11, the seccomp filter does not work as a +whitelist but as a blacklist instead. This method allows safer deploys since +only the strictly forbidden system calls will be black-listed and the +possibility of breaking any workload is close to zero. + +The default option (-sandbox on) has a slightly looser security though and the +reason is that it shouldn't break any backwards compatibility with previous +deploys and command lines already running. But if the intent is to have a +better security from this version on, one should make use of the following +additional options properly: + +* obsolete=allow|deny: It allows Qemu to run safely on old system that still + relies on old system calls. + +* elevateprivileges=allow|deny|children: It allows or denies Qemu process + to elevate its privileges by blacklisting all set*uid|gid system calls. The + 'children' option sets the PR_SET_NO_NEW_PRIVS to 1 which allows helpers + (forks and execs) to run unprivileged. + +* spawn=allow|deny: It blacklists fork and execve system calls, avoiding QEMU to + spawn new threads or processes. + +* resourcecontrol=allow|deny: It blacklists all process affinity and scheduler + priority system calls to avoid that the process can increase its amount of + allowed resource consumption. + +-- +Eduardo Otubo