Skip to contentSkip to conversation

FAILED: patch "[PATCH] crypto: ccree - dec auth tag size from cryptlen map" failed to apply to 4.19-stable tree

PATCH [email protected] 3 participants 3 messages Apr 15, 2020 – Apr 16, 2020

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 8962c6d2c2b8ca51b0f188109015b15fc5f4da44 Mon Sep 17 00:00:00 2001
From: Gilad Ben-Yossef <[email protected]>
Date: Sun, 2 Feb 2020 18:19:14 +0200
Subject: [PATCH] crypto: ccree - dec auth tag size from cryptlen map

Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr tests.

drivers/crypto/ccree/cc_buffer_mgr.c +6 -2
index 885347b5b372..954f14bddf1d 100644
@@ -894,8 +894,12 @@ static int cc_aead_chain_data(struct cc_drvdata *drvdata,
 
 	if (req->src != req->dst) {
 		size_for_map = areq_ctx->assoclen + req->cryptlen;
-		size_for_map += (direct == DRV_CRYPTO_DIRECTION_ENCRYPT) ?
-				authsize : 0;
+
+		if (direct == DRV_CRYPTO_DIRECTION_ENCRYPT)
+			size_for_map += authsize;
+		else
+			size_for_map -= authsize;
+
 		if (is_gcm4543)
 			size_for_map += crypto_aead_ivsize(tfm);
 
maintainer
#1 lore raw
Quoted 21 lines · On Wed, Apr 15, 2020 at 01:07:27PM +0200, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 8962c6d2c2b8ca51b0f188109015b15fc5f4da44 Mon Sep 17 00:00:00 2001
From: Gilad Ben-Yossef <[email protected]>
Date: Sun, 2 Feb 2020 18:19:14 +0200
Subject: [PATCH] crypto: ccree - dec auth tag size from cryptlen map

Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr tests.

Quoted 5 lines

Grabbing:

da3cf67f1bcf ("crypto: ccree - don't mangle the request assoclen") 9f31eb6e08cc ("crypto: ccree - zero out internal struct before use") ccba2f1112d4 ("crypto: ccree - improve error handling")

resolved this conflict.

Signature · 2 lines
Thanks,
Sasha
maintainer Acked-by
#2 lore raw
Quoted 29 lines · Sasha Levin
Quoted 21 lines · On Wed, Apr 15, 2020 at 01:07:27PM +0200, [email protected] wrote:

The patch below does not apply to the 4.19-stable tree.
If someone wants it applied there, or to any other stable or longterm tree, then please email the backport, including the original git commit id to <[email protected]>.

thanks,

greg k-h

------------------ original commit in Linus's tree ------------------

From 8962c6d2c2b8ca51b0f188109015b15fc5f4da44 Mon Sep 17 00:00:00 2001
From: Gilad Ben-Yossef <[email protected]>
Date: Sun, 2 Feb 2020 18:19:14 +0200
Subject: [PATCH] crypto: ccree - dec auth tag size from cryptlen map

Remove the auth tag size from cryptlen before mapping the destination in out-of-place AEAD decryption thus resolving a crash with extended testmgr tests.

Quoted 5 lines
Quoted 10 lines

Grabbing:

da3cf67f1bcf ("crypto: ccree - don't mangle the request assoclen") 9f31eb6e08cc ("crypto: ccree - zero out internal struct before use") ccba2f1112d4 ("crypto: ccree - improve error handling")

resolved this conflict.

Thanks,
Gilad

Signature · 4 lines
Gilad Ben-Yossef
Chief Coffee Drinker

values of β will give rise to dom!