diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-31 20:08:44 +0200 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2019-05-31 20:08:44 +0200 |
commit | d266b3f5cac09434eb624af202f9a31307b34a88 (patch) | |
tree | d773c0a422644c9e1e91fc2d89db898e4b4e956a /security/integrity/evm | |
parent | Merge tag 'for-linus-5.2b-rc3-tag' of git://git.kernel.org/pub/scm/linux/kern... (diff) | |
parent | ima: show rules with IMA_INMASK correctly (diff) | |
download | linux-d266b3f5cac09434eb624af202f9a31307b34a88.tar.xz linux-d266b3f5cac09434eb624af202f9a31307b34a88.zip |
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]; } |