Received: by 10.192.165.156 with SMTP id m28csp1659781imm; Wed, 18 Apr 2018 13:30:48 -0700 (PDT) X-Google-Smtp-Source: AIpwx4+HhSgQbo0dTadLWiWvJWreGAVv3lExsZShoKZUUY27N5o23TpKKlgLf7lQiQpwwwebAgzj X-Received: by 10.99.99.198 with SMTP id x189mr2772790pgb.371.1524083448135; Wed, 18 Apr 2018 13:30:48 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1524083448; cv=none; d=google.com; s=arc-20160816; b=V6OUguzlRvcS6w/3EkI/E3aCyQbvL0i7pWo/c6RXU9l/FcKTtoWjMRIfh+/f7DX4y9 Dd7J2VyXu44Gqd7oVhN8tAU4IB5SQFL0tL8VWKIsQ7QiKDe9ucSPqxnN0kOjxAHqke+d apRykOxLLQmDIyO8NcteiFBoWCuOWxaei8fQCDz01wVVIhnzD1dsTn6zr6yFudWk8Iik RYYulz+DDsuSikR+upL050B/zpSTrhiRmxywDJtncLtoNJOqujjcm5XszNppItwIyVfX hhILs66tS+7uBvbyTd8z0Xx2gUSNN/LWaGhi5nvuO90LP+VBxVSfejMMhYtfsQZHy47W ATzA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:content-transfer-encoding :mime-version:references:in-reply-to:date:cc:to:from:subject :arc-authentication-results; bh=wuIo3nEWmXaoSbNYrpmrgpXfTNtHKFSu5Nu0Cm1vdV4=; b=gFYusho2ioy6wqt8jT0U4/hr8gcylAu/MHT60LzVJLANOgoG9CotskcQMBqfsPyHCp TO/oa0dqjBoesIZjBmNUBZ816wOhVNx9mQKrhmU7iDpalGfw15l6pYBjOVvE6SZ/Bi0i AYHDbXG8p1S4+BgB/D0jvaYGxnn7Ehz0E9bhoascVaBFgOq6K8ILNbcO1Vz+pswNy+Vq hK2PahbzyrMJJw1Lc21XlMqlRpuiuzNxTi0126VXBYhc0SH5YV3dXKshMdIavoS17qiM ya1m5E5lOj9PgR6OKznNmPb2BVkY5ScS5H9brHhywYMAZiXtZkFfU2So+pEh28ZaQtTa B94Q== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id 196si1636561pgb.674.2018.04.18.13.30.20; Wed, 18 Apr 2018 13:30:48 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752511AbeDRU1T (ORCPT + 99 others); Wed, 18 Apr 2018 16:27:19 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35348 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751520AbeDRU1S (ORCPT ); Wed, 18 Apr 2018 16:27:18 -0400 Received: from pps.filterd (m0098410.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w3IKQx85025575 for ; Wed, 18 Apr 2018 16:27:17 -0400 Received: from e06smtp11.uk.ibm.com (e06smtp11.uk.ibm.com [195.75.94.107]) by mx0a-001b2d01.pphosted.com with ESMTP id 2hea4k05g5-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 18 Apr 2018 16:27:17 -0400 Received: from localhost by e06smtp11.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 18 Apr 2018 21:27:14 +0100 Received: from b06cxnps3074.portsmouth.uk.ibm.com (9.149.109.194) by e06smtp11.uk.ibm.com (192.168.101.141) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 18 Apr 2018 21:27:10 +0100 Received: from d06av24.portsmouth.uk.ibm.com (mk.ibm.com [9.149.105.60]) by b06cxnps3074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w3IKRA8x6553992; Wed, 18 Apr 2018 20:27:10 GMT Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 105B842042; Wed, 18 Apr 2018 21:18:42 +0100 (BST) Received: from d06av24.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id BE6DF4203F; Wed, 18 Apr 2018 21:18:40 +0100 (BST) Received: from dhcp-9-2-55-88.watson.ibm.com (unknown [9.2.55.88]) by d06av24.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 18 Apr 2018 21:18:40 +0100 (BST) Subject: Re: [RFC PATCH v3 1/3] ima: extend clone() with IMA namespace support From: Mimi Zohar To: "Eric W. Biederman" Cc: John Johansen , Stefan Berger , linux-integrity@vger.kernel.org, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org, serge@hallyn.com, sunyuqiong1988@gmail.com, david.safford@ge.com, mkayaalp@cs.binghamton.edu, James Bottomley , Mehmet Kayaalp Date: Wed, 18 Apr 2018 16:27:08 -0400 In-Reply-To: <87wox4s282.fsf@xmission.com> References: <1522159038-14175-1-git-send-email-stefanb@linux.vnet.ibm.com> <1522159038-14175-2-git-send-email-stefanb@linux.vnet.ibm.com> <87sh8lcecn.fsf@xmission.com> <1523636702.3272.63.camel@linux.vnet.ibm.com> <1524081472.3272.319.camel@linux.vnet.ibm.com> <87wox4s282.fsf@xmission.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-GCONF: 00 x-cbid: 18041820-0040-0000-0000-0000044F0E86 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18041820-0041-0000-0000-000020F35F6D Message-Id: <1524083228.3272.331.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-04-18_05:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=3 phishscore=0 bulkscore=0 spamscore=0 clxscore=1015 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1804180184 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-04-18 at 15:12 -0500, Eric W. Biederman wrote: > Mimi Zohar writes: > > > On Wed, 2018-04-18 at 09:09 -0700, John Johansen wrote: > >> On 04/13/2018 09:25 AM, Mimi Zohar wrote: > >> > [Cc'ing John Johansen] > >> > > >> > On Tue, 2018-03-27 at 18:01 -0500, Eric W. Biederman wrote: > >> > [...] > >> >> As such I expect the best way to create the ima namespace is by simply > >> >> writing to securityfs/imafs. Possibly before the user namespace is > >> >> even unshared. That would allow IMA to keep track of things from > >> >> before a container is created. > >> > > >> > >> I do think this is generally the right approach for LSMs when looking > >> forward to LSM stacking and more LSMs. > >> > >> > >> > My initial thought was to stage IMA namespacing with just IMA-audit > >> > first, followed by either IMA-measurement or IMA-appraisal.  This > >> > would allow us to get the basic IMA namespacing framework working and > >> > defer dealing with the securityfs related namespacing of the IMA > >> > policy and measurement list issues to later. > >> > > >> > By tying IMA namespacing to a securityfs ima/unshare file, we would > >> > need to address the securityfs issues first. > >> > > >> > >> well it depends on what you want to do. It would be possible to have > >> a simple file (not a jump link) within securityfs that IMA could use > >> without having to deal with all the securityfs issues first. However it > >> does require that securityfs (not necessarily imafs) be visible within > >> the mount namespace of the task doing the setup. > > > > Eric, would you be OK with that? > > Roughly. My understanding is that you have to have a write to some > filesystem to set the ima policy. > > I was expecting having to write an "create ima namespace" value > to the filesystem would not be any special effort. > > Now it sounds like providing the "create an ima namespace" is going to > be a special case, and that does not sound correct. This is not any different than any of the other security/ima/ files (eg. policy, ascii_runtime_measurements, ...).  The next IMA namespacing stage would add support for these files. Mimi