EVM: Use crypto_memneq() for digest comparisons
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 <email@example.com>
Signed-off-by: Ryan Ware <firstname.lastname@example.org>
Signed-off-by: Mimi Zohar <email@example.com>
Signed-off-by: James Morris <firstname.lastname@example.org>
1 file changed