From mboxrd@z Thu Jan 1 00:00:00 1970 From: ebiederm@xmission.com (Eric W. Biederman) Subject: Re: RFC: disablenetwork facility. (v4) Date: Tue, 29 Dec 2009 03:06:16 -0800 Message-ID: References: <20091229050114.GC14362@heat> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: "Serge E. Hallyn" , linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-security-module@vger.kernel.org, Andi Kleen , David Lang , Oliver Hartkopp , Alan Cox , Herbert Xu , Valdis Kletnieks , Bryan Donlan , Evgeniy Polyakov , "C. Scott Ananian" , James Morris , Bernie Innocenti , Mark Seaborn , Randy Dunlap , =?iso-8859-1?Q?Am=E9rico?= Wang , Tetsuo Handa , Samir Bellabes , Casey Schaufler , Pavel Machek , Al Viro To: Michael Stone Return-path: In-Reply-To: <20091229050114.GC14362@heat> (Michael Stone's message of "Tue\, 29 Dec 2009 00\:01\:14 -0500") Sender: linux-kernel-owner@vger.kernel.org List-Id: netdev.vger.kernel.org Michael Stone writes: > Serge, > > I think that Pavel's point, at its strongest and most general, could be > rephrased as: > > "Adding *any* interesting isolation facility to the kernel breaks backwards > compatibility for *some* program [in a way that violates security goals]." *some* privileged program. > The reason is the one that I identified in my previous note: > > "The purpose of isolation facilities is to create membranes inside which > grievous security faults are converted into availability faults." > > The question then is simply: > > "How do we want to deal with the compatibility-breaking changes created by > introducing new isolation facilities?" You have a very peculiar taxonomy of the suggestions, that fails to capture the concerns. I strongly recommend working out a way to disable setuid exec. Ideally we would use capabilities to achieve this. Serge can we have a capability that unprivelged processes normally have an can drop without privelege? I can see one of two possible reasons you are avoiding the suggestion to disable setuid root. - You have a use for setuid root executables in your contained environment. If you do what is that use? - Disabling suid root executables is an indirect path to your goal. The problem with the disable_network semantics you want is that they allow you to perform a denial of service attack on privileged users. An unprivileged DOS attack is unsuitable for a general purpose feature in a general purpose kernel. Your sysctl, your boot option, your Kconfig option all fail to be viable options for the same reason. Your facility is only valid in an audited userspace. Disabling setuid-exec especially to a subset of processes is valid in an unaudited userspace as it does not allow propagating the DOS to privileged processes. Eric