Received: by 2002:a25:8b91:0:0:0:0:0 with SMTP id j17csp4016515ybl; Tue, 21 Jan 2020 11:15:22 -0800 (PST) X-Google-Smtp-Source: APXvYqwTyYTScrWLwOQsRzLzeJgJ3EazQi4luggn03lm4UhGy7sHRktr8GVpEV26VNCM8D72Gt1P X-Received: by 2002:aca:2114:: with SMTP id 20mr4249766oiz.9.1579634121880; Tue, 21 Jan 2020 11:15:21 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1579634121; cv=none; d=google.com; s=arc-20160816; b=G99RkAMXtMZJuWc8/sY4/LN8y2P7r5Ihcs/UKhba9BjtXl294IsxRv/aAAZd35O3/A gILQCSjChpSWmcU4OerfhFcoDszAzfAkRX4I6H3HIt3jww50MpS5aEVz9wggRk2ueUuB 9aU6s+T93JJd7kqvRYflI3Qhby/YIKyRvCLwTdckky4nCn7A5DVBmabLlblXsflfk/OV gq5nFLDbnPJX3K9q7Hmu0bqKpvc2TIgl2UFxG3kBhHfp+wg3zVumtiOW67pixtm2TOe5 hwemR1V+f3GE2jEsuoRnPsEopCT7KnBpVA1KoVkHfmay7+putpaX3No8ejVzW99P1KvH S/Qw== 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; bh=v1jyrQfxkZzZe7meFhwRMs3IJkDIdv6nfqgKmuVFkWY=; b=HERPBYtS6XX1jI0n3eHlQ48l29JkRhKX4zzE3Av43SkM2ZDeQTYC95lZuqLLEqZxSB JkRxDhwuInGGD6yDqXSu8vUJ9wy0yDVF5bt/T7LytYifcI+rp9aqpWLoDi2LmOkJ/Wp7 fWGRmw/he68Ek+kHseGde+Rd358HkHh9S33nJM/DZCRPOSyhWCUXGY07hOCiaEDR6rLY WpsONszTq86lBuIIUw0jkCXk41b1y+RNIin49Zp3GHyp8mnbVI9YU9A1SNebvZbQCKT0 TGCwQaAem3vtatYckY/u/0MG7V1+aJj7PBeHvot3KEgIHRKS1cxFD2jkIuHpZBPrBlza zYJw== 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 m13si5918692otq.1.2020.01.21.11.15.08; Tue, 21 Jan 2020 11:15:21 -0800 (PST) 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 S1728927AbgAUTOD (ORCPT + 99 others); Tue, 21 Jan 2020 14:14:03 -0500 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:59428 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728609AbgAUTOD (ORCPT ); Tue, 21 Jan 2020 14:14:03 -0500 Received: from pps.filterd (m0098399.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.42/8.16.0.42) with SMTP id 00LJ7JLp007958 for ; Tue, 21 Jan 2020 14:14:01 -0500 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2xp3u68bjj-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Tue, 21 Jan 2020 14:14:01 -0500 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Tue, 21 Jan 2020 19:13:59 -0000 Received: from b06cxnps4075.portsmouth.uk.ibm.com (9.149.109.197) by e06smtp03.uk.ibm.com (192.168.101.133) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Tue, 21 Jan 2020 19:13:57 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps4075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 00LJDuIZ56754334 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Tue, 21 Jan 2020 19:13:56 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id B21C811C05B; Tue, 21 Jan 2020 19:13:56 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 1341F11C04C; Tue, 21 Jan 2020 19:13:56 +0000 (GMT) Received: from dhcp-9-31-103-231.watson.ibm.com (unknown [9.31.103.231]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Tue, 21 Jan 2020 19:13:55 +0000 (GMT) Subject: Re: [PATCH] IMA: Turn IMA_MEASURE_ASYMMETRIC_KEYS off by default From: Mimi Zohar To: James Bottomley , Lakshmi Ramasubramanian , linux-integrity@vger.kernel.org Cc: sashal@kernel.org, linux-kernel@vger.kernel.org Date: Tue, 21 Jan 2020 14:13:55 -0500 In-Reply-To: <1579628090.3390.28.camel@HansenPartnership.com> References: <20200121171302.4935-1-nramas@linux.microsoft.com> <1579628090.3390.28.camel@HansenPartnership.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: 20012119-0012-0000-0000-0000037F727F X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 20012119-0013-0000-0000-000021BBB361 Message-Id: <1579634035.5125.311.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:6.0.138,18.0.634 definitions=2020-01-21_06:2020-01-21,2020-01-21 signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 phishscore=0 bulkscore=0 adultscore=0 mlxlogscore=999 lowpriorityscore=0 mlxscore=0 spamscore=0 malwarescore=0 priorityscore=1501 impostorscore=0 suspectscore=3 clxscore=1015 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-1910280000 definitions=main-2001210143 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Tue, 2020-01-21 at 09:34 -0800, James Bottomley wrote: > On Tue, 2020-01-21 at 09:13 -0800, Lakshmi Ramasubramanian wrote: > > Enabling IMA and ASYMMETRIC_PUBLIC_KEY_SUBTYPE configs will > > automatically enable the IMA hook to measure asymmetric keys. Keys > > created or updated early in the boot process are queued up whether > > or not a custom IMA policy is provided. Although the queued keys will > > be freed if a custom IMA policy is not loaded within 5 minutes, it > > could still cause significant performance impact on smaller systems. > > What exactly do you expect distributions to do with this? I can tell > you that most of them will take the default option, so this gets set to > N and you may as well not have got the patches upstream because you > won't be able to use them in any distro with this setting. > > > This patch turns the config IMA_MEASURE_ASYMMETRIC_KEYS off by > > default. Since a custom IMA policy that defines key measurement is > > required to measure keys, systems that require key measurement can > > enable this config option in addition to providing a custom IMA > > policy. > > Well, no they can't ... it's rather rare nowadays for people to build > their own kernels. The vast majority of Linux consumers take what the > distros give them. Think carefully before you decide a config option > is the solution to this problem. James, up until now IMA could be configured, but there wouldn't be any performance penalty for enabling IMA until a policy was loaded.  With IMA and asymmetric keys enabled, whether or not an IMA policy is loaded, certificates will be queued. My concern is: - changing the expected behavior - really small devices/sensors being able to queue certificates This change permits disabling queueing certificates.  Whether the default should be "disabled" is a separate question.  I'm open to comments/suggestions. Mimi