mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Coiby Xu <coxu@redhat.com>, linux-integrity@vger.kernel.org
Cc: Dmitry Kasatkin <dmitry.kasatkin@gmail.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: require signed IMA policy when UEFI secure boot is enabled
Date: Tue, 04 Jul 2023 08:57:10 -0400	[thread overview]
Message-ID: <b61fedf214cbe72de063a3bf516dd72f80595219.camel@linux.ibm.com> (raw)
In-Reply-To: <20230703115442.129725-1-coxu@redhat.com>

On Mon, 2023-07-03 at 19:54 +0800, Coiby Xu wrote:
> With the introduction of the .machine keyring for UEFI-based systems,
> users are able to add custom CAs keys via MOK. This allow users to sign
> their own IMA polices. For the sake of security, mandate signed IMA
> policy when UEFI secure boot is enabled.
> 
> Suggested-by: Mimi Zohar <zohar@linux.ibm.com>
> Signed-off-by: Coiby Xu <coxu@redhat.com>
> ---
>  security/integrity/ima/ima_efi.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/security/integrity/ima/ima_efi.c b/security/integrity/ima/ima_efi.c
> index 9db66fe310d4..bb2881759505 100644
> --- a/security/integrity/ima/ima_efi.c
> +++ b/security/integrity/ima/ima_efi.c
> @@ -58,6 +58,9 @@ static const char * const sb_arch_rules[] = {
>  #if !IS_ENABLED(CONFIG_MODULE_SIG)
>  	"appraise func=MODULE_CHECK appraise_type=imasig",
>  #endif
> +#if IS_ENABLED(CONFIG_INTEGRITY_MACHINE_KEYRING) && IS_ENABLED(CONFIG_IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY)
> +	"appraise func=POLICY_CHECK appraise_type=imasig",
> +#endif /* CONFIG_INTEGRITY_MACHINE_KEYRING && IMA_KEYRINGS_PERMIT_SIGNED_BY_BUILTIN_OR_SECONDARY */
>  	"measure func=MODULE_CHECK",
>  	NULL
>  };

Thanks, Coiby.

Using IS_ENABLED() is not wrong, but unnecessary.  IS_BUILTIN()
suffices.

-- 
thanks,

Mimi


  reply	other threads:[~2023-07-04 12:57 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-03 11:54 Coiby Xu
2023-07-04 12:57 ` Mimi Zohar [this message]
2023-07-14  1:29   ` Coiby Xu
2023-07-20 14:12     ` Mimi Zohar
2023-07-26  2:08 ` [PATCH v2] " Coiby Xu
2023-07-27 17:38   ` 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=b61fedf214cbe72de063a3bf516dd72f80595219.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=coxu@redhat.com \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=jmorris@namei.org \
    --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=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

all inboxes | Powered by JetHome®