patch 'crypto/cnxk: enforce DES/3DES cipher key length' has been queued to stable release 25.11.3

Kevin Traynor ktraynor at redhat.com
Tue Jul 28 17:56:32 CEST 2026


Hi,

FYI, your patch has been queued to stable release 25.11.3

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 08/01/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/7582e66c79ada585b57ce8c69b5ef635e89b4c93

Thanks.

Kevin

---
>From 7582e66c79ada585b57ce8c69b5ef635e89b4c93 Mon Sep 17 00:00:00 2001
From: Aarnav JP <ajp at marvell.com>
Date: Mon, 15 Jun 2026 21:54:45 +0530
Subject: [PATCH] crypto/cnxk: enforce DES/3DES cipher key length

[ upstream commit 308ca49764d47514dd0d0ec30bda03797b9bfe14 ]

Enforce exact key length match for DES/3DES algorithms
in fill_sess_cipher(), since these have fixed key sizes
(8 or 24 bytes). The existing check only enforced a lower
bound, allowing oversized keys to pass through.

Fixes: eb43e39851b8 ("crypto/cnxk: add cipher operation in session")

Signed-off-by: Aarnav JP <ajp at marvell.com>
---
 drivers/crypto/cnxk/cnxk_se.h | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/drivers/crypto/cnxk/cnxk_se.h b/drivers/crypto/cnxk/cnxk_se.h
index 08e251787d..080539e7f1 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -2365,7 +2365,12 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
 	}
 
-	if (c_form->key.length < cipher_key_len) {
-		plt_dp_err("Invalid cipher params keylen %u",
-			   c_form->key.length);
+	if (enc_type == ROC_SE_DES3_CBC || enc_type == ROC_SE_DES3_ECB ||
+	    enc_type == ROC_SE_DES_DOCSISBPI) {
+		if (c_form->key.length != cipher_key_len) {
+			plt_dp_err("Invalid cipher params keylen %u", c_form->key.length);
+			return -1;
+		}
+	} else if (c_form->key.length < cipher_key_len) {
+		plt_dp_err("Invalid cipher params keylen %u", c_form->key.length);
 		return -1;
 	}
-- 
2.55.0

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-28 16:54:52.601820232 +0100
+++ 0062-crypto-cnxk-enforce-DES-3DES-cipher-key-length.patch	2026-07-28 16:54:50.810728829 +0100
@@ -1 +1 @@
-From 308ca49764d47514dd0d0ec30bda03797b9bfe14 Mon Sep 17 00:00:00 2001
+From 7582e66c79ada585b57ce8c69b5ef635e89b4c93 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 308ca49764d47514dd0d0ec30bda03797b9bfe14 ]
+
@@ -12 +13,0 @@
-Cc: stable at dpdk.org
@@ -20 +21 @@
-index 09d9d1e0e3..fdf2fd1504 100644
+index 08e251787d..080539e7f1 100644
@@ -23 +24 @@
-@@ -2378,7 +2378,12 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
+@@ -2365,7 +2365,12 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)



More information about the stable mailing list