[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <58fbc60fccf6d6c9504301adeebf33a46766d507.camel@huaweicloud.com>
Date: Tue, 19 Nov 2024 15:33:49 +0100
From: Roberto Sassu <roberto.sassu@...weicloud.com>
To: Christoph Hellwig <hch@....de>
Cc: zohar@...ux.ibm.com, dmitry.kasatkin@...il.com,
eric.snowberg@...cle.com, corbet@....net, mcgrof@...nel.org,
petr.pavlu@...e.com, samitolvanen@...gle.com, da.gomez@...sung.com,
akpm@...ux-foundation.org, paul@...l-moore.com, jmorris@...ei.org,
serge@...lyn.com, shuah@...nel.org, mcoquelin.stm32@...il.com,
alexandre.torgue@...s.st.com, linux-integrity@...r.kernel.org,
linux-doc@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-api@...r.kernel.org, linux-modules@...r.kernel.org,
linux-security-module@...r.kernel.org, linux-kselftest@...r.kernel.org,
wufan@...ux.microsoft.com, pbrobinson@...il.com, zbyszek@...waw.pl,
mjg59@...f.ucam.org, pmatilai@...hat.com, jannh@...gle.com,
dhowells@...hat.com, jikos@...nel.org, mkoutny@...e.com, ppavlu@...e.com,
petr.vorel@...il.com, mzerqung@...inter.de, kgold@...ux.ibm.com, Roberto
Sassu <roberto.sassu@...wei.com>
Subject: Re: [PATCH v6 02/15] module: Introduce ksys_finit_module()
On Tue, 2024-11-19 at 13:14 +0100, Christoph Hellwig wrote:
> On Tue, Nov 19, 2024 at 11:49:09AM +0100, Roberto Sassu wrote:
> > From: Roberto Sassu <roberto.sassu@...wei.com>
> >
> > Introduce ksys_finit_module() to let kernel components request a kernel
> > module without requiring running modprobe.
>
> That does sound more than sketchy, even more so because the commit log
> completely fails to explain why you'd need to do that.
With my solution, the kernel grants access to a file in user space
depending on whether or not its calculated (or fsverity) digest is
found in an application manifest provided by the software vendor.
However, what it happens is that in the early boot phase the parser is
not loaded yet, and the kernel cannot extract the reference digests
from the application manifest.
Thus, calling request_module() and consequently executing modprobe will
fail, since the kernel does not have its reference digest yet.
Instead, loading the kernel module from the kernel itself works,
because only the kernel module needs to be verified, and that can be
done through its appended signature.
Roberto
Powered by blists - more mailing lists