From mboxrd@z Thu Jan 1 00:00:00 1970 From: Casey Schaufler Subject: Re: [AppArmor 01/41] Pass struct vfsmount to the inode_create LSM hook Date: Sat, 26 May 2007 15:58:50 -0700 (PDT) Message-ID: <990795.7773.qm@web36612.mail.mud.yahoo.com> References: <200705261410.19541.agruen@suse.de> Reply-To: casey@schaufler-ca.com Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7BIT Cc: linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, linux-fsdevel@vger.kernel.org To: Andreas Gruenbacher Return-path: In-Reply-To: <200705261410.19541.agruen@suse.de> Sender: linux-security-module-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org --- Andreas Gruenbacher wrote: > On Friday 25 May 2007 21:06, Casey Schaufler wrote: > > --- Jeremy Maitin-Shepard wrote: > > > ... > > > Well, my point was exactly that App Armor doesn't (as far as I know) do > > > anything to enforce the argv[0] convention, > > > > Sounds like an opportunity for improvement then. > > Jeez, what argv[0] convention are you both talking about? >>From the exec(3) man page: "The first argument, by convention, should point to the file name associated with the file being executed." since the man page calls it a convention, so do I. > argv[0] is not guaranteed to have any association with the > name of the executable. Feel free to have any discussion > about argv[0] you want, but *please* keep it away from > AppArmor, which really has nothing to do with it. As I pointed out, if you wanted to trust the argv[0] value (which I understand AppArmor makes no claims about) and you wanted to use the argv[0] value to determine application behavior (which several people claim is a Bad Idea) you could use Name Based Access Control to provide different access to the common binary. As I pointed out before, that's a lot of "if's". > It would be nice if you could stop calling argv[0] checks ``name-based access > > control'': from the point of view of the kernel no access control is > involved, and even application-level argv[0] based access control makes no > sense whatsoever. Fair enough, I don't believe that an argv[0] check ought to be used as a security mechanism. I am not convinced that everyone would agree with us. Casey Schaufler casey@schaufler-ca.com