patch 'crypto/uadk: use timing-safe digest comparison' has been queued to stable release 25.11.3
Kevin Traynor
ktraynor at redhat.com
Thu Jul 30 11:16:40 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/04/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/1248b5128c68aeac35878cdd41ae11396f3d4a4d
Thanks.
Kevin
---
>From 1248b5128c68aeac35878cdd41ae11396f3d4a4d Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 29 Jun 2026 11:59:25 -0700
Subject: [PATCH] crypto/uadk: use timing-safe digest comparison
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 8051903e5727a85897fd83f19a591bb3b743c5d4 ]
Digest verification used memcmp() to compare the computed and
expected MAC. memcmp() returns as soon as the first differing byte
is found, so its run time depends on how many leading bytes match.
An attacker submitting forged digests can use that timing signal to
recover the correct value one byte at a time.
Use rte_memeq_timingsafe(), whose run time depends only on the
length, for the verify comparison.
Bugzilla ID: 1773
Fixes: aba5b230ca04 ("crypto/uadk: use async mode")
Reported-by: Siraj Luthfi Ananda <sirajluthfi at gmail.com>
Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
Acked-by: Morten Brørup <mb at smartsharesystems.com>
---
.mailmap | 1 +
drivers/crypto/uadk/uadk_crypto_pmd.c | 4 ++--
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/.mailmap b/.mailmap
index bc54e58586..b84214567d 100644
--- a/.mailmap
+++ b/.mailmap
@@ -1546,4 +1546,5 @@ Simon Kuenzer <simon.kuenzer at neclab.eu>
Sinan Kaya <okaya at kernel.org>
Siobhan Butler <siobhan.a.butler at intel.com>
+Siraj Luthfi Ananda <sirajluthfi at gmail.com>
Sirshak Das <sirshak.das at arm.com>
Sivaprasad Tummala <sivaprasad.tummala at amd.com> <sivaprasad.tummala at intel.com>
diff --git a/drivers/crypto/uadk/uadk_crypto_pmd.c b/drivers/crypto/uadk/uadk_crypto_pmd.c
index 3c4e83e56f..221ad546da 100644
--- a/drivers/crypto/uadk/uadk_crypto_pmd.c
+++ b/drivers/crypto/uadk/uadk_crypto_pmd.c
@@ -1112,6 +1112,6 @@ uadk_crypto_dequeue_burst(void *queue_pair, struct rte_crypto_op **ops,
uint8_t *dst = qp->temp_digest[i % BURST_MAX];
- if (memcmp(dst, op->sym->auth.digest.data,
- sess->auth.digest_length) != 0)
+ if (!rte_memeq_timingsafe(dst, op->sym->auth.digest.data,
+ sess->auth.digest_length))
op->status = RTE_CRYPTO_OP_STATUS_AUTH_FAILED;
}
--
2.55.0
---
Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- - 2026-07-30 10:16:03.233113859 +0100
+++ 0061-crypto-uadk-use-timing-safe-digest-comparison.patch 2026-07-30 10:16:01.491971496 +0100
@@ -1 +1 @@
-From 8051903e5727a85897fd83f19a591bb3b743c5d4 Mon Sep 17 00:00:00 2001
+From 1248b5128c68aeac35878cdd41ae11396f3d4a4d Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 8051903e5727a85897fd83f19a591bb3b743c5d4 ]
+
@@ -20 +21,0 @@
-Cc: stable at dpdk.org
@@ -31 +32 @@
-index 0e57de0afe..e85a38c560 100644
+index bc54e58586..b84214567d 100644
@@ -34 +35 @@
-@@ -1565,4 +1565,5 @@ Simon Kuenzer <simon.kuenzer at neclab.eu>
+@@ -1546,4 +1546,5 @@ Simon Kuenzer <simon.kuenzer at neclab.eu>
More information about the stable
mailing list