patch 'crypto/cnxk: fix out-of-bounds access in SM2' has been queued to stable release 24.11.3
Kevin Traynor
ktraynor at redhat.com
Fri Jul 18 21:29:14 CEST 2025
Hi,
FYI, your patch has been queued to stable release 24.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 07/23/25. 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/e9e52ecc9f1cf0c27eca9c190609da46098a53bf
Thanks.
Kevin
---
>From e9e52ecc9f1cf0c27eca9c190609da46098a53bf Mon Sep 17 00:00:00 2001
From: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Date: Thu, 15 May 2025 13:35:25 +0530
Subject: [PATCH] crypto/cnxk: fix out-of-bounds access in SM2
[ upstream commit cfefc94a8c155aceb2da519b6b34a01b5caa65e3 ]
Fix coverity issue on out-of-bounds access.
Coverity issue: 403166, 403171, 403172
Fixes: 5686b573e4bb ("crypto/cnxk: support SM2")
Signed-off-by: Gowrishankar Muthukrishnan <gmuthukrishn at marvell.com>
Acked-by: Akhil Goyal <gakhil at marvell.com>
---
drivers/crypto/cnxk/cnxk_ae.h | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/drivers/crypto/cnxk/cnxk_ae.h b/drivers/crypto/cnxk/cnxk_ae.h
index 82dce507bd..8508ab8736 100644
--- a/drivers/crypto/cnxk/cnxk_ae.h
+++ b/drivers/crypto/cnxk/cnxk_ae.h
@@ -1091,4 +1091,7 @@ cnxk_ae_sm2_sign_prep(struct rte_crypto_sm2_op_param *sm2,
order_len = ROC_AE_EC_DATA_MAX;
+ if (pkey_len > ROC_AE_EC_DATA_MAX)
+ pkey_len = ROC_AE_EC_DATA_MAX;
+
/* Truncate input length to curve prime length */
if (message_len > prime_len)
@@ -1182,4 +1185,10 @@ cnxk_ae_sm2_verify_prep(struct rte_crypto_sm2_op_param *sm2,
order_len = ROC_AE_EC_DATA_MAX;
+ if (qx_len > ROC_AE_EC_DATA_MAX)
+ qx_len = ROC_AE_EC_DATA_MAX;
+
+ if (qy_len > ROC_AE_EC_DATA_MAX)
+ qy_len = ROC_AE_EC_DATA_MAX;
+
/* Truncate input length to curve prime length */
if (message_len > prime_len)
--
2.50.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2025-07-18 20:29:11.786900891 +0100
+++ 0020-crypto-cnxk-fix-out-of-bounds-access-in-SM2.patch 2025-07-18 20:29:10.823907003 +0100
@@ -1 +1 @@
-From cfefc94a8c155aceb2da519b6b34a01b5caa65e3 Mon Sep 17 00:00:00 2001
+From e9e52ecc9f1cf0c27eca9c190609da46098a53bf Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit cfefc94a8c155aceb2da519b6b34a01b5caa65e3 ]
+
@@ -10 +11,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list