From: Mimi Zohar <zohar@linux.ibm.com>
To: Roberto Sassu <roberto.sassu@huawei.com>
Cc: linux-integrity@vger.kernel.org,
linux-security-module@vger.kernel.org,
linux-kernel@vger.kernel.org, guozihua@huawei.com,
stable@vger.kernel.org
Subject: Re: [PATCH] ima: Allow template selection with ima_template[_fmt]= after ima_hash=
Date: Mon, 31 Jan 2022 14:20:14 -0500 [thread overview]
Message-ID: <09c63b7bfb7e58702f7dcfc71a2e79b866ad9e7d.camel@linux.ibm.com> (raw)
In-Reply-To: <20220131171139.3024883-1-roberto.sassu@huawei.com>
On Mon, 2022-01-31 at 18:11 +0100, Roberto Sassu wrote:
> Commit c2426d2ad5027 ("ima: added support for new kernel cmdline parameter
> ima_template_fmt") introduced an additional check on the ima_template
> variable to avoid multiple template selection.
>
> Unfortunately, ima_template could be also set by the setup function of the
> ima_hash= parameter, when it calls ima_template_desc_current(). This causes
> attempts to choose a new template with ima_template= or with
> ima_template_fmt=, after ima_hash=, to be ignored.
>
> Achieve the goal of the commit mentioned with the new static variable
> template_setup_done, so that template selection requests after ima_hash=
> are not ignored.
>
> Finally, call ima_init_template_list(), if not already done, to initialize
> the list of templates before lookup_template_desc() is called.
>
> Cc: stable@vger.kernel.org
> Fixes: c2426d2ad5027 ("ima: added support for new kernel cmdline parameter ima_template_fmt")
> Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Thanks, Roberto.
Reviewed-by: Mimi Zohar <zohar@linux.ibm.com>
Mimi
prev parent reply other threads:[~2022-01-31 19:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-01-31 17:11 [PATCH] ima: Allow template selection with ima_template[_fmt]= after ima_hash= Roberto Sassu
2022-01-31 19:20 ` Mimi Zohar [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=09c63b7bfb7e58702f7dcfc71a2e79b866ad9e7d.camel@linux.ibm.com \
--to=zohar@linux.ibm.com \
--cc=guozihua@huawei.com \
--cc=linux-integrity@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=roberto.sassu@huawei.com \
--cc=stable@vger.kernel.org \
/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).