mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: James Bottomley <James.Bottomley@HansenPartnership.com>
To: Coiby Xu <coxu@redhat.com>
Cc: Vitaly Kuznetsov <vkuznets@redhat.com>,
	 linux-security-module@vger.kernel.org,
	linux-integrity@vger.kernel.org,  linux-modules@vger.kernel.org,
	linux-kernel@vger.kernel.org,  linux-doc@vger.kernel.org,
	keyrings@vger.kernel.org, David Howells <dhowells@redhat.com>,
	David Woodhouse <dwmw2@infradead.org>,
	Jonathan Corbet <corbet@lwn.net>,
	Luis Chamberlain <mcgrof@kernel.org>,
	Petr Pavlu <petr.pavlu@suse.com>,
	Sami Tolvanen <samitolvanen@google.com>,
	Daniel Gomez <da.gomez@samsung.com>,
	Mimi Zohar <zohar@linux.ibm.com>,
	Roberto Sassu <roberto.sassu@huawei.com>,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>,
	 Eric Snowberg <eric.snowberg@oracle.com>,
	Paul Moore <paul@paul-moore.com>,
	James Morris <jmorris@namei.org>,
	 "Serge E. Hallyn" <serge@hallyn.com>,
	Peter Jones <pjones@redhat.com>,
	Robert Holmes <robeholmes@gmail.com>,
	Jeremy Cline <jcline@redhat.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: Re: [PATCH RFC 1/1] module: Make use of platform keyring for module signature verify
Date: Thu, 05 Jun 2025 08:05:56 -0400	[thread overview]
Message-ID: <bec46b16778d9292ab90b3e1c71be6c56c8a5a50.camel@HansenPartnership.com> (raw)
In-Reply-To: <ibosm332sa2kz6vqrru5qsfk4tybsxepo4vascc3zsetmyckvv@pml7puc5jyl6>

On Thu, 2025-06-05 at 16:34 +0800, Coiby Xu wrote:
> On Tue, Jun 03, 2025 at 09:03:22AM -0400, James Bottomley wrote:
> > On Tue, 2025-06-03 at 10:52 +0200, Vitaly Kuznetsov wrote:
> > > James Bottomley <James.Bottomley@HansenPartnership.com> writes:
> > [...]
> > > > Also, are you sure a config option is the right thing? 
> > > > Presumably Red Hat wants to limit its number of kernels and the
> > > > design of just linking the machine keyring (i.e. MoK) was for
> > > > the use case where trust is being pivoted away from db by shim,
> > > > so users don't want to trust the db keys they don't control. 
> > > > If the same kernel gets used for both situations (trusted and
> > > > untrusted db) you might want a runtime means to distinguish
> > > > them.
> > > 
> > > I was not personally involved when RH put the patch downstream
> > > (and wasn't very successful in getting the background story) but
> > > it doesn't even have an additional Kconfig, e.g.:
> > > https://gitlab.com/redhat/centos-stream/src/kernel/centos-stream-10/-/commit/03d4694fa6511132989bac0da11fa677ea5d29f6
> > > so apparently there's no desire to limit anything, basically,
> > > .platform is always trusted on Fedora/RHEL systems (for a long
> > > time already).
> > 
> > It sounds like that's just distro politics:  RH wants to enable
> > binary modules (by allowing them to be signed) but doesn't want to
> > be seen to be signing them (so they can't be signed with the
> > embedded RH key) so that gamers can have performant graphics
> > drivers and the like.  Thus it mixes in the db keyring, which
> > usually contains several Microsoft certificates and also one from
> > the ODM manufacturer, so now it can send would be shippers of
> > binary modules to those groups to get them signed. If you only have
> > the built in and MoK keyrings, the only possible signers are either
> > RH or the machine owner ... who isn't a single entity to deal
> > with.  Personally I think this is a bit daft: Debian manages an out
> > of tree module infrastructure using DKMS and MoK signing, so I
> > can't see why RH can't get it to work in the same way.
> 
> It's interesting to find that although Debian's wiki page [1] only
> mentions DKMS and MOK, it actually has the same downstream kernel
> patch [2][3] as Fedora/RHEL to allow using db keys to verify kernel
> modules. 
> [1] https://wiki.debian.org/SecureBoot
> [2]
> https://salsa.debian.org/kernel-team/linux/-/blob/debian/latest/debian/patches/features/all/db-mok-keyring/KEYS-Make-use-of-platform-keyring-for-module-signature.patch?ref_type=heads
> [3]
> https://sources.debian.org/patches/linux/6.12.30-1/features/all/db-mok-keyring/KEYS-Make-use-of-platform-keyring-for-module-signature.patch/
> 

Well if you read the attached bug reports:

https://bugs.debian.org/935945
https://bugs.debian.org/1030200

You can see that it's people trying to get an external module to work
(actually zfs locally signed) by adding keys to MoK and it failed
because of a configuration error (CONFIG_INTEGRITY_MACHINE_KEYRING
wasn't set).  They added this patch as part of the thrashing around
trying to fix the problem because they found it in Fedora.

Regards,

James


  reply	other threads:[~2025-06-05 12:05 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-06-02 13:25 [PATCH RFC 0/1] module: Optionally use .platform keyring for signatures verification Vitaly Kuznetsov
2025-06-02 13:25 ` [PATCH RFC 1/1] module: Make use of platform keyring for module signature verify Vitaly Kuznetsov
2025-06-02 18:34   ` James Bottomley
2025-06-03  8:52     ` Vitaly Kuznetsov
2025-06-03 13:03       ` James Bottomley
2025-06-04  7:47         ` Vitaly Kuznetsov
2025-06-05  8:34         ` Coiby Xu
2025-06-05 12:05           ` James Bottomley [this message]
2025-06-08 11:14             ` Coiby Xu
2025-06-04 17:01 ` [PATCH RFC 0/1] module: Optionally use .platform keyring for signatures verification Eric Snowberg
2025-06-04 17:34   ` James Bottomley
2025-06-05  7:54     ` Vitaly Kuznetsov
2025-06-05 12:22       ` James Bottomley
2025-06-05 13:43         ` Vitaly Kuznetsov
2025-06-05 15:49           ` James Bottomley
2025-06-09  8:58             ` Vitaly Kuznetsov
2025-06-05 13:35       ` Eric Snowberg
2025-06-05 14:56         ` Vitaly Kuznetsov
2025-06-05 14:35 ` Mimi Zohar

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bec46b16778d9292ab90b3e1c71be6c56c8a5a50.camel@HansenPartnership.com \
    --to=james.bottomley@hansenpartnership.com \
    --cc=corbet@lwn.net \
    --cc=coxu@redhat.com \
    --cc=da.gomez@samsung.com \
    --cc=dhowells@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dwmw2@infradead.org \
    --cc=eric.snowberg@oracle.com \
    --cc=jcline@redhat.com \
    --cc=jmorris@namei.org \
    --cc=keyrings@vger.kernel.org \
    --cc=kraxel@redhat.com \
    --cc=linux-doc@vger.kernel.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-modules@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=mcgrof@kernel.org \
    --cc=paul@paul-moore.com \
    --cc=petr.pavlu@suse.com \
    --cc=pjones@redhat.com \
    --cc=robeholmes@gmail.com \
    --cc=roberto.sassu@huawei.com \
    --cc=samitolvanen@google.com \
    --cc=serge@hallyn.com \
    --cc=vkuznets@redhat.com \
    --cc=zohar@linux.ibm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®