Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751938AbZL1UzZ (ORCPT ); Mon, 28 Dec 2009 15:55:25 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751510AbZL1UzY (ORCPT ); Mon, 28 Dec 2009 15:55:24 -0500 Received: from atrey.karlin.mff.cuni.cz ([195.113.26.193]:55408 "EHLO atrey.karlin.mff.cuni.cz" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751483AbZL1UzX (ORCPT ); Mon, 28 Dec 2009 15:55:23 -0500 Date: Mon, 28 Dec 2009 21:55:11 +0100 From: Pavel Machek To: Valdis.Kletnieks@vt.edu Cc: Michael Stone , 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 , Bryan Donlan , Evgeniy Polyakov , "C. Scott Ananian" , James Morris , "Eric W. Biederman" , Bernie Innocenti , Mark Seaborn , Randy Dunlap , Am?rico Wang , Tetsuo Handa , Samir Bellabes , Casey Schaufler , "Serge E. Hallyn" Subject: Re: RFC: disablenetwork facility. (v4) Message-ID: <20091228205511.GD1637@ucw.cz> References: <20091227190802.GH11737@elf.ucw.cz> <20091228060759.GB13266@heat> <20091228101006.GA19984@elf.ucw.cz> <8817.1262011044@localhost> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <8817.1262011044@localhost> User-Agent: Mutt/1.5.18 (2008-05-17) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1118 Lines: 25 On Mon 2009-12-28 09:37:24, Valdis.Kletnieks@vt.edu wrote: > On Mon, 28 Dec 2009 11:10:06 +0100, Pavel Machek said: > > > a) make disablenetwork reset to "enablenetwork" during setuid exec > > That won't work either. If you only make it 'setuid==0' binaries, you still > break 'setuid-FOO' binaries that require the net. If you just check the setuid > bit, it allows a trivial escape by creating a setuid-yourself binary and using > that to exec something else (now with network access, because we apparently > don't have a way to remember the previous setting). it is really only required for binaries setuid to someone else, but that would be too ugly. (Plus, as someone said, ping is great for leaking data out.) Pavel -- (english) http://www.livejournal.com/~pavelmachek (cesky, pictures) http://atrey.karlin.mff.cuni.cz/~pavel/picture/horses/blog.html -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/