patch 'crypto/armv8: validate xform auth key length' has been queued to stable release 25.11.5

Kevin Traynor ktraynor at redhat.com
Thu Dec 3 14:06:25 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.5

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

Thanks.

Kevin

---
>From 3e9ed8acfb049d49a8388141d165da77ea8ed107 Mon Sep 17 00:00:00 2001
From: Jack Bond-Preston <jack.bond-preston at foss.arm.com>
Date: Tue, 13 Oct 2026 14:35:59 +0100
Subject: [PATCH] crypto/armv8: validate xform auth key length

[ upstream commit 9cc535e8ef512708fcd5d976e0d03906cb603e98 ]

Validate that the provided rte_crypto_auth_xform's key length is not
too large, and that the provided data pointer is not NULL.

Previously, providing a key which has a size > SHA_BLOCK_MAX will cause
the key memcpy to write out of bounds. Since the rte_crypto_auth_xform
documentation states that it is the user's responsibility to validate
the authentication key length, this is not a bug in DPDK. However,
other PMDs are validating this, and it is more user-friendly to do so -
with negligible performance impact.

Fixes: 169ca3db550c ("crypto/armv8: add PMD optimized for ARMv8 processors")

Reported-by: Peng Peng <pengpeng at iscas.ac.cn>
Signed-off-by: Jack Bond-Preston <jack.bond-preston at foss.arm.com>
Reviewed-by: Wathsala Vithanage <wathsala.vithanage at arm.com>
---
 .mailmap                             | 1 +
 drivers/crypto/armv8/rte_armv8_pmd.c | 7 +++++++
 2 files changed, 8 insertions(+)

diff --git a/.mailmap b/.mailmap
index ffe78f2916..dbb03a9d0b 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1307,4 +1307,5 @@ Pei Zhang <pezhang at redhat.com>
 Peng He <hepeng.0320 at bytedance.com> <xnhp0320 at icloud.com>
 Peng Huang <peng.huang at intel.com>
+Peng Peng <pengpeng at iscas.ac.cn>
 Peng Sun <peng.a.sun at intel.com>
 Peng Yu <penyu at amazon.com>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index a7caac186d..f4ddfb6395 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -263,4 +263,11 @@ auth_set_prerequisites(struct armv8_crypto_session *sess,
 	int error;
 
+	/* Validate key */
+	if (xform->auth.key.data == NULL ||
+			xform->auth.key.length > SHA_BLOCK_MAX) {
+		ARMV8_CRYPTO_LOG_ERR("Invalid authentication key provided.");
+		return -1;
+	}
+
 	switch (xform->auth.algo) {
 	case RTE_CRYPTO_AUTH_SHA1_HMAC:
-- 
2.56.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2026-12-03 12:52:52.154048226 +0000
+++ 0459-crypto-armv8-validate-xform-auth-key-length.patch	2026-12-03 12:52:39.347938827 +0000
@@ -1 +1 @@
-From 9cc535e8ef512708fcd5d976e0d03906cb603e98 Mon Sep 17 00:00:00 2001
+From 3e9ed8acfb049d49a8388141d165da77ea8ed107 Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 9cc535e8ef512708fcd5d976e0d03906cb603e98 ]
+
@@ -17 +18,0 @@
-Cc: stable at dpdk.org
@@ -28 +29 @@
-index a7f57978ad..f844d41662 100644
+index ffe78f2916..dbb03a9d0b 100644
@@ -31 +32 @@
-@@ -1327,4 +1327,5 @@ Pei Zhang <pezhang at redhat.com>
+@@ -1307,4 +1307,5 @@ Pei Zhang <pezhang at redhat.com>
@@ -38 +39 @@
-index 582dbadbdd..b94f0b1ec3 100644
+index a7caac186d..f4ddfb6395 100644



More information about the stable mailing list