Received: from eggs.gnu.org ([2001:4830:134:3::10]:43858) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiyCy-0004OT-3T for qemu-devel@nongnu.org; Mon, 05 Oct 2015 01:21:08 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZiyCu-0007g4-Ty for qemu-devel@nongnu.org; Mon, 05 Oct 2015 01:21:08 -0400 Received: from mx1.redhat.com ([209.132.183.28]:53806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZiyCu-0007fm-Ol for qemu-devel@nongnu.org; Mon, 05 Oct 2015 01:21:04 -0400 From: Markus Armbruster References: Date: Mon, 05 Oct 2015 07:20:58 +0200 In-Reply-To: (Namsun Ch'o's message of "Sun, 4 Oct 2015 00:00:38 -0400") Message-ID: <878u7hao1x.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [PATCH] Add syscalls for -runas and -chroot tothe seccomp sandbox List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Namsun Ch'o Cc: qemu-devel@nongnu.org "Namsun Ch'o" writes: >> If we intend seccomp to protect against flaws during QEMU setup, then having >> it earlier is neccessary. eg QEMU opening a corrupt qcow2 image which might >> exploit QEMU before the guest CPUs start. > >> If the latter is the case, then we could start with a relaxed seccomp >> sandbox which included the setuid/chroot features, and then switch to a >> more restricted one which blocked them before main_loop() runs. > > That's not possible. Seccomp will not be enforced until seccomp_load(ctx) is > called, after which no new changes to the filter can be made. That's a pity. As long as it's the case, we need to pick: either we protect against rogue guests, or against rogue images. The original idea was the former, and it still makes the most sense to me.