linux/security/integrity
Boshi Wang 7c503475ae ima: fix hash algorithm initialization
[ Upstream commit ebe7c0a7be ]

The hash_setup function always sets the hash_setup_done flag, even
when the hash algorithm is invalid.  This prevents the default hash
algorithm defined as CONFIG_IMA_DEFAULT_HASH from being used.

This patch sets hash_setup_done flag only for valid hash algorithms.

Fixes: e7a2ad7eb6 "ima: enable support for larger default filedata hash algorithms"
Signed-off-by: Boshi Wang <wangboshi@huawei.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: Sasha Levin <alexander.levin@verizon.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
History 2017-12-10 13:40:38 +01:00
..
evm fs: switch ->s_uuid to uuid_t 2017-06-05 16:59:12 +02:00
ima ima: fix hash algorithm initialization 2017-12-10 13:40:38 +01:00
digsig.c KEYS: Use structure to capture key restriction function and data 2017-04-04 14:10:10 -07:00
digsig_asymmetric.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
iint.c integrity: Small code improvements 2017-06-21 14:37:12 -04:00
integrity.h integrity: Small code improvements 2017-06-21 14:37:12 -04: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 License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00