[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <9a9a6cb0b3f2e643a17743250f4a137baaea7a7e.camel@linux.ibm.com>
Date: Wed, 27 Apr 2022 17:21:00 -0400
From: Mimi Zohar <zohar@...ux.ibm.com>
To: Eric Snowberg <eric.snowberg@...cle.com>
Cc: "dmitry.kasatkin@...il.com" <dmitry.kasatkin@...il.com>,
"jmorris@...ei.org" <jmorris@...ei.org>,
"serge@...lyn.com" <serge@...lyn.com>,
"linux-integrity@...r.kernel.org" <linux-integrity@...r.kernel.org>,
"linux-security-module@...r.kernel.org"
<linux-security-module@...r.kernel.org>,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] integrity: Allow ima_appraise bootparam to be set when
SB is enabled
On Wed, 2022-04-27 at 16:12 +0000, Eric Snowberg wrote:
>
> > On Apr 26, 2022, at 12:18 PM, Mimi Zohar <zohar@...ux.ibm.com> wrote:
> >
> > On Mon, 2022-04-25 at 18:21 -0400, Eric Snowberg wrote:
> >> The IMA_APPRAISE_BOOTPARM config allows enabling different "ima_appraise="
> >> modes (log, fix, enforce) to be configured at boot time. When booting
> >> with Secure Boot enabled, all modes are ignored except enforce. To use
> >> log or fix, Secure Boot must be disabled.
> >>
> >> With a policy such as:
> >>
> >> appraise func=BPRM_CHECK appraise_type=imasig
> >>
> >> A user may just want to audit signature validation. Not all users
> >> are interested in full enforcement and find the audit log appropriate
> >> for their use case.
> >>
> >> Add a new IMA_APPRAISE_SB_BOOTPARAM config allowing "ima_appraise="
> >> to work when Secure Boot is enabled.
> >>
> >> Signed-off-by: Eric Snowberg <eric.snowberg@...cle.com>
> >
> > Since the IMA architecture specific policy rules were first
> > upstreamed, either enabling IMA_APPRAISE_BOOTPARAM or IMA_ARCH_POLICY
> > was permitted, but not both.
>
> I don’t see code preventing this and just created a config with both of them
> enabled. Is this an assumption everyone is supposed to understand?
This was very clear in the original patch upstreamed. Refer to the
IMA_APPRAISE_BOOTPRAM in commit d958083a8f64 ("x86/ima: define
arch_get_ima_policy() for x86"). This subsequently changed to be based
on the secureboot runtime state. Refer to commit 311aa6aafea4 ("ima:
move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime").
>
> > This Kconfig negates the assumptions on
> > which the CONFIG_IMA_ARCH_POLICY and the ima_appraise_signature() are
> > based without any indication of the ramifications. This impacts the
> > kexec file syscall lockdown LSM assumptions as well.
>
> I will fix this in the next round.
Either secureboot is or isn't enabled. When it is enabled, then IMA
must be in enforcing mode.
> > A fuller, more complete explanation for needing "log" mode when secure
> > boot is enabled is required.
>
> and add a more thorough explanation. Thanks.
Normally "log" mode is needed during development.
thanks,
Mimi
Powered by blists - more mailing lists