crypto: talitos - Fix timing leak in ESP ICV verification
authorDavid Gstir <[email protected]>
Sun, 15 Nov 2015 16:14:42 +0000 (17:14 +0100)
committerHerbert Xu <[email protected]>
Mon, 16 Nov 2015 13:39:24 +0000 (21:39 +0800)
commit79960943fdc114fd4583c9ab164b5c89da7aa601
treeeee34426e869bbc88d47c233f490808dc38ffa02
parentcb8affb55c7e64816f3effcd9b2fc3268c016fac
crypto: talitos - Fix timing leak in ESP ICV verification

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.

Cc: [email protected]
Signed-off-by: David Gstir <[email protected]>
Signed-off-by: Herbert Xu <[email protected]>
drivers/crypto/talitos.c