From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by mx.groups.io with SMTP id smtpd.web10.7239.1635847566407425515 for ; Tue, 02 Nov 2021 03:06:06 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=WMbFFf9e; spf=pass (domain: redhat.com, ip: 170.10.133.124, mailfrom: kraxel@redhat.com) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1635847565; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=fxBEi9kHGIXJkb3AaEczdIzDEoMm9FuxiOtQcsxC7RY=; b=WMbFFf9etdPNx8tgNLqQJMVwH8p8WJPl6QvrkD82y2X3gB1RMl6+I8CeKNgoLfqUfiqeSp tlSHjZEes5z0gZOfIBn1MPGeZGlqTm54KmFQsKxL8FJ1hM44tT9TT0PbiKtbA8MlehDkz6 V+L7RqSdVpzep46eYu2UVRTOBS7RHvg= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-366-YyQUEyG4M7uaN7Xua489Eg-1; Tue, 02 Nov 2021 06:06:02 -0400 X-MC-Unique: YyQUEyG4M7uaN7Xua489Eg-1 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C9CE2806690; Tue, 2 Nov 2021 10:06:00 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-112-241.phx2.redhat.com [10.3.112.241]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 8D0C75D9D5; Tue, 2 Nov 2021 10:06:00 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B94FE180092D; Tue, 2 Nov 2021 11:05:57 +0100 (CET) Date: Tue, 2 Nov 2021 11:05:57 +0100 From: "Gerd Hoffmann" To: Dov Murik Cc: devel@edk2.groups.io, Ard Biesheuvel , Jordan Justen , Brijesh Singh , Erdem Aktas , James Bottomley , Jiewen Yao , Min Xu , Tom Lendacky , Tobin Feldman-Fitzthum Subject: Re: [PATCH] OvmfPkg/AmdSev: Erase secret area content on ExitBootServices Message-ID: <20211102100557.tcv5mfz2rpnmcrpa@sirius.home.kraxel.org> References: <20211102082506.366921-1-dovmurik@linux.ibm.com> MIME-Version: 1.0 In-Reply-To: <20211102082506.366921-1-dovmurik@linux.ibm.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=kraxel@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Tue, Nov 02, 2021 at 08:25:06AM +0000, Dov Murik wrote: > The confidential computing secrets area is marked as EfiBootServicesData > region, which means it is released for the OS use when the OS EFI stub > calls ExitBootServices. However, its content is not erased, and > therefore the OS might unintentionally reuse this sensitive memory area > and expose the injected secrets. > > Erase the content of the secret area on ExitBootServices so that the > memory released to the OS contains zeros. If the OS needs to keep the > secrets for its own use, it must copy the secrets area to another memory > area before calling ExitBootServices (for example in efi/libstub in > Linux). Acked-by: Gerd Hoffmann take care, Gerd