TencentOS-kernel/security/integrity/ima
Roberto Sassu 200b416020 ima: Don't ignore errors from crypto_shash_update()
commit 60386b854008adc951c470067f90a2d85b5d520f upstream.

Errors returned by crypto_shash_update() are not checked in
ima_calc_boot_aggregate_tfm() and thus can be overwritten at the next
iteration of the loop. This patch adds a check after calling
crypto_shash_update() and returns immediately if the result is not zero.

Cc: stable@vger.kernel.org
Fixes: 3323eec921efd ("integrity: IMA as an integrity service provider")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2021-03-16 16:38:21 +08:00
..
Kconfig ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime 2021-03-16 16:33:11 +08:00
Makefile Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima.h ima: Have the LSM free its audit rule 2021-03-16 16:33:35 +08:00
ima_api.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_appraise.c ima: move APPRAISE_BOOTPARAM dependency on ARCH_POLICY to runtime 2021-03-16 16:33:11 +08:00
ima_crypto.c ima: Don't ignore errors from crypto_shash_update() 2021-03-16 16:38:21 +08:00
ima_fs.c ima: Fix return value of ima_write_policy() 2021-03-16 16:28:06 +08:00
ima_init.c ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init() 2021-03-16 16:29:41 +08:00
ima_kexec.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_main.c ima: Evaluate error in init_ima() 2021-03-16 16:29:41 +08:00
ima_modsig.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_mok.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_policy.c ima: Have the LSM free its audit rule 2021-03-16 16:33:35 +08:00
ima_queue.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_template.c Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00
ima_template_lib.c ima: Call ima_calc_boot_aggregate() in ima_eventdigest_init() 2021-03-16 16:29:41 +08:00
ima_template_lib.h Init Repo base on linux 5.4.32 long term, and add base tlinux kernel interfaces. 2021-03-16 11:01:34 +08:00