From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43231) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaX4e-00059Q-OS for qemu-devel@nongnu.org; Fri, 11 Sep 2015 18:45:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1ZaX4b-0006mz-FF for qemu-devel@nongnu.org; Fri, 11 Sep 2015 18:45:40 -0400 Received: from www.safe-mail.net ([212.29.227.230]:38203 helo=tapuz.safe-mail.net) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZaX4b-0006jb-3w for qemu-devel@nongnu.org; Fri, 11 Sep 2015 18:45:37 -0400 Date: Fri, 11 Sep 2015 18:45:27 -0400 From: "Namsun Ch'o" Message-Id: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: Re: [Qemu-devel] [PATCH] Add a few argument filters to the seccomp sandbox List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: pmoore@redhat.com Cc: qemu-devel@nongnu.org, eduardo.otubo@profitbricks.com > On Thursday, September 10, 2015 03:48:52 PM Daniel P. Berrange wrote: > > On Wed, Sep 09, 2015 at 09:55:33PM -0400, namnamc@Safe-mail.net wrote: > > > + > > > + /* shmget */ > > > + rc = seccomp_rule_add(ctx, SCMP_ACT_ALLOW, SCMP_SYS(shmget), 2, > > > + SCMP_A0(SCMP_CMP_EQ, IPC_PRIVATE), > > > + SCMP_A2(SCMP_CMP_EQ, IP_CREAT|0777)); > > > > I'm not familiar with semantics of these seccomp rules, but is this > > saying that the second arg must be exactly equal to IP_CREAT|0777 ? > > Yes. > > > If the app passes IP_CREAT|0600, would that be permitted instead ? > > The latter is what I see gtk2 source code passing for mode. > > It wouldn't match the rule as written above, if it doesn't match any other > configured rules it would hit the default filter action. > > -- > paul moore > security @ redhat I'd already replied to that but in a new top-level thread because I had an updated patch. Did I misunderstand the "contributing a patch" FAQ? Anyway, I added the IP_CREAT|0600 rule to the v2 patch: https://lists.nongnu.org/archive/html/qemu-devel/2015-09/msg02953.html