Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp1427590pxf; Fri, 12 Mar 2021 09:14:30 -0800 (PST) X-Google-Smtp-Source: ABdhPJw0tjJx9UqUlZP2G90t4thcdBeGPt4gRCb9uPc6WeTB9AH8832bzlQoniMiAPfMcImizcLc X-Received: by 2002:a17:906:5689:: with SMTP id am9mr9358191ejc.298.1615569270368; Fri, 12 Mar 2021 09:14:30 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1615569270; cv=none; d=google.com; s=arc-20160816; b=bCr++wZyRa1806hikvuuNFY5eONCdS5ZDd7jK/l4GAbRMma2G+uLnrsihYD2LWN4Ev JSKEwVUXazwQ/0Y9Qghdssu3ST2hoUw2wgJG0e8xDFGc/Y+tLCtohu/uvYsT6TD3wBAR bbcTR0rLx4k36XisN6BSvu3BR5p8gGIyJqwydkf5akAunN8fBBLMzq8dsU8mtRf4kRtq ARMWjcfLExGTw2UKErCvfgPy3Is/AXwQ63SkAxnCCPc5GaT8U3+JKXN8UN3pemkNxFaT 1S3gDWTqALiFUxIGzwkrBNq94GClsfrr3dVRfxWzGhku0eXFTfb8M+0U3/hMB9dQT4if dz1A== 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 :message-id:date:subject:cc:to:from; bh=kWWxR7HiRmwi3mqU+Bfn0Eqsi+jly4pRFeKJXFwGMu4=; b=QjoPXacm2UN9QvTPDAdRMvasXVRFEH/EF1Yc2J6wbTW9P0hvB1bs1l3Kye764bXZnI b2mOalzEp9eNxezvcDPZ5E2/8daakgw8r9cQcnVe5bdIGmfBwDuLAS533ebnLZGz+mOv gbt0QBgVmmMFi4W+zsdr6q6qd/StP8ZPsvGefKWBIMCpYY3fAWh/9fyr6a93uEURIrx8 tKYftsfb2CfHk5lP5nxq06D8NJevKEz1pF13cOMTZwDyszemPMXNyK9tGSUmb7mqbY4i umVAn8ruHvCBnhEWJSWLcPHdPMOx8awTtHeeYXLJtC25mZhOt8SBWWw55hEUOlrHQMeQ jq0g== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t8si4575852edw.476.2021.03.12.09.13.51; Fri, 12 Mar 2021 09:14:30 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S232057AbhCLRNR (ORCPT + 99 others); Fri, 12 Mar 2021 12:13:17 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38154 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232176AbhCLRNO (ORCPT ); Fri, 12 Mar 2021 12:13:14 -0500 Received: from smtp-8fa9.mail.infomaniak.ch (smtp-8fa9.mail.infomaniak.ch [IPv6:2001:1600:3:17::8fa9]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9DDE9C061761 for ; Fri, 12 Mar 2021 09:13:13 -0800 (PST) Received: from smtp-2-0001.mail.infomaniak.ch (unknown [10.5.36.108]) by smtp-2-3000.mail.infomaniak.ch (Postfix) with ESMTPS id 4DxspF5Q10zMqPT5; Fri, 12 Mar 2021 18:13:09 +0100 (CET) Received: from localhost (unknown [23.97.221.149]) by smtp-2-0001.mail.infomaniak.ch (Postfix) with ESMTPA id 4DxspC1fRczlh8TK; Fri, 12 Mar 2021 18:13:07 +0100 (CET) From: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= To: David Howells , David Woodhouse , Jarkko Sakkinen Cc: =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , "David S . Miller" , Eric Snowberg , Herbert Xu , James Morris , =?UTF-8?q?Micka=C3=ABl=20Sala=C3=BCn?= , Mimi Zohar , "Serge E . Hallyn" , Tyler Hicks , keyrings@vger.kernel.org, linux-crypto@vger.kernel.org, linux-integrity@vger.kernel.org, linux-kernel@vger.kernel.org, linux-security-module@vger.kernel.org Subject: [PATCH v7 0/5] Enable root to update the blacklist keyring Date: Fri, 12 Mar 2021 18:12:27 +0100 Message-Id: <20210312171232.2681989-1-mic@digikod.net> X-Mailer: git-send-email 2.30.2 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-crypto@vger.kernel.org This new patch series is a rebase on David Howells's and Eric Snowberg's keys-cve-2020-26541-v3. I successfully tested this patch series with the 186 entries from https://uefi.org/sites/default/files/resources/dbxupdate_x64.bin (184 binary hashes and 2 certificates). The goal of these patches is to add a new configuration option to enable the root user to load signed keys in the blacklist keyring. This keyring is useful to "untrust" certificates or files. Enabling to safely update this keyring without recompiling the kernel makes it more usable. This can be applied on top of David Howells's keys-cve-2020-26541-branch: https://git.kernel.org/pub/scm/linux/kernel/git/dhowells/linux-fs.git/log/?h=keys-cve-2020-26541-branch Previous patch series: https://lore.kernel.org/lkml/20210210120410.471693-1-mic@digikod.net/ Regards, Mickaël Salaün (5): tools/certs: Add print-cert-tbs-hash.sh certs: Check that builtin blacklist hashes are valid certs: Make blacklist_vet_description() more strict certs: Factor out the blacklist hash creation certs: Allow root user to append signed hashes to the blacklist keyring MAINTAINERS | 2 + certs/.gitignore | 1 + certs/Kconfig | 17 +- certs/Makefile | 17 +- certs/blacklist.c | 218 ++++++++++++++---- crypto/asymmetric_keys/x509_public_key.c | 3 +- include/keys/system_keyring.h | 14 +- scripts/check-blacklist-hashes.awk | 37 +++ .../platform_certs/keyring_handler.c | 26 +-- tools/certs/print-cert-tbs-hash.sh | 91 ++++++++ 10 files changed, 346 insertions(+), 80 deletions(-) create mode 100755 scripts/check-blacklist-hashes.awk create mode 100755 tools/certs/print-cert-tbs-hash.sh base-commit: ebd9c2ae369a45bdd9f8615484db09be58fc242b -- 2.30.2