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

luca.boccassi at gmail.com luca.boccassi at gmail.com
Mon Jul 6 12:20:20 CEST 2026


Hi,

FYI, your patch has been queued to stable release 24.11.7

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/05/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/bluca/dpdk-stable

This queued commit can be viewed at:
https://github.com/bluca/dpdk-stable/commit/3ded3ba6e87dd55837696c941baf6d65acf70b12

Thanks.

Luca Boccassi

---
>From 3ded3ba6e87dd55837696c941baf6d65acf70b12 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 8918c73d79..132110ceed 100644
--- a/drivers/crypto/cnxk/cnxk_se.h
+++ b/drivers/crypto/cnxk/cnxk_se.h
@@ -2281,9 +2281,14 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
 		return -1;
 	}
 
-	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.47.3

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-07-03 12:55:47.768999066 +0100
+++ 0028-crypto-cnxk-enforce-DES-3DES-cipher-key-length.patch	2026-07-03 12:55:46.638573143 +0100
@@ -1 +1 @@
-From 308ca49764d47514dd0d0ec30bda03797b9bfe14 Mon Sep 17 00:00:00 2001
+From 3ded3ba6e87dd55837696c941baf6d65acf70b12 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 8918c73d79..132110ceed 100644
@@ -23 +24 @@
-@@ -2377,9 +2377,14 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)
+@@ -2281,9 +2281,14 @@ fill_sess_cipher(struct rte_crypto_sym_xform *xform, struct cnxk_se_sess *sess)


More information about the stable mailing list