[PATCH RFC 0/1] module: Optionally use .platform keyring for signatures verification
Vitaly Kuznetsov
vkuznets at redhat.com
Thu Jun 5 14:56:00 UTC 2025
Eric Snowberg <eric.snowberg at oracle.com> writes:
>> On Jun 5, 2025, at 1:54 AM, Vitaly Kuznetsov <vkuznets at redhat.com> wrote:
>>
>> 'certwrapper' offers _a_ solution which is great. It may, however, not
>> be very convenient to use when a user wants to re-use the same OS image
>> (e.g. provided by the distro vendor) for various different use-cases as
>> proper 'certwrapper' binary needs to be placed on the ESP (and thus
>> we'll end up with a bunch of images instead of one). 'db' is different
>> because it normally lives outside of the OS disk so it is possible to
>> register the exact same OS image with different properties (e.g. with
>> and without a custom cert which allows to load third party modules).
>
> Could you please provide more details? The kernel module is signed with
> a specific key. The ‘db’ key in the cloud image must match whatever key
> was used to sign the kernel module.
>
> Why can’t the RPM package that contains the kernel module also include
> the required ‘certwrapper’? When the RPM is installed, the appropriate
> ‘certwrapper’ is placed on the ESP. There can be any number of 'certwrappers'
> in the ESP. Doesn’t this solution address the issue?
I think it does but let me elaborate on where I believe some (minor?)
inconvenience comes from.
We have various actors here:
1) The OS image which is coming from a distro vendor.
2) The user, which takes the OS image and registers it with specific
properties (including 'db') with various infrastructures (e.g. different
clouds).
3) A third party kmod vendor which produces a module compatible with the
OS version. The module may only make sense for certain VMs on certain
clouds.
The customization of the VM normally happens upon first boot: a generic
image from the OS vendor (1) boots and then some provisioning agent
(cloud-init, WALA,...) takes over and e.g. installs additional
stuff. This additional stuff may include third party kmods from (3).
The 'certwrapper' must carry the key which the third party vendor (3) uses
and it must be signed by a key which the user (2) put to the 'db'. If we
want to have the 'certwrapper' shipped inside the same RPM as the kernel
module, it will be signed by the same third party vendor (3). While this
looks a bit weird ('self-signed certwrapper'), I don't see why this
can't work.
Besides the need to teach (3) how to build certwrappers, an inconvenience
in this scheme comes from the fact that to activate a 'certwrapper'
which we install from a custom rpm, we need a reboot. Cloud instances
often back burstable workloads and this can be seen as annoyance.
--
Vitaly
More information about the Linux-security-module-archive
mailing list