Commit df8c2723 authored by Linus Torvalds's avatar Linus Torvalds
Browse files

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
parents 27c9d772 613317bd
...@@ -23,6 +23,7 @@ ...@@ -23,6 +23,7 @@
#include <linux/integrity.h> #include <linux/integrity.h>
#include <linux/evm.h> #include <linux/evm.h>
#include <crypto/hash.h> #include <crypto/hash.h>
#include <crypto/algapi.h>
#include "evm.h" #include "evm.h"
int evm_initialized; int evm_initialized;
...@@ -148,7 +149,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry, ...@@ -148,7 +149,7 @@ static enum integrity_status evm_verify_hmac(struct dentry *dentry,
xattr_value_len, calc.digest); xattr_value_len, calc.digest);
if (rc) if (rc)
break; break;
rc = memcmp(xattr_data->digest, calc.digest, rc = crypto_memneq(xattr_data->digest, calc.digest,
sizeof(calc.digest)); sizeof(calc.digest));
if (rc) if (rc)
rc = -EINVAL; rc = -EINVAL;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment