Received: by 2002:a05:6a10:2785:0:0:0:0 with SMTP id ia5csp3125654pxb; Tue, 12 Jan 2021 07:00:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJxce8Jf76A+FheTaPzSAqha4V1GVpuM5aZKUIt3PzRztPNj3di/BPFyKkceTa51U9uRtYrz X-Received: by 2002:a17:906:f85:: with SMTP id q5mr3552002ejj.105.1610463635825; Tue, 12 Jan 2021 07:00:35 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1610463635; cv=none; d=google.com; s=arc-20160816; b=I/nemCIRQUsUaAiDGiSEuPNrgHXdtm+KeR9Qk96rCaJbVGrUP/y5478ku4fFafCnpb E622bQSnCXdbC0IGET4MC6I2ddQI8Ucj1VWls7lrUAnY200kTGVIo60QyEDVqGPvhWLv uA3gxw2oVIA9ZqDcG4V3nxip+NTqw91g2Y9VQgM9+GehDnWfckUJqgwoEeYGXCrpogHq 2WS2giGLXQrB93clEHpdlroaTZytZ4R2FAI3WuvrBXUwLGLRidfLTfOnYOXYo/tb8Wch fz2O/m1OvrJzpQLwEzdQkRdC9VwiR9QxK6U2doH+sOO6+UwM1FXwEq7TqIE78MElahZd 6phw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:message-id:date:content-transfer-encoding :mime-version:subject:cc:to:references:in-reply-to:from:organization :dkim-signature; bh=XlUm2JYDUqrCFaqRZjf68KX2pnc8iKtDpFI9TKkiM18=; b=pw+fE9SbCU/KGSz0TQIEOejRIJWmostBuI/jT7i7W7e5OG4kp5wM2wA2sVhvBuYkOG CDNm3JJ4g9iB3Obnq0Ty/ALIKxumzygPh4aIJdlbH9Rd6nRuRRAUeEQpHDqrChfABenQ VCm0Qwf1U15ky1T6JAESNcuJO+npWgkpgdn/2KVgD8P6pDlwGzbQ8YnS6qyddof/1kUi vRfrv3tjpriPDXBl0v6Mnqzh4L0UBObjn42bILKqyOfqUpoWBiXk8jr1BLRFnaaOS/u2 2ZfGvf9zpdlZfQK4TqPHzuzgp1Hh26Ep+s1gpnqbh6iQuV/WyS7xY2h6UEboPqvvuIN9 q3fw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=auagODI4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id h1si1469565edj.73.2021.01.12.07.00.14; Tue, 12 Jan 2021 07:00:35 -0800 (PST) Received-SPF: pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@redhat.com header.s=mimecast20190719 header.b=auagODI4; spf=pass (google.com: domain of linux-crypto-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-crypto-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1725846AbhALO7W (ORCPT + 99 others); Tue, 12 Jan 2021 09:59:22 -0500 Received: from us-smtp-delivery-124.mimecast.com ([216.205.24.124]:33313 "EHLO us-smtp-delivery-124.mimecast.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725843AbhALO7W (ORCPT ); Tue, 12 Jan 2021 09:59:22 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1610463475; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=XlUm2JYDUqrCFaqRZjf68KX2pnc8iKtDpFI9TKkiM18=; b=auagODI4zlW3HFpZG8kb2MBX8YgOhXqJnJOzoHBdQFpjG0ZQzwTaSQbPVrXkGhLArXBotj Q73UJiH3iKf0tdnP7yM7OJ4OKT9+4rKUJWYgbaMiAW7/kDp9sqUOFSTQV6hLXCZ8p3Rz2v /tUWYk5ZrZUSapux3ZQCmTR4DKBIT84= 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-323-mlPyzESvNF2x4AJowppFGg-1; Tue, 12 Jan 2021 09:57:54 -0500 X-MC-Unique: mlPyzESvNF2x4AJowppFGg-1 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id C3DD8803F4C; Tue, 12 Jan 2021 14:57:49 +0000 (UTC) Received: from warthog.procyon.org.uk (ovpn-112-8.rdu2.redhat.com [10.10.112.8]) by smtp.corp.redhat.com (Postfix) with ESMTP id 9EA5D6B540; Tue, 12 Jan 2021 14:57:45 +0000 (UTC) Organization: Red Hat UK Ltd. Registered Address: Red Hat UK Ltd, Amberley Place, 107-111 Peascod Street, Windsor, Berkshire, SI4 1TE, United Kingdom. Registered in England and Wales under Company Registration No. 3798903 From: David Howells In-Reply-To: References: <20200916004927.64276-1-eric.snowberg@oracle.com> <1360578.1607593748@warthog.procyon.org.uk> To: Eric Snowberg Cc: dhowells@redhat.com, dwmw2@infradead.org, Jarkko Sakkinen , herbert@gondor.apana.org.au, davem@davemloft.net, jmorris@namei.org, serge@hallyn.com, nayna@linux.ibm.com, Mimi Zohar , erichte@linux.ibm.com, mpe@ellerman.id.au, keyrings@vger.kernel.org, linux-kernel@vger.kernel.org, linux-crypto@vger.kernel.org, linux-security-module@vger.kernel.org Subject: Re: [PATCH v4] certs: Add EFI_CERT_X509_GUID support for dbx entries MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Tue, 12 Jan 2021 14:57:39 +0000 Message-ID: <2442460.1610463459@warthog.procyon.org.uk> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org Eric Snowberg wrote: > > On Dec 10, 2020, at 2:49 AM, David Howells wrote: > >=20 > > Eric Snowberg wrote: > >=20 > >> Add support for EFI_CERT_X509_GUID dbx entries. When a EFI_CERT_X509_G= UID > >> is found, it is added as an asymmetrical key to the .blacklist keyring. > >> Anytime the .platform keyring is used, the keys in the .blacklist keyr= ing > >> are referenced, if a matching key is found, the key will be rejected. > >=20 > > Ummm... Why this way and not as a blacklist key which takes up less sp= ace? > > I'm guessing that you're using the key chain matching logic. We really= only > > need to blacklist the key IDs. >=20 > I implemented it this way so that certs in the dbx would only impact=20 > the .platform keyring. I was under the impression we didn=E2=80=99t want = to have=20 > Secure Boot UEFI db/dbx certs dictate keyring functionality within the ke= rnel > itself. Meaning if we have a matching dbx cert in any other keyring (buil= tin, > secondary, ima, etc.), it would be allowed. If that is not how you=E2=80= =99d like to=20 > see it done, let me know and I=E2=80=99ll make the change. I wonder if that is that the right thing to do. I guess this is a policy decision and may depend on the particular user. > > Also, what should happen if a revocation cert rejected by the blacklist? >=20 > I=E2=80=99m not sure I understand the question. How would it be rejected? The SHA256 of a revocation cert being loaded could match an already-blacklisted SHA256 sum, either compiled in or already loaded from UEFI. David