Patch "EVM: Use crypto_memneq() for digest comparisons" has been added to the 4.3-stable tree
Subsystems (4)
This is a note to let you know that I've just added the patch titled
EVM: Use crypto_memneq() for digest comparisons
to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary
The filename of the patch is:
evm-use-crypto_memneq-for-digest-comparisons.patch
and it can be found in the queue-4.3 subdirectory.
If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.
Quoted 1 line
From
613317bd212c585c20796c10afe5daaa95d4b0a1Mon Sep 17 00:00:00 2001
From: Ryan Ware <[email protected]>
Date: Thu, 11 Feb 2016 15:58:44 -0800
Subject: EVM: Use crypto_memneq() for digest comparisons
From: Ryan Ware <[email protected]>
commit 613317bd212c585c20796c10afe5daaa95d4b0a1 upstream.
This patch fixes vulnerability CVE-2016-2085. The problem exists because the vm_verify_hmac() function includes a use of memcmp(). Unfortunately, this allows timing side channel attacks; specifically a MAC forgery complexity drop from 2^128 to 2^12. This patch changes the memcmp() to the cryptographically safe crypto_memneq().
--- security/integrity/evm/evm_main.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
security/integrity/evm/evm_main.c +2 -1
@@ -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_ 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 ;
Patches currently in stable-queue which might be from [email protected] are
queue-4.3/evm-use-crypto_memneq-for-digest-comparisons.patch