Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp848570imm; Wed, 26 Sep 2018 07:43:26 -0700 (PDT) X-Google-Smtp-Source: ACcGV63/Fd+d3OIv1+2Md4TX7ntzcgYn7Hdl/lbs22i5+rpRCxQWQbElYglWZXRAFRjFgw1ZrKUx X-Received: by 2002:a17:902:20c5:: with SMTP id v5-v6mr1037979plg.62.1537973006526; Wed, 26 Sep 2018 07:43:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537973006; cv=none; d=google.com; s=arc-20160816; b=PCsp6ygM+AwBZCJDQAHK1Oq//2ecPhwq2CMfuDzAz57MyrCybA4v6MsZYno+N1rS2o dG+i3urpoWzJBK4cFtylhy4HD0Qca9MVBV0+hZw5f8SAxJv0jDQm3yqFU+ILUtVfcemY e0vWnvWIedTLZYZofIA7uECY2VdepZ8dLpRjwheFwRUI3uK7Gh4sezFWl5ytl69DR73i vUkqnJX3pvT2tJAmF3DabGUK88jdAINViot/JRIWBfMHeDX3XXux5bEAdBFCelUkpPx6 whlCBKbg30Gu3XRyHF1kk6DwhOECOX9F7YQl4GsCsSfQcs5Z+f//9MqyU1KRkNkyffit t9/A== 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=uVN/0L7pHbdl+kCAYmWOkC6Q6CJ5FgZRZxT8XOtvkgA=; b=HRlpxJPXtv1y6OcyBj/8yK794no+1+QtywbHqKUo4Djo7P/DXanr8VDYiXn2vKgIXa ft5qfWwl43witBo+ur0VJqVQ0Bhn1ch1en3bEYiRYRwKAmqT0jKmhb288r4TyqSvr+Nq iWThQM7Kxj+LHqkhWMctlcd8e82gFPJC/EiiGLkK2Dm/G8e8PhDjVSxQIhYPX337BbBd /ZD3LbuWxPxUo4SB668CzQId3OAE1LOeUPdfUiPyK0d1KPV51COEDOGOcoSHjIioVzQM Ln9mkVgEoXvKFgmh4qf9U4SRXKo/ogKUbn2t7a1tqkHDhw5Milv0xFd2Zbnkxls95UgJ kH1A== 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 97-v6si5561237plm.290.2018.09.26.07.43.06; Wed, 26 Sep 2018 07:43:26 -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 S1728233AbeIZUyO (ORCPT + 99 others); Wed, 26 Sep 2018 16:54:14 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:60428 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727404AbeIZUyO (ORCPT ); Wed, 26 Sep 2018 16:54:14 -0400 Received: from pps.filterd (m0098409.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8QEdbp5144831 for ; Wed, 26 Sep 2018 10:40:57 -0400 Received: from e06smtp01.uk.ibm.com (e06smtp01.uk.ibm.com [195.75.94.97]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mr9y275h7-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Sep 2018 10:40:57 -0400 Received: from localhost by e06smtp01.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Sep 2018 15:40:55 +0100 Received: from b06cxnps4074.portsmouth.uk.ibm.com (9.149.109.196) by e06smtp01.uk.ibm.com (192.168.101.131) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; (version=TLSv1/SSLv3 cipher=AES256-GCM-SHA384 bits=256/256) Wed, 26 Sep 2018 15:40:52 +0100 Received: from d06av23.portsmouth.uk.ibm.com (d06av23.portsmouth.uk.ibm.com [9.149.105.59]) by b06cxnps4074.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id w8QEepeo66846966 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 Sep 2018 14:40:51 GMT Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 975A8A4055; Wed, 26 Sep 2018 17:40:32 +0100 (BST) Received: from d06av23.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id E5238A405D; Wed, 26 Sep 2018 17:40:31 +0100 (BST) Received: from localhost.localdomain (unknown [9.80.101.34]) by d06av23.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 26 Sep 2018 17:40:31 +0100 (BST) Subject: Re: [PATCH v2, RESEND 0/3] tpm: retrieve digest size of unknown algorithms from TPM From: Mimi Zohar To: Roberto Sassu , jarkko.sakkinen@linux.intel.com Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org Date: Wed, 26 Sep 2018 10:40:40 -0400 In-Reply-To: <20180917093820.20500-1-roberto.sassu@huawei.com> References: <20180917093820.20500-1-roberto.sassu@huawei.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: 18092614-4275-0000-0000-000002C0D5D5 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18092614-4276-0000-0000-000037CADD9E Message-Id: <1537972840.3459.6.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-26_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=1015 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1807170000 definitions=main-1809260143 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, 2018-09-17 at 11:38 +0200, Roberto Sassu wrote: > Resending to maintainer with correct mailing lists in CC. > > The TPM driver currently relies on the crypto subsystem to determine the > digest size of supported TPM algorithms. In the future, TPM vendors might > implement new algorithms in their chips, and those algorithms might not > be supported by the crypto subsystem. > > Usually, vendors provide patches for the new hardware, and likely > the crypto subsystem will be updated before the new algorithm is > introduced. However, old kernels might be updated later, after patches > are included in the mainline kernel. This would leave the opportunity > for attackers to misuse PCRs, as PCR banks with an unknown algorithm > are not extended. > > This patch set provides a long term solution for this issue. If a TPM > algorithm is not known by the crypto subsystem, the TPM driver retrieves > the digest size from the TPM with a PCR read. All the PCR banks are > extended, even if the algorithm is not yet supported by the crypto > subsystem. Other than checking the digest size before copying the pcrread buffer, the patches look good.  Please add my Ack on all 3 patches. (New address) Acked-by: Mimi Zohar Thanks! Mimi