android_kernel_oneplus_msm8998/security/integrity/evm
Ryan Ware 8592536bcf EVM: Use crypto_memneq() for digest comparisons
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().

Reported-by: Xiaofei Rex Guo <xiaofei.rex.guo@intel.com>
Signed-off-by: Ryan Ware <ware@linux.intel.com>
Signed-off-by: Mimi Zohar <zohar@linux.vnet.ibm.com>
Signed-off-by: James Morris <james.l.morris@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-02-17 12:31:04 -08:00
..
evm.h evm: replace HMAC version with attribute mask 2014-06-12 17:58:06 -04:00
evm_crypto.c KEYS: Merge the type-specific data with the payload data 2015-10-21 15:18:36 +01:00
evm_main.c EVM: Use crypto_memneq() for digest comparisons 2016-02-17 12:31:04 -08:00
evm_posix_acl.c ima: fix script messages 2013-10-25 13:17:19 -04:00
evm_secfs.c security: integrity: Use a more current logging style 2014-03-07 12:15:21 -05:00
Kconfig kconfig: use bool instead of boolean for type definition attributes 2015-01-07 13:08:04 +01:00
Makefile