patch 'crypto/armv8: validate xform auth key length' has been queued to stable release 24.11.9
luca.boccassi at gmail.com
luca.boccassi at gmail.com
Fri Nov 20 21:29:35 CET 2026
Hi,
FYI, your patch has been queued to stable release 24.11.9
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 11/22/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/a52ab440c73bd997d4e0241e3201aa2f1bd71be0
Thanks.
Luca Boccassi
---
>From a52ab440c73bd997d4e0241e3201aa2f1bd71be0 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 3ad1fc1950..2f5cd955ce 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1259,6 +1259,7 @@ Pei Zhang <pezhang at redhat.com>
Pengfei Sun <sunpengfei16 at huawei.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>
Peng Zhang <peng.zhang at corigine.com> <peng1x.zhang at intel.com>
diff --git a/drivers/crypto/armv8/rte_armv8_pmd.c b/drivers/crypto/armv8/rte_armv8_pmd.c
index 320e2d4b3b..c9764dadae 100644
--- a/drivers/crypto/armv8/rte_armv8_pmd.c
+++ b/drivers/crypto/armv8/rte_armv8_pmd.c
@@ -262,6 +262,13 @@ auth_set_prerequisites(struct armv8_crypto_session *sess,
uint8_t partial[64] = { 0 };
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.47.3
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-11-20 20:29:05.451212753 +0000
+++ 0006-crypto-armv8-validate-xform-auth-key-length.patch 2026-11-20 20:29:05.188110955 +0000
@@ -1 +1 @@
-From 9cc535e8ef512708fcd5d976e0d03906cb603e98 Mon Sep 17 00:00:00 2001
+From a52ab440c73bd997d4e0241e3201aa2f1bd71be0 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 3ad1fc1950..2f5cd955ce 100644
@@ -31,2 +32,2 @@
-@@ -1326,6 +1326,7 @@ Pei Chao <peichao85 at gmail.com>
- Pei Zhang <pezhang at redhat.com>
+@@ -1259,6 +1259,7 @@ Pei Zhang <pezhang at redhat.com>
+ Pengfei Sun <sunpengfei16 at huawei.com>
@@ -40 +41 @@
-index 582dbadbdd..b94f0b1ec3 100644
+index 320e2d4b3b..c9764dadae 100644
More information about the stable
mailing list