diff options
author | Linus Torvalds | 2019-05-31 11:08:44 -0700 |
---|---|---|
committer | Linus Torvalds | 2019-05-31 11:08:44 -0700 |
commit | d266b3f5cac09434eb624af202f9a31307b34a88 (patch) | |
tree | d773c0a422644c9e1e91fc2d89db898e4b4e956a /security/integrity/evm | |
parent | 8164c5719b864da3bcfee97ad8af8cfd7ee5ad8c (diff) | |
parent | 8cdc23a3d9ec0944000ad43bad588e36afdc38cd (diff) |
Merge branch 'next-fixes-for-5.2-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity
Pull integrity subsystem fixes from Mimi Zohar:
"Four bug fixes, none 5.2-specific, all marked for stable.
The first two are related to the architecture specific IMA policy
support. The other two patches, one is related to EVM signatures,
based on additional hash algorithms, and the other is related to
displaying the IMA policy"
* 'next-fixes-for-5.2-rc' of git://git.kernel.org/pub/scm/linux/kernel/git/zohar/linux-integrity:
ima: show rules with IMA_INMASK correctly
evm: check hash algorithm passed to init_desc()
ima: fix wrong signed policy requirement when not appraising
x86/ima: Check EFI_RUNTIME_SERVICES before using
Diffstat (limited to 'security/integrity/evm')
-rw-r--r-- | security/integrity/evm/evm_crypto.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/security/integrity/evm/evm_crypto.c b/security/integrity/evm/evm_crypto.c index e11564eb645b..82a38e801ee4 100644 --- a/security/integrity/evm/evm_crypto.c +++ b/security/integrity/evm/evm_crypto.c @@ -89,6 +89,9 @@ static struct shash_desc *init_desc(char type, uint8_t hash_algo) tfm = &hmac_tfm; algo = evm_hmac; } else { + if (hash_algo >= HASH_ALGO__LAST) + return ERR_PTR(-EINVAL); + tfm = &evm_tfm[hash_algo]; algo = hash_algo_name[hash_algo]; } |