Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp1179817imm; Wed, 15 Aug 2018 12:52:02 -0700 (PDT) X-Google-Smtp-Source: AA+uWPxr+GrS1gi8ulLj3DYugDbm2K7kETvm3NKnMranAOi7hYv5WLbKIo/ITeXI243t8tsOZLu9 X-Received: by 2002:a63:4b1f:: with SMTP id y31-v6mr26791896pga.14.1534362722293; Wed, 15 Aug 2018 12:52:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1534362722; cv=none; d=google.com; s=arc-20160816; b=0VeXDXSfzDXgbsm+49S67Mvt3NXEZC6PXmrvBLfnJIqjxOwQk4a4uS5cZf4j0z0ii7 EeZlc3/b5i5ap5c0Xfdf+5a6pRpeUhGulcPjW3hGCIA43OXlmXyNYvHmXzii4fu3DcBI brACeABkUQ9eq3VB8DLgmxsiCPV8IdfhddZcYXJcgacuXzGlQMYQ1fzuXiN8tBPwKVCq xlgOpZg5rpwa8U8ZX1QhqXG53iVPgn2jv1QFf3Cg4bAP0Dh0DXE9h5muaaYTaPuLxUjB 6jScTH0FRSEUUGPyOTcO/8wBBihCl6z4oxlNM2XsoXlpcqEzCp9ABqIlMP1sPsH3FGuG e/SQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=oltWMfBVNEpryaUKrp1Zp5CKPj7W6TNxaOAMxGfeEWQ=; b=cIP77lHfsw5KbS3peMLzWrKDNioHgrCpgmvsRzqgftJZ5In6i0K/C3XVlp8sFdCs0N J/qYFNXnz0CqTxIuH8epnMN6t7ZrvgLfBh6P3OMB05bGOzl+2ImSrcgNygE9t2rZTjmZ 77Gjf+Ujh8GNT1iyfjWmWwvZPVahbBQUulhUGEDZEojBbGSmlET7Qztk9710lhizl3Mw R7FO95iLbzAP2wfqvVeUOIozNz7uXwDORjUMqkpSOebs884RRB8MUptU52mdV/gXzmoh UgrD0SghgEj8rVGrOnMb5+UVceY5rxxd6NXW2TY5c824VqCSnHvGxU2DW9ahjIWyUHMT Rt9g== 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=redhat.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t16-v6si23242385pgi.457.2018.08.15.12.51.46; Wed, 15 Aug 2018 12:52:02 -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=redhat.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728069AbeHOWnI (ORCPT + 99 others); Wed, 15 Aug 2018 18:43:08 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:40304 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1728031AbeHOWnI (ORCPT ); Wed, 15 Aug 2018 18:43:08 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 36E86406E886; Wed, 15 Aug 2018 19:49:35 +0000 (UTC) Received: from horse.redhat.com (unknown [10.18.25.234]) by smtp.corp.redhat.com (Postfix) with ESMTP id 3602510EE822; Wed, 15 Aug 2018 19:49:33 +0000 (UTC) Received: by horse.redhat.com (Postfix, from userid 10451) id EF73722425E; Wed, 15 Aug 2018 15:49:32 -0400 (EDT) Date: Wed, 15 Aug 2018 15:49:32 -0400 From: Vivek Goyal To: Yannik Sembritzki Cc: Linus Torvalds , David Howells , Thomas Gleixner , Ingo Molnar , Peter Anvin , the arch/x86 maintainers , Linux Kernel Mailing List , Dave Young , Baoquan He , "Justin M. Forbes" , Peter Jones , James Bottomley , Matthew Garrett Subject: Re: [PATCH] Fix kexec forbidding kernels signed with custom platform keys to boot Message-ID: <20180815194932.GD29541@redhat.com> References: <20180815100053.13609-1-yannik@sembritzki.me> <654fbafb-69da-cd9a-b176-7b03401e71c5@sembritzki.me> <20180815174247.GB29541@redhat.com> <20180815185812.GC29541@redhat.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.1 (2017-09-22) X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 15 Aug 2018 19:49:35 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Wed, 15 Aug 2018 19:49:35 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'vgoyal@redhat.com' RCPT:'' Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Aug 15, 2018 at 09:06:13PM +0200, Yannik Sembritzki wrote: > > > I am wondering why did we have to split this keyring to begin with. > > So there are use cases where we want to trust builtin keys but > > not the ones which came from other places (UEFI secure boot db, or > > user loaded one)? > > > "User loaded ones" should not be trusted in general to prevent rootkits > and similar from modifying the kernel (even if they have root). > > According to the patch which introduced the secondary keyring (the one > you mentioned), the requirements for adding keys to the secondary > keyring are as follows: > "Add a secondary system keyring that can be added to by root whilst the > system is running - provided the key being added is vouched for by a key > built into the kernel or already added to the secondary keyring." > Right. So it will become a question of should we trust a key which is possibly dynamically loaded into the kernel, and which has been trusted by an existing key. So this sounds like extending chain of trust to a key which is dynamically loaded later. I feels reasonable to me to extend chain of trust for kexec kernel. (Until and unless somebody has a use case in mind where this is not a good idea). I see that module signing code trusts only builtin keys and not the keys in secondary_trusted_keys keyring. Dave, what's the reason behind having two keyrings. Is it because module signing code does not want to trust keys other than built-in ones? Thanks Vivek > I personally don't see a reason for this split, as the requirements for > the secondary keyring are as strict as it can get. However, I'm new to > this, so feel free to correct me. > > Yannik >