linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Coiby Xu <coxu@redhat.com>
Cc: linux-integrity@vger.kernel.org,
	Dmitry Torokhov <dmitry.torokhov@gmail.com>,
	Karel Srot <ksrot@redhat.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>,
	"open list:SECURITY SUBSYSTEM"	
	<linux-security-module@vger.kernel.org>,
	open list	 <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] ima: Fall back to default kernel module signature verification
Date: Thu, 30 Oct 2025 12:50:48 -0400	[thread overview]
Message-ID: <1fb245a0e72a360df3a768726351e7fa76301471.camel@linux.ibm.com> (raw)
In-Reply-To: <pbkvp4o4m3spjgvctapidfnsswakekxl2vyigqip6yyfzp73z4@rgbohq7h4nnt>

On Thu, 2025-10-30 at 21:42 +0800, Coiby Xu wrote:
> > > 
> > > Another question is whether we should allow loading a kernel module with
> > > appended signature but misses IMA signature. Both IMA arch specific policy
> > > and init_module syscall only require appended signature verification. On
> > > the other hand, we only allow "appraise_type=imasig|modsig" but not
> > > appraise_type=modsig. How about we allow loading a kernel module with
> > > valid appended signature regardless of its IMA signature? We won't call
> > > set_module_sig_enforced but as long as we know is_module_sig_enforced()
> > > is true, we allow the module in IMA.
> > 
> > Based on the policy, IMA enforces signature verification. Only if
> > CONFIG_MODULE_SIG is configured, the IMA arch specific policy does not define an
> > IMA kernel module appraise rule. However, custom policies could still require
> > both types of signatures, not necessarily signed by the same entity.
> > 
> > The option "appraise_type=imasig|modsig" allows either an IMA signature OR an
> > appended signature.
> 
> Thanks for the clarification! If I understand you correctly, some users
> may want to enforce IMA signature verification and we should provide
> such flexibility. Then do you think it's a good idea to change the kernel
> module rule in ima_policy=secure_boot to 
> "appraise func=MODULE_CHECK appraise_type=imasig|modsig" so
> ima_policy=secure_boot can also work for in-kernel decompressing
> modules?

Yes, that's fine.  Unlike the arch specific policy rules and the Kconfig
appraise rules, which persist after loading a custom policy, the builtin secure
boot rules do not persist.

Mimi



  reply	other threads:[~2025-10-30 16:51 UTC|newest]

Thread overview: 42+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-28  3:03 [PATCH] ima: Fall back to default kernel module signature verification Coiby Xu
2025-09-30 13:57 ` Mimi Zohar
2025-09-30 20:28   ` Mimi Zohar
2025-10-16  3:46     ` Coiby Xu
2025-10-17  2:31       ` Mimi Zohar
2025-10-17  3:19         ` Coiby Xu
2025-10-17 17:49           ` Mimi Zohar
2025-10-17 23:19             ` Coiby Xu
2025-10-20 12:21               ` Mimi Zohar
2025-10-20 12:45                 ` Roberto Sassu
2025-10-20 13:57                   ` Mimi Zohar
2025-10-30  0:33                     ` Coiby Xu
2025-10-24 15:16                 ` Mimi Zohar
2025-10-30  0:31                   ` Coiby Xu
2025-10-30  3:01                     ` Mimi Zohar
2025-10-30 13:42                       ` Coiby Xu
2025-10-30 16:50                         ` Mimi Zohar [this message]
2025-10-31  7:58                           ` Coiby Xu
2025-10-02 17:17 ` kernel test robot
2025-10-16  3:51   ` Coiby Xu
2025-10-31  7:40 ` [PATCH v2] lsm,ima: new LSM hook security_kernel_module_read_file to access decompressed kernel module Coiby Xu
2025-11-01 16:50   ` Paul Moore
2025-11-02 15:05     ` Mimi Zohar
2025-11-02 15:43       ` Paul Moore
2025-11-05  0:18         ` Coiby Xu
2025-11-05  2:47           ` Paul Moore
2025-11-05 14:07             ` Mimi Zohar
2025-11-05 15:42               ` Paul Moore
2025-11-05 20:25                 ` Mimi Zohar
2025-11-06 13:35                   ` Coiby Xu
2025-11-05 20:47           ` Mimi Zohar
2025-11-06 13:29             ` Coiby Xu
2025-11-06 22:15               ` Mimi Zohar
2025-11-07 19:28                 ` Mimi Zohar
2025-11-13  4:06                   ` Coiby Xu
2025-11-18 12:19                     ` Mimi Zohar
2025-11-19  3:52                       ` Coiby Xu
2025-11-19  3:47   ` [PATCH v3] ima: Access decompressed kernel module to verify appended signature Coiby Xu
2025-11-19 13:29     ` Mimi Zohar
2025-11-19 14:05       ` Coiby Xu
2025-11-19 14:03   ` [PATCH v4] " Coiby Xu
2025-11-19 15:29     ` 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=1fb245a0e72a360df3a768726351e7fa76301471.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=coxu@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=dmitry.torokhov@gmail.com \
    --cc=eric.snowberg@oracle.com \
    --cc=jmorris@namei.org \
    --cc=ksrot@redhat.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=paul@paul-moore.com \
    --cc=roberto.sassu@huawei.com \
    --cc=serge@hallyn.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;
as well as URLs for NNTP newsgroup(s).