From: Andreas Gruenbacher Subject: Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook Date: Sat, 26 May 2007 16:05:29 +0200 Message-ID: <200705261605.29829.agruen@suse.de> References: <312681.33492.qm@web36609.mail.mud.yahoo.com> <4657C547.6030506@novell.com> <20070526143419.550bea93@the-village.bc.nu> Mime-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit Cc: Crispin Cowan , casey@schaufler-ca.com, Jeremy Maitin-Shepard , James Morris , linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Alan Cox Return-path: In-Reply-To: <20070526143419.550bea93@the-village.bc.nu> Content-Disposition: inline Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org On Saturday 26 May 2007 15:34, Alan Cox wrote: > > As such, AA can detect whether you did exec("gzip") or exec("gunzip") > > and apply the policy relevant to the program. It could apply different > > That's not actually useful for programs which link the same binary to > multiple names because if you don't consider argv[0] as well I can run > /usr/bin/gzip passing argv[0] of "gunzip" and get one set of policies and > the other set of behaviour. I partially agree. Taken together with the policy of the calling process, things suddenly start to make more sense though (even if gzip/gunzip don't make good examples): if only allowed to execute /usr/bin/gzip, the calling process can still get the gunzip behavior, but it will be bound by the /usr/bin/gzip policy. Controlling the policy is what we really care about; this limits the allowed behavior. We cannot really control the behavior of an application anyway (think of bugs alone), but we can set the bounds for that behavior. > And then we have user added hardlinks of course. Yes, allowing confined processes to change what they are allowed to execute under a more permissive policy is not such a good idea. Thanks, Andreas