android_kernel_motorola_sm6375/security/integrity
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Roberto Sassu 89e51f2ab8 ima: Allow template selection with ima_template[_fmt]= after ima_hash=
commit bb8e52e4906f148c2faf6656b5106cf7233e9301 upstream.

Commit c2426d2ad5 ("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.

Reported-by: Guo Zihua <guozihua@huawei.com>
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Cc: stable@vger.kernel.org
Fixes: c2426d2ad5 ("ima: added support for new kernel cmdline parameter ima_template_fmt")
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-02-16 12:52:47 +01:00
..
evm evm: mark evm_fixmode as __ro_after_init 2021-11-17 09:48:23 +01:00
ima ima: Allow template selection with ima_template[_fmt]= after ima_hash= 2022-02-16 12:52:47 +01:00
platform_certs x86/efi: remove unused variables 2021-07-07 08:22:58 -04:00
digsig.c
digsig_asymmetric.c
iint.c
integrity.h
integrity_audit.c integrity: check the return value of audit_log_start() 2022-02-16 12:52:47 +01:00
Kconfig
Makefile