Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp642221rwr; Thu, 27 Apr 2023 06:26:49 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5g1p4juijpB9+lP39FFEzCPFJKtYFYxY9Gj8TPf0XdvZ2VdqFk/a/jiSahDzFuJmtMEqB+ X-Received: by 2002:a17:902:f68e:b0:19a:a815:2877 with SMTP id l14-20020a170902f68e00b0019aa8152877mr1865543plg.6.1682602009381; Thu, 27 Apr 2023 06:26:49 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1682602009; cv=none; d=google.com; s=arc-20160816; b=mZ9WU3QbWR8iSNXQfBsZuvFNuK4PyK6uErPS8vDtvPd7TDmVgzfb6oUfqNTXO6maM/ QHzBXPyimWj7kLO0+8fzerB3zUz7nEgnatcKff/tqqedHDKggsCs8ezZ7PwBSqAIvYRy 4WReA8You85BicCPHAyrNEHDnZj/eX2TqlgqBdt609fezwkntIORBPOsvrvj4Lub5Iyh p/DV58ID3TAzWNTom4q2xsT2qZI4brApJNpXdhg9N2UCFHzRdV7TmvUw23IWjZG6lo1M iZLSYKYZGC61al5evU3JVIOxS5pOs9Jz320GZ6nOIhESD7I/+lUjwIV920btMUpgDk6R tf9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:reply-to:from:subject :message-id:dkim-signature; bh=/lstpXN2vGkxxqC9YpAB8qo7hpqQRqqUJMQCS3pLVzY=; b=SFiXv+t7Kw9GTQsZGplDZV7p5cVWRLjP/f8Q4rMZAlm+CRlDnruiaayNGQUf/Eltys ZMM71u2+HTXg9pjdJhDA4msDDowg8r+enIn+Hlh5RT0HPdQHq/3pqmjox5dr5bYoHGOV t7qY1+OEAtld5piO/NkTFCa8xxpXXSSfJv25TMj/naNSRJh93xlbG4/bPoM4jqqtHVzY z4aTntvQTMR5dzgjFus1dGp0gQ3FFys1ERPE12S/IYTb2XCVRIJVBgHv8HeW51KcCu2N y26rnvmq5AAziXDuZTHVUWImTyWuYi4JcvDwuiUOYyHAomhkdJs3Dom7wgq9j8mX+Xjd SDIA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=istvzlOK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id u16-20020a170902e5d000b001a1b5e2deb0si21100834plf.334.2023.04.27.06.26.34; Thu, 27 Apr 2023 06:26:49 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ibm.com header.s=pp1 header.b=istvzlOK; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=NONE dis=NONE) header.from=ibm.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243630AbjD0NSq (ORCPT + 99 others); Thu, 27 Apr 2023 09:18:46 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:39332 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229847AbjD0NSo (ORCPT ); Thu, 27 Apr 2023 09:18:44 -0400 Received: from mx0a-001b2d01.pphosted.com (mx0a-001b2d01.pphosted.com [148.163.156.1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D9158422A; Thu, 27 Apr 2023 06:18:41 -0700 (PDT) Received: from pps.filterd (m0353726.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 33RD6sQb012934; Thu, 27 Apr 2023 13:18:19 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ibm.com; h=message-id : subject : from : reply-to : to : cc : date : in-reply-to : references : content-type : mime-version : content-transfer-encoding; s=pp1; bh=/lstpXN2vGkxxqC9YpAB8qo7hpqQRqqUJMQCS3pLVzY=; b=istvzlOKRErYhJsoTlhcalorZI0p2C+cYW66FjBFUxHYCm0ky0GgoXZSgIfJr3jJ6dwX Eb+4qqLl3+A5vR0ATSdLXKXijWzVthngiYCqdR1ksMY3uPtUlQrDhrsbwPHz2NxE/aJs vStZiFQoW8b9S74koUgxgYw+Ug5t7erJZlqTypHnFmNWsP/xlEKAmZRgfzK6oQVd0H+z CgIASBT5Hrrx0jwJdAGRtWgpDiOkZPmPEY29GBVzNjuNvovqmGuEvsaJjhfzfWrRk2wr 4uCf2ejKDsrCCSL1qfc/velS6G+OaG7qD9NecG38si1UyKEIGEAnv7mFUmCF7bnh3FgY YA== Received: from pps.reinject (localhost [127.0.0.1]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q7s7017vy-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 13:18:19 +0000 Received: from m0353726.ppops.net (m0353726.ppops.net [127.0.0.1]) by pps.reinject (8.17.1.5/8.17.1.5) with ESMTP id 33RD8fK1028281; Thu, 27 Apr 2023 13:18:18 GMT Received: from ppma04wdc.us.ibm.com (1a.90.2fa9.ip4.static.sl-reverse.com [169.47.144.26]) by mx0a-001b2d01.pphosted.com (PPS) with ESMTPS id 3q7s7017ua-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 13:18:17 +0000 Received: from pps.filterd (ppma04wdc.us.ibm.com [127.0.0.1]) by ppma04wdc.us.ibm.com (8.17.1.19/8.17.1.19) with ESMTP id 33R9AVnZ032137; Thu, 27 Apr 2023 13:18:15 GMT Received: from smtprelay03.wdc07v.mail.ibm.com ([9.208.129.113]) by ppma04wdc.us.ibm.com (PPS) with ESMTPS id 3q47782hwb-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 27 Apr 2023 13:18:15 +0000 Received: from smtpav01.dal12v.mail.ibm.com (smtpav01.dal12v.mail.ibm.com [10.241.53.100]) by smtprelay03.wdc07v.mail.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id 33RDIEnV26018240 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Thu, 27 Apr 2023 13:18:14 GMT Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 5A49658065; Thu, 27 Apr 2023 13:18:14 +0000 (GMT) Received: from smtpav01.dal12v.mail.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id C107D5805D; Thu, 27 Apr 2023 13:18:09 +0000 (GMT) Received: from lingrow.int.hansenpartnership.com (unknown [9.211.118.80]) by smtpav01.dal12v.mail.ibm.com (Postfix) with ESMTP; Thu, 27 Apr 2023 13:18:09 +0000 (GMT) Message-ID: Subject: Re: [PATCH] docs: security: Confidential computing intro and threat model From: James Bottomley Reply-To: jejb@linux.ibm.com To: "Reshetova, Elena" , "Christopherson, , Sean" Cc: Carlos Bilbao , "corbet@lwn.net" , "linux-doc@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "ardb@kernel.org" , "kraxel@redhat.com" , "dovmurik@linux.ibm.com" , "dave.hansen@linux.intel.com" , "Dhaval.Giani@amd.com" , "michael.day@amd.com" , "pavankumar.paluri@amd.com" , "David.Kaplan@amd.com" , "Reshma.Lal@amd.com" , "Jeremy.Powell@amd.com" , "sathyanarayanan.kuppuswamy@linux.intel.com" , "alexander.shishkin@linux.intel.com" , "thomas.lendacky@amd.com" , "tglx@linutronix.de" , "dgilbert@redhat.com" , "gregkh@linuxfoundation.org" , "dinechin@redhat.com" , "linux-coco@lists.linux.dev" , "berrange@redhat.com" , "mst@redhat.com" , "tytso@mit.edu" , "jikos@kernel.org" , "joro@8bytes.org" , "leon@kernel.org" , "richard.weinberger@gmail.com" , "lukas@wunner.de" , "cdupontd@redhat.com" , "jasowang@redhat.com" , "sameo@rivosinc.com" , "bp@alien8.de" , "security@kernel.org" , Andrew Bresticker , Rajnesh Kanwal , Dylan Reid , Ravi Sahita Date: Thu, 27 Apr 2023 09:18:08 -0400 In-Reply-To: References: <20230327141816.2648615-1-carlos.bilbao@amd.com> <7502e1af0615c08167076ff452fc69ebf316c730.camel@linux.ibm.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.42.4 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-TM-AS-GCONF: 00 X-Proofpoint-GUID: IGQ-KdP6GQ4s2nFXoLZiSSgnfTQ8UkTQ X-Proofpoint-ORIG-GUID: Oqd7gBwBaadzT3cFwFaurjBPqQY0MmQI X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.254,Aquarius:18.0.942,Hydra:6.0.573,FMLib:17.11.170.22 definitions=2023-04-27_07,2023-04-27_01,2023-02-09_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 bulkscore=0 priorityscore=1501 mlxlogscore=999 impostorscore=0 phishscore=0 suspectscore=0 clxscore=1015 malwarescore=0 lowpriorityscore=0 adultscore=0 mlxscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2303200000 definitions=main-2304270116 X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_EF,RCVD_IN_MSPIKE_H2,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu, 2023-04-27 at 12:43 +0000, Reshetova, Elena wrote: > > > On Wed, Apr 26, 2023, James Bottomley wrote: > > > On Wed, 2023-04-26 at 13:32 +0000, Reshetova, Elena wrote: [...] > > > > the practical deployment can differ of course. We can rephrase > > > > that it "allows to exclude all the CSP's infrastructure and SW > > > > out of tenant's TCB." > > > > > > That's getting even more inaccurate.  To run  in a Cloud with > > > CoCo you usually have to insert some provided code, like OVMF > > > and, for AMD, the SVSM.  These are often customized by the CSP to > > > suit the cloud infrastructure, so you're running their code.  The > > > goal, I think, is to make sure you only run code you trust (some > > > of which may come from the CSP) in your TCB, which is very > > > different from the statement above. > > > > Yes.  And taking things a step further, if we were to ask security > > concious users what they would choose to have in their TCB: (a) > > closed-source firmware written by a hardware vendor, or (b) open- > > source software that is provided by CSPs, I am betting the > > overwhelming majority would choose (b). > > As I already replied in my earlier message from yesterday, yes, this > is the choice that anyone has and it is free to make this choice. No > questions asked. (Btw, please note that the above statement is not > 100% accurate since the source code for intel TDX module is at least > public). However, if as you said the majority choose (b), why do they > need to enable the Confidential cloud computing technologies like TDX > or SEV-SNP? If they choose (b), then the whole threat model described > in this document do not simply apply to them and they can forget > about anything that we try to describe here. I think the problem is that the tenor of the document is that the CSP should be seen as the enemy of the tenant. Whereas all CSP's want to be seen as the partner of the tenant (admittedly so they can upsell services). In particular, even if you adopt (b) there are several reasons why you'd use confidential computing: 1. Protection from other tenants who break containment in the cloud. These tenants could exfiltrate data from Non-CoCo VMs, but likely would be detected before they had time to launch an attack using vulnerabilities in the current linux device drivers. 2. Legal data security.  There's a lot of value in a CSP being able to make the legal statement that it does not have access to a customer data because of CoCo. 3. Insider threats (bribe a CSP admin employee).  This one might get as far as trying to launch an attack on a CoCo VM, but having checks at the CSP to detect and defeat this would work instead of every insider threat having to be defeated inside the VM. In all of those cases (which are not exhaustive) you can regard the CSP as a partner of the tenant when it comes to preventing and detecting threats to the CoCo VM, so extreme device driver hardening becomes far less relevant to these fairly considerable use cases. > Now from the pure security point of view the choice between (a) and > (b) is not so easily done imo. Usually we take into account many > factors that affect the risk/chances that certain piece of SW has a > higher risk of having vulnerabilities. This includes the size of the > codebase, its complexity, its attack surface exposure towards > external interfaces, level of testing, whenever the code is public, > code dependency chains, etc. Smaller codebase with no dependencies > and small set of exposed interfaces is usually easier to review from > security point of view given that the code is public. This reads like an argument that, from a security point of view, smaller proprietary code is better than larger, open source, code. I really don't think we want to open this can of worms. Most industry players have already bought the idea that open source improves security because even if you can't rely on the community entirely, you can take the code to a third party for analysis. James