crypto: talitos - Fix timing leak in ESP ICV verification

commit 79960943fd upstream.

Using non-constant time memcmp() makes the verification of the authentication
tag in the decrypt path vulnerable to timing attacks. Fix this by using
crypto_memneq() instead.

Signed-off-by: David Gstir <david@sigma-star.at>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[ luis: backported to 3.16: adjusted context ]
Signed-off-by: Luis Henriques <luis.henriques@canonical.com>
This commit is contained in:
David Gstir 2015-11-15 17:14:42 +01:00 • committed by Luis Henriques
commit 20422a4883