linux-integrity.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Mimi Zohar <zohar@linux.ibm.com>
To: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>,
	eric.snowberg@oracle.com, linux-integrity@vger.kernel.org
Subject: Re: [PATCH v0] IMA: Check IMA policy flag
Date: Mon, 25 Nov 2019 13:30:18 -0500	[thread overview]
Message-ID: <1574706618.4793.218.camel@linux.ibm.com> (raw)
In-Reply-To: <5a43ec9d-af82-9a31-3546-76e8328ff213@linux.microsoft.com>

On Mon, 2019-11-25 at 10:23 -0800, Lakshmi Ramasubramanian wrote:
> On 11/21/19 9:14 AM, Lakshmi Ramasubramanian wrote:
> 
> Hi Mimi,
> 
> > process_buffer_measurement() needs to check if ima_policy_flag
> > is set to measure and\or appraise. Not doing this check can
> > result in kernel panic (such as when process_buffer_measurement()
> > is called before IMA is initialized).
> >  
> > This change adds the check in process_buffer_measurement()
> > to return immediately if ima_policy_flag is set to 0.
> > 
> > Signed-off-by: Lakshmi Ramasubramanian <nramas@linux.microsoft.com>
> > ---
> >   security/integrity/ima/ima_main.c | 3 +++
> >   1 file changed, 3 insertions(+)
> > 
> > diff --git a/security/integrity/ima/ima_main.c b/security/integrity/ima/ima_main.c
> > index 60027c643ecd..c9374430bb72 100644
> > --- a/security/integrity/ima/ima_main.c
> > +++ b/security/integrity/ima/ima_main.c
> > @@ -651,6 +651,9 @@ static void process_buffer_measurement(const void *buf, int size,
> >   	int pcr = CONFIG_IMA_MEASURE_PCR_IDX;
> >   	int action = 0;
> >   
> > +	if (!ima_policy_flag)
> > +		return;
> > +
> 
> Please let me know if the above change would be accepted as a standalone 
> patch (like the one in this patch),
> or, I should include this change as one of the patches in the "Key 
> Measurement" patch set?

As I'm not planning on sending a pull request this open window, so
that it doesn't get lost/forgotten, please include it as the first
patch in this patch set.

Mimi


  reply	other threads:[~2019-11-25 18:30 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-21 17:14 [PATCH v0] IMA: Check IMA policy flag Lakshmi Ramasubramanian
2019-11-25 18:23 ` Lakshmi Ramasubramanian
2019-11-25 18:30   ` Mimi Zohar [this message]
2019-11-27  2:09     ` Lakshmi Ramasubramanian

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=1574706618.4793.218.camel@linux.ibm.com \
    --to=zohar@linux.ibm.com \
    --cc=eric.snowberg@oracle.com \
    --cc=linux-integrity@vger.kernel.org \
    --cc=nramas@linux.microsoft.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).