summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2016-02-12 17:24:48 (GMT)
committerLinus Torvalds <torvalds@linux-foundation.org>2016-02-12 17:24:48 (GMT)
commitdf8c2723a1eb568d42ebca806bec17377ae7e84c (patch)
tree03701b18ce9b8b78e60cb91707829df1548c4cf1
parent27c9d772e50731dfd682b4ea9459eccec2071c49 (diff)
parent613317bd212c585c20796c10afe5daaa95d4b0a1 (diff)
downloadlinux-df8c2723a1eb568d42ebca806bec17377ae7e84c.tar.xz
Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security
Pull crypto fix from James Morris. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jmorris/linux-security: EVM: Use crypto_memneq() for digest comparisons
-rw-r--r--security/integrity/evm/evm_main.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/security/integrity/evm/evm_main.c b/security/integrity/evm/evm_main.c
index f716025..e6ea9d4 100644
--- a/security/integrity/evm/evm_main.c
+++ b/security/integrity/evm/evm_main.c
@@ -23,6 +23,7 @@
#include <linux/integrity.h>
#include <linux/evm.h>
#include <crypto/hash.h>
+#include <crypto/algapi.h>
#include "evm.h"
int evm_initialized;
@@ -148,7 +149,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,
xattr_value_len, calc.digest);
if (rc)
break;
- rc = memcmp(xattr_data->digest, calc.digest,
+ rc = crypto_memneq(xattr_data->digest, calc.digest,
sizeof(calc.digest));
if (rc)
rc = -EINVAL;