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
This commit is contained in:
Коммит
df8c2723a1
|
@ -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;
|
||||
|
|
Загрузка…
Ссылка в новой задаче