Received: by 2002:ad5:474a:0:0:0:0:0 with SMTP id i10csp2300460imu; Sun, 18 Nov 2018 20:59:05 -0800 (PST) X-Google-Smtp-Source: AJdET5fzioH/SkSaSvaX3Cke2CMI6pMOJdQzJUJAEIAmKoboLreBo/dvTbflpQ5KuOvNu3BI0Jql X-Received: by 2002:a63:eb0e:: with SMTP id t14mr18989624pgh.445.1542603544990; Sun, 18 Nov 2018 20:59:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1542603544; cv=none; d=google.com; s=arc-20160816; b=kxdlggJA0JYlOSx02CCnIwnKvfg3TkbEAY1hHErSvHe7Vj3Bw/y7QFJHcn3UBzTrhq UQJDmyUkl1GsUnRipe/vyklSy8hRPiew81iLD/u9x8hFzBYL3zldlUZNAHxturp9oIs5 Cxj5TCIPRlQobL4zGQj79cWfKxjGa9ulNZJN168hoYWrGg8CMXPWOIa0PAoQEfflWiz1 RIz8zuG7U1kdaLFWHSCBePdICxmpwa6x8djIthq/5KQ2ycBdb9W3yigzjX5Ct9whEMIE v+ag0Ig6tj7VVeSSKb56r4oIXL+tP3Bqmpdw4i4YwLSUPr7I45i3wmwvwWEMSHjDxoVF eMcg== 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=P6xDtmfT6u1TxmHNQ61+uGXehv+vFXjXmZ83x0qhk7Y=; b=WY2hopDoQZCb25rs8VnRjvls4lU+ac4yoEmh1BK1uyE5KWTMIdP7YCgwhNp8zyH/1F zS6KLMwO+z3OytrEgjM8yXSJw+ff318Oez4yiVhfgykhiOo82kJzKfh8CWR56VcBEhJ3 wNXhB3s9H60pQl260qsOr1m1UFGmOC9oHe9RPDUVFF8nZE3mc8zGrQY7GYB+L/JV3pck 1oIjnOqys2yQmJpWZISNgjI+R7yzHGDbtx3eCm1dTfB8NFdORXC5xrEYoE06zj8gvAnk BVUDG++NH906/OPX90UgIQZPLaIxyTgepuUSGDvm3L0L+FEVOGqCrcd/nqpHTq2nV6lF T0hA== 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 126si5871357pff.77.2018.11.18.20.58.49; Sun, 18 Nov 2018 20:59:04 -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 S1725946AbeKSPUj (ORCPT + 99 others); Mon, 19 Nov 2018 10:20:39 -0500 Received: from mx0b-001b2d01.pphosted.com ([148.163.158.5]:50370 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725866AbeKSPUj (ORCPT ); Mon, 19 Nov 2018 10:20:39 -0500 Received: from pps.filterd (m0098416.ppops.net [127.0.0.1]) by mx0b-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id wAJ4rVAQ070978 for ; Sun, 18 Nov 2018 23:58:12 -0500 Received: from e06smtp04.uk.ibm.com (e06smtp04.uk.ibm.com [195.75.94.100]) by mx0b-001b2d01.pphosted.com with ESMTP id 2nujd3h37j-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Sun, 18 Nov 2018 23:58:12 -0500 Received: from localhost by e06smtp04.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 19 Nov 2018 04:58:10 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp04.uk.ibm.com (192.168.101.134) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Mon, 19 Nov 2018 04:58:06 -0000 Received: from d06av25.portsmouth.uk.ibm.com (d06av25.portsmouth.uk.ibm.com [9.149.105.61]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id wAJ4w5G751314802 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 19 Nov 2018 04:58:05 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 4AAB811C04C; Mon, 19 Nov 2018 04:58:05 +0000 (GMT) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 38BAA11C04A; Mon, 19 Nov 2018 04:58:02 +0000 (GMT) Received: from localhost.localdomain (unknown [9.80.88.94]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 19 Nov 2018 04:58:01 +0000 (GMT) Subject: Re: [PATCH v5 7/7] tpm: pass an array of tpm_bank_list structures to tpm_pcr_extend() From: Mimi Zohar To: Jarkko Sakkinen , Roberto Sassu Cc: david.safford@ge.com, monty.wiseman@ge.com, linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, silviu.vlasceanu@huawei.com Date: Sun, 18 Nov 2018 23:57:50 -0500 In-Reply-To: <20181118072745.GA5897@linux.intel.com> References: <20181114153108.12907-1-roberto.sassu@huawei.com> <20181114153108.12907-8-roberto.sassu@huawei.com> <20181116150352.GA3612@linux.intel.com> <9c534ed1-7832-7a3b-3e69-5fcc25c565cc@huawei.com> <20181118072745.GA5897@linux.intel.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: 18111904-0016-0000-0000-00000228F3FE X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18111904-0017-0000-0000-000032812487 Message-Id: <1542603470.4914.55.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-11-19_01:,, 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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1811190045 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, 2018-11-18 at 09:27 +0200, Jarkko Sakkinen wrote: > On Fri, Nov 16, 2018 at 04:55:36PM +0100, Roberto Sassu wrote: > > On 11/16/2018 4:03 PM, Jarkko Sakkinen wrote: > > > On Wed, Nov 14, 2018 at 04:31:08PM +0100, Roberto Sassu wrote: > > > > Currently, tpm_pcr_extend() accepts as an input only a SHA1 digest. > > > > > > > > This patch modifies the definition of tpm_pcr_extend() to allow other > > > > kernel subsystems to pass a digest for each algorithm supported by the TPM. > > > > All digests are processed by the TPM in one operation. > > > > > > > > If a tpm_pcr_extend() caller provides a subset of the supported algorithms, > > > > the TPM driver extends the remaining PCR banks with the first digest > > > > passed as an argument to the function. > > > > > > What is the legit use case for this? > > > > A subset could be chosen for better performance, or when a TPM algorithm > > is not supported by the crypto subsystem. > > Doesn't extending a subset a security concern? Right, so instead of extending a subset of the allocated banks, all of the allocated banks need to be extended, even for those banks that a digest was not included.  This is no different than what is being done today.  IMA is currently only calculating the SHA1 hash, padding the digest with 0's, and extending the padded value(s) into all of the allocated banks. If there is a vulnerability with the hash algorithm, then any bank extended with the padded/truncated digest would be susceptible. IMA will need to become TPM 2.0 aware, calculating and extending multiple banks and define a new measurement list format containing the multiple digests. Mimi