]> www.infradead.org Git - users/jedix/linux-maple.git/commit
EVM: Use crypto_memneq() for digest comparisons
authorRyan Ware <ware@linux.intel.com>
Thu, 11 Feb 2016 23:58:44 +0000 (15:58 -0800)
committerChuck Anderson <chuck.anderson@oracle.com>
Thu, 26 May 2016 22:45:03 +0000 (15:45 -0700)
commit99e5410861834fa9758dccf0260aef82a5d4012d
treeaf19d8cc5608094e1d37b4883b805191f393d886
parent3a3126715efc5c59b6038fe503490c9d1d166ecf
EVM: Use crypto_memneq() for digest comparisons

Orabug: 23330860

[ Upstream commit 613317bd212c585c20796c10afe5daaa95d4b0a1 ]

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().

Reported-by: Xiaofei Rex Guo <xiaofei.rex.guo@intel.com>
Signed-off-by: Ryan Ware <ware@linux.intel.com>
Cc: stable@vger.kernel.org
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Sasha Levin <sasha.levin@oracle.com>
(cherry picked from commit d185fa457006e98aa975ed6c0e7d2ddfe3d26695)

Signed-off-by: Dan Duval <dan.duval@oracle.com>
security/integrity/evm/evm_main.c