diff options
author | Roberto Sassu <roberto.sassu@huawei.com> | 2019-05-29 15:30:33 +0200 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2019-06-09 09:17:21 +0200 |
commit | 6e322a9e42cd9099121e786b326bc840ac28b5e0 (patch) | |
tree | fde986192f954b1cce5374bd18dc70029aaa519f /scripts/gcc-plugins/gcc-common.h | |
parent | f85b87a9a2a8bdd2eee28a378a7124d775800122 (diff) |
evm: check hash algorithm passed to init_desc()
commit 221be106d75c1b511973301542f47d6000d0b63e upstream.
This patch prevents memory access beyond the evm_tfm array by checking the
validity of the index (hash algorithm) passed to init_desc(). The hash
algorithm can be arbitrarily set if the security.ima xattr type is not
EVM_XATTR_HMAC.
Fixes: 5feeb61183dde ("evm: Allow non-SHA1 digital signatures")
Signed-off-by: Roberto Sassu <roberto.sassu@huawei.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.ibm.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'scripts/gcc-plugins/gcc-common.h')
0 files changed, 0 insertions, 0 deletions