All of lore.kernel.org
 help / color / mirror / Atom feed
From: Petr Vorel <pvorel@suse.cz>
To: Mimi Zohar <zohar@linux.vnet.ibm.com>
Cc: James Morris <jmorris@namei.org>,
	linux-integrity@vger.kernel.org,
	Dmitry Kasatkin <dmitry.kasatkin@gmail.com>
Subject: Re: [PATCH] ima: Avoid using not initialized IMA
Date: Tue, 20 Mar 2018 09:40:26 +0100	[thread overview]
Message-ID: <20180320084026.tugrsi73qjxxkjig@dell5510> (raw)
In-Reply-To: <1521490800.3503.202.camel@linux.vnet.ibm.com>

Hi Mimi,

> > OK, I have v2 which use CONFIG_IMA_DEFAULT_HASH, I'll post it tomorrow.
> > But I'd also keep this patch as well, this check doesn't harm and IMHO you can never be
> > sure it does not fail.

> Adding a new measurement gap is not an acceptable solution.  Either an
> ima_init() failure causes the kernel to panic, or we force IMA to use
> the default builtin Kconfig hash algorithm.

Thank you for a clarification. I posted new patch which forces using default hash in case
of error and using different algorithm.

I don't know whether even this (third) attempt (to use default hash) can fail, but in case
it can, how do you prefer to handle this situation? If you really prefer kernel panic
(e.g. don't like previous patch fixing at least ima_post_path_mknod()), I suggest removing
ima_initialized as it's unused and confusing.

> Mimi


Kind regards,
Petr

      reply	other threads:[~2018-03-20  8:40 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-16 23:28 [PATCH] ima: Avoid using not initialized IMA Petr Vorel
2018-03-18  1:27 ` Mimi Zohar
2018-03-19  4:43   ` James Morris
2018-03-19 10:59     ` Mimi Zohar
2018-03-19 20:05       ` Petr Vorel
2018-03-19 20:20         ` Mimi Zohar
2018-03-20  8:40           ` Petr Vorel [this message]

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=20180320084026.tugrsi73qjxxkjig@dell5510 \
    --to=pvorel@suse.cz \
    --cc=dmitry.kasatkin@gmail.com \
    --cc=jmorris@namei.org \
    --cc=linux-integrity@vger.kernel.org \
    --cc=zohar@linux.vnet.ibm.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.