patch 'crypto/ccp: 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:41 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/1e17519329c795bf911f0dfb82d4aaf4cbc2bfc0
Thanks.
Kevin
---
>From 1e17519329c795bf911f0dfb82d4aaf4cbc2bfc0 Mon Sep 17 00:00:00 2001
From: Stephen Hemminger <stephen at networkplumber.org>
Date: Mon, 29 Jun 2026 11:59:26 -0700
Subject: [PATCH] crypto/ccp: use timing-safe digest comparison
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
[ upstream commit 752589fb4562066cca8fd1955851f1527e75b0a2 ]
Both the CPU HMAC verify path and the offload digest verify path
compared the computed and expected MAC with memcmp(), which short
circuits on the first mismatching byte and leaks the number of
matching leading bytes through timing.
Use rte_memeq_timingsafe() for both verify comparisons.
Bugzilla ID: 1773
Fixes: 6c561b03b54c ("crypto/ccp: support CPU based MD5 and SHA2 family")
Fixes: 70f0f8a8d78c ("crypto/ccp: support burst enqueue/dequeue")
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>
---
drivers/crypto/ccp/ccp_crypto.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/drivers/crypto/ccp/ccp_crypto.c b/drivers/crypto/ccp/ccp_crypto.c
index 5899d83bae..b07a786d8e 100644
--- a/drivers/crypto/ccp/ccp_crypto.c
+++ b/drivers/crypto/ccp/ccp_crypto.c
@@ -1491,6 +1491,6 @@ static int cpu_crypto_auth(struct ccp_qp *qp,
if (sess->auth.op == CCP_AUTH_OP_VERIFY) {
- 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;
} else {
@@ -2802,6 +2802,6 @@ static inline void ccp_auth_dq_prepare(struct rte_crypto_op *op)
op->status = RTE_CRYPTO_OP_STATUS_SUCCESS;
if (session->auth.op == CCP_AUTH_OP_VERIFY) {
- if (memcmp(addr + offset, digest_data,
- session->auth.digest_length) != 0)
+ if (!rte_memeq_timingsafe(addr + offset, digest_data,
+ session->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.260234490 +0100
+++ 0062-crypto-ccp-use-timing-safe-digest-comparison.patch 2026-07-30 10:16:01.492734265 +0100
@@ -1 +1 @@
-From 752589fb4562066cca8fd1955851f1527e75b0a2 Mon Sep 17 00:00:00 2001
+From 1e17519329c795bf911f0dfb82d4aaf4cbc2bfc0 Mon Sep 17 00:00:00 2001
@@ -8,0 +9,2 @@
+[ upstream commit 752589fb4562066cca8fd1955851f1527e75b0a2 ]
+
@@ -19 +20,0 @@
-Cc: stable at dpdk.org
More information about the stable
mailing list