android_kernel_sony_sdm845/security/integrity
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Roberto Sassu d8d4da8a96 ima: Fix return value of ima_write_policy()
[ Upstream commit 2e3a34e9f409ebe83d1af7cd2f49fca7af97dfac ]

This patch fixes the return value of ima_write_policy() when a new policy
is directly passed to IMA and the current policy requires appraisal of the
file containing the policy. Currently, if appraisal is not in ENFORCE mode,
ima_write_policy() returns 0 and leads user space applications to an
endless loop. Fix this issue by denying the operation regardless of the
appraisal mode.

Cc: stable@vger.kernel.org # 4.10.x
Fixes: 19f8a84713 ("ima: measure and appraise the IMA policy itself")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Reviewed-by: Krzysztof Struczynski <krzysztof.struczynski@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2020-05-27 16:41:40 +02:00
..
evm evm: Check also if *tfm is an error pointer in init_desc() 2020-05-27 16:41:39 +02:00
ima ima: Fix return value of ima_write_policy() 2020-05-27 16:41:40 +02:00
digsig.c integrity/security: fix digsig.c build error with header file 2018-05-30 07:50:30 +02:00
digsig_asymmetric.c X.509: Make algo identifiers text instead of enum 2016-03-03 21:49:27 +00:00
iint.c ima: re-initialize iint->atomic_flags 2018-12-01 09:44:26 +01:00
integrity.h ima: re-introduce own integrity cache lock 2018-12-01 09:44:26 +01:00
integrity_audit.c Merge git://git.infradead.org/users/eparis/audit 2014-04-12 12:38:53 -07:00
Kconfig security: integrity: Remove select to deleted option PUBLIC_KEY_ALGO_RSA 2016-04-12 19:54:58 +01:00
Makefile integrity: make integrity files as 'integrity' module 2014-09-09 10:28:58 -04:00