commit | 221be106d75c1b511973301542f47d6000d0b63e | [log] [tgz] |
---|---|---|
author | Roberto Sassu <roberto.sassu@huawei.com> | Wed May 29 15:30:33 2019 +0200 |
committer | Mimi Zohar <zohar@linux.ibm.com> | Wed May 29 23:18:25 2019 -0400 |
tree | 18f8246e67943de8fc8f5d9ebe2fcb927b8ed391 | |
parent | f40019475bbbe9b455e7fd4385fcf13896c492ca [diff] |
evm: check hash algorithm passed to init_desc() 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>