Received: by 10.213.65.68 with SMTP id h4csp1340233imn; Wed, 21 Mar 2018 08:21:16 -0700 (PDT) X-Google-Smtp-Source: AG47ELs1/C0N0zdATSJqlVuY4H6SvedXcOUiLv3nqEsoswty0XqoY7qoEkckHcFIomPhLI4ProCr X-Received: by 10.98.64.146 with SMTP id f18mr17411444pfd.30.1521645676847; Wed, 21 Mar 2018 08:21:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1521645676; cv=none; d=google.com; s=arc-20160816; b=L+Tn2AzxmMAjxymdZRHrL+7UzrTUEotm8nHaItPYEGDMIrkv6sP/pGqcICNhO+nsmp T2y7hGA/qZYpcx9z/dOpKLf3JSwqjiUP5eVkhNrS/AxaSOMUYGhsalrUdo0ojpLAgt/o adMVkylAWJ1PR1N0qxjU3+nrUNDVuzaxib1BCdb8vFYgd4d5OxgjeLBCIkJAYQc3RxrI /40dB3fU/oCFWCHSxSfrdEqAd1MutD3H7XYRbI8EQHDSmhcZD44PsDb/QdKgpC5KPqaZ eJcqAeTVkjt4tqbMLueQ9Z/QCjePT3mm8fw/Zq+OrqiwI76s1WfwLSzPnf/kgx1h1DIx 3sSA== 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=ivyRAdWckVcDL4meaU5U4fbIPXDNmSBq9l2orUogY5A=; b=MV9C2GxqUwne2rMMT9xk6KGk2ZH8gxRw2RupbL5RpXcVUJiQsEYGPg60zlWocDRnf6 bjoTcFCePxpKLbIM4o9XDvnCoTOGQMkkeXRv20bfnqjBcm10EQYabAZZV5av9sY5wZMv ryGTCMsZpK3E8Z6xCSR0cpOb2Z39hMXAyQJhgS+kfgCFBIwb3fRzIqR1cA1utYKLAOYW 7VmfLSkuQQPaY7vLIjnMzN3mGzoj5HnjWfp2ThcMWa0ihgs8dQxbBCkE8Wf/BS2SJaDU XvPQtGASj0n0HiCoCpABlwKvCuaDpTbdiAf2rBtffiAKdszwbSTr7DUpRLT1QvoSURT4 frzQ== 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 o191si174857pfo.56.2018.03.21.08.21.02; Wed, 21 Mar 2018 08:21:16 -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 S1752579AbeCUPUD (ORCPT + 99 others); Wed, 21 Mar 2018 11:20:03 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:34866 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752200AbeCUPT7 (ORCPT ); Wed, 21 Mar 2018 11:19:59 -0400 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w2LFJmPA101260 for ; Wed, 21 Mar 2018 11:19:58 -0400 Received: from e06smtp14.uk.ibm.com (e06smtp14.uk.ibm.com [195.75.94.110]) by mx0a-001b2d01.pphosted.com with ESMTP id 2gur3vwbdb-1 (version=TLSv1.2 cipher=AES256-SHA256 bits=256 verify=NOT) for ; Wed, 21 Mar 2018 11:19:58 -0400 Received: from localhost by e06smtp14.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 21 Mar 2018 15:19:54 -0000 Received: from b06cxnps4076.portsmouth.uk.ibm.com (9.149.109.198) by e06smtp14.uk.ibm.com (192.168.101.144) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Wed, 21 Mar 2018 15:19:50 -0000 Received: from d06av22.portsmouth.uk.ibm.com (d06av22.portsmouth.uk.ibm.com [9.149.105.58]) by b06cxnps4076.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w2LFJnVL40829138; Wed, 21 Mar 2018 15:19:49 GMT Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id D29F84C04A; Wed, 21 Mar 2018 15:12:56 +0000 (GMT) Received: from d06av22.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 39BFE4C040; Wed, 21 Mar 2018 15:12:55 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.103.4]) by d06av22.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 21 Mar 2018 15:12:55 +0000 (GMT) Subject: Re: [RFC PATCH v2 1/3] ima: extend clone() with IMA namespace support From: Mimi Zohar To: "Eric W. Biederman" , Stefan Berger Cc: James Bottomley , mkayaalp@cs.binghamton.edu, Mehmet Kayaalp , sunyuqiong1988@gmail.com, containers@lists.linux-foundation.org, linux-kernel@vger.kernel.org, david.safford@ge.com, linux-security-module@vger.kernel.org, linux-integrity@vger.kernel.org Date: Wed, 21 Mar 2018 11:19:46 -0400 In-Reply-To: <87d10513id.fsf@xmission.com> References: <20180309201421.6150-1-stefanb@linux.vnet.ibm.com> <20180309201421.6150-2-stefanb@linux.vnet.ibm.com> <87vadxfwqj.fsf@xmission.com> <1521135192.5348.64.camel@HansenPartnership.com> <2183a3b4-6270-d2e9-70ad-a7399eb1681c@linux.vnet.ibm.com> <1521139535.5348.89.camel@HansenPartnership.com> <0dc5b856-8dc6-7b5a-eeac-febd19f6498c@linux.vnet.ibm.com> <1521140467.5348.94.camel@HansenPartnership.com> <056e5b9e-b4d3-1862-baea-06dda4bd0713@linux.vnet.ibm.com> <87sh915eo0.fsf@xmission.com> <19ecc296-b584-4e1a-5369-30090fbc7880@linux.vnet.ibm.com> <87d10513id.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: 18032115-0044-0000-0000-0000053E5FC4 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18032115-0045-0000-0000-0000287D646E Message-Id: <1521645586.3848.136.camel@linux.vnet.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2018-03-21_07:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1803210180 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2018-03-15 at 15:35 -0500, Eric W. Biederman wrote: > Stefan Berger writes: > > On 03/15/2018 03:20 PM, Eric W. Biederman wrote: [..] > >> From previous conversations I remember that there is a legitimate > >> bootstrap problem for IMA. That needs to be looked at, and I am not > >> seeing that mentioned. > > > > IMA's log should not have a gap. So ideally we shouldn't have to write something > > into sysfs to spawn a new IMA namespace so that we don't miss whatever setup may > > have happened to get there, including the writing into procfs. IMA should be > > there right from the start. So a clone flag would be ideal for that. > > Please make that securityfs not sysfs. Sysfs should be about the > hardware not these higher level software details. I really don't want > to have to namespace sysfs more than I already have. > > As for the no gaps requirement. That is a powerful lever for ruling out > solutions that don't work as well. IMA-measurement and IMA-audit need to be enabled from the very beginning.  The only reason we differentiate between IMA-measurement and IMA-audit from IMA-appraisal is simply because the initramfs doesn't include xattrs.  Once support for CPIO xattrs is upstreamed, IMA-appraisal could then also be enabled from the very beginning.  For now, we rely on the initramfs being measured (and appraised) and enable IMA-appraisal before any files are accessed from real root.  Systems with a custom /init today already can enable IMA-appraisal from the very beginning.   In terms of IMA namespacing, we shouldn't need to differentiate between IMA-measurement and IMA-audit from IMA-appraisal.  All of them should be initialized from the very beginning to capture all measurements in the measurement list, audit the measurements and appraise all files. Requiring IMA namespacing to be joined to another namespace complicates things, like the unnecessary creation of IMA namespaces.  Just as there is an "owning" namespace for other namespaces, there should be an "owning" IMA namespace, which is independent of either the mount or user namespace. (I hope I'm using the term "owning" properly here.) Mimi