Skip to contentSkip to conversation

Patch "crypto: talitos - Fix timing leak in ESP ICV verification" has been added to the 4.3-stable tree

PATCH [email protected] 1 participant 1 message Feb 2, 2016

Subsystems (2)
lore
Share & tools
lore

[email protected]

author maintainer Applied
#0 lore raw

This is a note to let you know that I've just added the patch titled

crypto: talitos - Fix timing leak in ESP ICV verification

to the 4.3-stable tree which can be found at:
http://www.kernel.org/git/?p=linux/kernel/git/stable/stable-queue.git;a=summary

The filename of the patch is:
crypto-talitos-fix-timing-leak-in-esp-icv-verification.patch
and it can be found in the queue-4.3 subdirectory.

If you, or anyone else, feels it should not be added to the stable tree, please let <[email protected]> know about it.

Quoted 1 line

From 79960943fdc114fd4583c9ab164b5c89da7aa601 Mon Sep 17 00:00:00 2001

From: David Gstir <[email protected]>
Date: Sun, 15 Nov 2015 17:14:42 +0100
Subject: crypto: talitos - Fix timing leak in ESP ICV verification

From: David Gstir <[email protected]>

commit 79960943fdc114fd4583c9ab164b5c89da7aa601 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.

---
 drivers/crypto/talitos.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/crypto/talitos.c +1 -1
@@ -1015,7 +1015,7 @@ static void ipsec_esp_decrypt_swauth_don
 		} else
 			oicv = (char *)&edesc->link_tbl[0];
 
-		err = memcmp(oicv, icv, authsize) ? -EBADMSG : 0;
+		err = crypto_memneq(oicv, icv, authsize) ? -EBADMSG : 0;
 	}
 
 	kfree(edesc);

Patches currently in stable-queue which might be from [email protected] are

queue-4.3/crypto-nx-fix-timing-leak-in-gcm-and-ccm-decryption.patch queue-4.3/crypto-talitos-fix-timing-leak-in-esp-icv-verification.patch