From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751612AbdBDRLZ (ORCPT ); Sat, 4 Feb 2017 12:11:25 -0500 Received: from mail.kernel.org ([198.145.29.136]:47976 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751293AbdBDRLY (ORCPT ); Sat, 4 Feb 2017 12:11:24 -0500 MIME-Version: 1.0 In-Reply-To: <20170203232154.GA30114@ast-mbp.thefacebook.com> References: <20170118224120.GG9171@mtj.duckdns.org> <20170119005925.GA18554@mtj.duckdns.org> <20170120023907.GA3294@ast-mbp.thefacebook.com> <20170123043154.GA93519@ast-mbp.thefacebook.com> <20170203232154.GA30114@ast-mbp.thefacebook.com> From: Andy Lutomirski Date: Sat, 4 Feb 2017 09:10:57 -0800 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Potential issues (security and otherwise) with the current cgroup-bpf API To: Alexei Starovoitov Cc: Tejun Heo , Michal Hocko , Peter Zijlstra , David Ahern , Andy Lutomirski , Daniel Mack , =?UTF-8?B?TWlja2HDq2wgU2FsYcO8bg==?= , Kees Cook , Jann Horn , "David S. Miller" , Thomas Graf , Michael Kerrisk , Linux API , "linux-kernel@vger.kernel.org" , Network Development Content-Type: text/plain; charset=UTF-8 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Feb 3, 2017 at 3:21 PM, Alexei Starovoitov wrote: > On Fri, Feb 03, 2017 at 01:07:39PM -0800, Andy Lutomirski wrote: >> >> Is there any plan to address this? If not, I'll try to write that >> patch this weekend. > > yes. I'm working on 'disallow program override' flag. > It got stalled, because netns discussion got stalled. > Later today will send a patch for dev_id+inode and > will continue on the flag patch. > Would it make sense to try to document what your proposal does before writing the code? I don't yet see how to get semantics that are both simple and sensible with a "disallow override" flag. I *do* see how to get simple, sensible semantics with an approach where all the programs in scope for the cgroup in question get called. If needed, I can imagine a special "overridable" program that would not be run if the socket in question is bound to a descendent cgroup that also has an "overridable" program but would still let all the normal hierarchical programs in scope get called.