Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751327AbdGZN6H (ORCPT ); Wed, 26 Jul 2017 09:58:07 -0400 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:56232 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1750783AbdGZN6F (ORCPT ); Wed, 26 Jul 2017 09:58:05 -0400 Subject: Re: [PATCH v2] xattr: Enable security.capability in user namespaces From: Mimi Zohar To: "Serge E. Hallyn" Cc: "Eric W. Biederman" , Stefan Berger , Mimi Zohar , "Theodore Ts'o" , containers@lists.linux-foundation.org, lkp@01.org, linux-kernel@vger.kernel.org, tycho@docker.com, James.Bottomley@HansenPartnership.com, vgoyal@redhat.com, christian.brauner@mailbox.org, amir73il@gmail.com, linux-security-module@vger.kernel.org, casey@schaufler-ca.com Date: Wed, 26 Jul 2017 09:57:50 -0400 In-Reply-To: <20170726030007.GA10087@mail.hallyn.com> References: <847ccb2a-30c0-a94c-df6f-091c8901eaa0@linux.vnet.ibm.com> <87bmoo8bxb.fsf@xmission.com> <9a3010e5-ca2b-5e7a-656b-fcc14f7bec4e@linux.vnet.ibm.com> <87h8yf7szd.fsf@xmission.com> <65dbe654-0d99-03fa-c838-5a726b462826@linux.vnet.ibm.com> <20170714133437.GA16737@mail.hallyn.com> <596f808b-e21d-8296-5fef-23c1ce7ab778@linux.vnet.ibm.com> <20170714173556.GA19669@mail.hallyn.com> <1500060374.3583.57.camel@linux.vnet.ibm.com> <20170726030007.GA10087@mail.hallyn.com> Content-Type: text/plain; charset="UTF-8" X-Mailer: Evolution 3.20.5 (3.20.5-1.fc24) Mime-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-MML: disable x-cbid: 17072613-0048-0000-0000-00000256F45A X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17072613-0049-0000-0000-000048097106 Message-Id: <1501077470.28419.8.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2017-07-26_06:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=0 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1706020000 definitions=main-1707260200 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1082 Lines: 24 On Tue, 2017-07-25 at 22:00 -0500, Serge E. Hallyn wrote: > On Fri, Jul 14, 2017 at 03:26:14PM -0400, Mimi Zohar wrote: > > On Fri, 2017-07-14 at 13:17 -0500, Eric W. Biederman wrote: > > > Which brings us to the semantic question of would it be nice to have > > > stacked IMA/EVM on the same file. > > > > > > I really don't think we do. I think allowing multiple keys for > > > different part of trusting files is easy enough that we should have no > > > need to fight over which keys do which. > > > > We definitely want to support different policies on the native and in > > the namespace with different keys and keyrings. > > Ok, so Stefan's code to support userspace in a container reading > security.ima and getting back the value for security.ima@uid=1000 > (if 1000 is the kuid of the container's root user) is in fact > useful to IMA? Definitely!  Root within the namespace needs to be able to read and write security.ima in order to (re)sign files, with a specific key known to that container.  Stefan's code provides different views of the security xattrs. Mimi