Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753077AbbBXR2w (ORCPT ); Tue, 24 Feb 2015 12:28:52 -0500 Received: from resqmta-ch2-11v.sys.comcast.net ([69.252.207.43]:58532 "EHLO resqmta-ch2-11v.sys.comcast.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751605AbbBXR2u (ORCPT ); Tue, 24 Feb 2015 12:28:50 -0500 Date: Tue, 24 Feb 2015 11:28:48 -0600 (CST) From: Christoph Lameter X-X-Sender: cl@gentwo.org To: Serge Hallyn cc: "Serge E. Hallyn" , Serge Hallyn , Andy Lutomirski , Aaron Jones , "Ted Ts'o" , linux-security-module@vger.kernel.org, akpm@linuxfoundation.org, "Andrew G. Morgan" , Mimi Zohar , Austin S Hemmelgarn , Markku Savela , Jarkko Sakkinen , linux-kernel@vger.kernel.org, linux-api@vger.kernel.org, Michael Kerrisk , Jonathan Corbet Subject: Re: [PATCH] capabilities: Ambient capability set V1 In-Reply-To: <20150224164429.GB29685@ubuntumail> Message-ID: References: <20150223161625.GD25477@ubuntumail> <20150223164623.GB32181@mail.hallyn.com> <20150223181553.GE25477@ubuntumail> <20150224051928.GA14755@mail.hallyn.com> <20150224154715.GA20682@mail.hallyn.com> <20150224164429.GB29685@ubuntumail> Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1124 Lines: 37 On Tue, 24 Feb 2015, Serge Hallyn wrote: > Unless I'm misunderstanding what you are saying, apps do have surprises. > They drop capabilities, execute a file, and the result has capabilities > which the app couldn't have expected. At least if the bits have to be > in fI to become part of pP', the app has a clue. Well yes but the surprises do not occur in the cap bits they are manipulating or inspecting via prctl. > To be clear, I'm suggesting that the rules at exec become: > > pI' = pI Ok that is new and on its own may solve the issue? > pA' = pA (pA is ambient) Thats what this patch does > pP' = (X & fP) | (pI & (fI | pA)) Hmmm... fP is empty for the file not having caps. so pP' = pI & pA > pE' = pP' & fE fE? So the inherited caps are not effective? fE would be empty for a file not having caps thus the ambient caps would not be available in the child. -- 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/