Received: by 2002:ac0:a5a6:0:0:0:0:0 with SMTP id m35-v6csp1069108imm; Wed, 26 Sep 2018 11:06:07 -0700 (PDT) X-Google-Smtp-Source: ACcGV62CO0Z+CqGbEiEOfFtJwoQzgUmrCyBpZ+UilINB49bxWignRjxDY/618bwLY8/7ko/e1iPT X-Received: by 2002:a17:902:d893:: with SMTP id b19-v6mr7285915plz.51.1537985167117; Wed, 26 Sep 2018 11:06:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1537985167; cv=none; d=google.com; s=arc-20160816; b=mQcYWGmu5eqrBR6GE8pgiBqL87OvIN30IQH3NkCa1J924aPa0I+aMYk2pdt+xCq42/ 3CoR1PLV9UAe58PQH7wn+VdIu43AeCUeh5+zBVhY90PFbejrlJZpPdHX0lgDRuV4rosW UpaWYBHGqJqQuJsg+l3VR98cugf1+kTP08uF6ICrvmUDQlDqq62a1dDzSgH5XQLyi7tp EcmSxai4EUnTApH3XQYyOk/XTYtU3laN5xyJvG1Ujijdp25FHI0MIqKCmODM7+IJqQpI hn11MGNANklRX8kvj8ksMaAeAegDRKQOfdroB2LHiBsdi/k8YVBfIFZpxsFhWHHbQjTG gcJw== 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=38F8n0TlLJmLOAZvbgvugPAd+N0s2SOPVIQOONdASvo=; b=VDmc7ZE/kIcbImEbJ/6FX/ENMPu/xgUP6GEMJpTuwqSETEk/odcyFyvCO5SORTYv7d 6s0ad5bS65hsX3xeukCNDzCNTZpasaIRcBnL6MTfJT/4P9UukUf7fYCTcFBgiw/1ABMm 3ci9Qu+U2BdzhnX3w42st1JKzw7hrvvz/XODf5r/wR5F9Ma7Sj7i7gDs/Njx2FzIu+Bd QctncbFT3Ht2NIooINvFKVr9q+HQnZO9GAcQsm5I5ti1KCqBPkLUuCV5bYSlp/V9A1Zz fiWzI9MAXrznALemYBHJLsGL3zJI+7FcZcqRtmHN6jVC7czMGbGn/e75XlpZBbCaOkve AnKw== 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 l70-v6si5891719pga.498.2018.09.26.11.05.52; Wed, 26 Sep 2018 11:06:07 -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 S1727484AbeI0AR7 (ORCPT + 99 others); Wed, 26 Sep 2018 20:17:59 -0400 Received: from mx0a-001b2d01.pphosted.com ([148.163.156.1]:35828 "EHLO mx0a-001b2d01.pphosted.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725848AbeI0AR7 (ORCPT ); Wed, 26 Sep 2018 20:17:59 -0400 Received: from pps.filterd (m0098396.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.22/8.16.0.22) with SMTP id w8QHsFXQ016309 for ; Wed, 26 Sep 2018 14:03:51 -0400 Received: from e06smtp03.uk.ibm.com (e06smtp03.uk.ibm.com [195.75.94.99]) by mx0a-001b2d01.pphosted.com with ESMTP id 2mrdpcm7q6-1 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=NOT) for ; Wed, 26 Sep 2018 14:03:51 -0400 Received: from localhost by e06smtp03.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Wed, 26 Sep 2018 19:03:49 +0100 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) 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) Wed, 26 Sep 2018 19:03:47 +0100 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 w8QI3kCv56164422 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=FAIL); Wed, 26 Sep 2018 18:03:46 GMT Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id DB0B111C05C; Wed, 26 Sep 2018 21:03:26 +0100 (BST) Received: from d06av25.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 0410D11C054; Wed, 26 Sep 2018 21:03:26 +0100 (BST) Received: from localhost.localdomain (unknown [9.80.101.34]) by d06av25.portsmouth.uk.ibm.com (Postfix) with ESMTP; Wed, 26 Sep 2018 21:03:25 +0100 (BST) Subject: Re: [PATCH v2, RESEND 0/3] tpm: retrieve digest size of unknown algorithms from TPM From: Mimi Zohar To: jarkko.sakkinen@linux.intel.com, Roberto Sassu Cc: linux-integrity@vger.kernel.org, linux-security-module@vger.kernel.org, linux-kernel@vger.kernel.org, David Safford Date: Wed, 26 Sep 2018 14:03:34 -0400 In-Reply-To: <1537972840.3459.6.camel@linux.ibm.com> References: <20180917093820.20500-1-roberto.sassu@huawei.com> <1537972840.3459.6.camel@linux.ibm.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: 18092618-0012-0000-0000-000002AEF6AA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 18092618-0013-0000-0000-000020E310C9 Message-Id: <1537985014.3459.24.camel@linux.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2018-09-26_08:,, 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-1809260167 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 2018-09-26 at 10:40 -0400, Mimi Zohar wrote: > 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 I've reviewed, and am currently running with these patches. Even if the IMA changes were in a separate patch, we wouldn't be able to break up the patch set anyway.  Jarkko, I'd appreciate your carrying the entire patch set. Roberto, a similar change needs to be made for tpm_pcr_extend.  Are you planning on posting those changes as well? Mimi