linux/drivers/crypto/talitos.c
David Gstir 20422a4883 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>
2016-01-05 11:22:18 +00:00

2827 lines
79 KiB