Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752666AbZL2UoS (ORCPT ); Tue, 29 Dec 2009 15:44:18 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S1751928AbZL2UoS (ORCPT ); Tue, 29 Dec 2009 15:44:18 -0500 Received: from mail-ew0-f219.google.com ([209.85.219.219]:56798 "EHLO mail-ew0-f219.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751667AbZL2UoQ (ORCPT ); Tue, 29 Dec 2009 15:44:16 -0500 DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc:content-type; b=xyZVpoiXvUVOsp4+gUDJ//buMTTPk52ewxjnsqBwPx9QuBzvaLsMBbQ98Gw8Rps2Ne /vOpTzTv4S6iwhz3Kyzy7rjQvCRq+1x4pjVihrO7mFcPzTQbqLxbfioOQJgxNDBu4Hhk u6es+SSs7+7r2aSJmimbS/4JYlh3ZYYdjwH94= MIME-Version: 1.0 In-Reply-To: References: <20091229050114.GC14362@heat> <20091229151146.GA32153@us.ibm.com> <3e8340490912290805s103fb789y13acea4a84669b20@mail.gmail.com> From: Bryan Donlan Date: Tue, 29 Dec 2009 15:43:52 -0500 Message-ID: <3e8340490912291243q7ba43fd9v266835ebbda9315b@mail.gmail.com> Subject: Re: RFC: disablenetwork facility. (v4) To: "Eric W. Biederman" Cc: Benny Amorsen , "Serge E. Hallyn" , 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 , Valdis Kletnieks , 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 Content-Type: text/plain; charset=ISO-8859-1 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1281 Lines: 32 On Tue, Dec 29, 2009 at 3:40 PM, Eric W. Biederman wrote: > Benny Amorsen writes: > >> Bryan Donlan writes: >> >>> I, for one, think it would be best to handle it exactly like the >>> nosuid mount option - that is, pretend the file doesn't have any >>> setuid bits set. There's no reason to deny execution; if the process >>> would otherwise be able to execute it, it can also copy the file to >>> make a non-suid version and execute that instead. >> >> Execute != read. The executable file may contain secrets which must not >> be available to the user running the setuid program. If you fail the >> setuid, the user will be able to ptrace() and then the secret is >> revealed. >> >> It's amazing how many security holes appear from what seems like a very >> simple request. > > Do we have a security hole in nosuid mount option? Looks like it: $ /tmp/m/sudo sudo: must be setuid root $ ls -l /tmp/m/sudo -rwsr-x--x 1 root root 123448 2009-06-22 12:14 /tmp/m/sudo -- 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/