From mboxrd@z Thu Jan 1 00:00:00 1970
Return-Path:
Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124])
by inbox.dpdk.org (Postfix) with ESMTP id D790246D1A;
Tue, 19 Aug 2025 03:33:30 +0200 (CEST)
Received: from mails.dpdk.org (localhost [127.0.0.1])
by mails.dpdk.org (Postfix) with ESMTP id 6C88F40430;
Tue, 19 Aug 2025 03:33:30 +0200 (CEST)
Received: from inbox.dpdk.org (inbox.dpdk.org [95.142.172.178])
by mails.dpdk.org (Postfix) with ESMTP id 85BE6402E4
for ; Tue, 19 Aug 2025 03:33:29 +0200 (CEST)
Received: by inbox.dpdk.org (Postfix, from userid 33)
id 61E6746D5F; Tue, 19 Aug 2025 03:33:29 +0200 (CEST)
From: bugzilla@dpdk.org
To: dev@dpdk.org
Subject: [DPDK/cryptodev Bug 1773] Crypto devices should be using constant
time memcmp
Date: Tue, 19 Aug 2025 01:33:28 +0000
X-Bugzilla-Reason: AssignedTo
X-Bugzilla-Type: new
X-Bugzilla-Watch-Reason: None
X-Bugzilla-Product: DPDK
X-Bugzilla-Component: cryptodev
X-Bugzilla-Version: 25.07
X-Bugzilla-Keywords:
X-Bugzilla-Severity: normal
X-Bugzilla-Who: stephen@networkplumber.org
X-Bugzilla-Status: UNCONFIRMED
X-Bugzilla-Resolution:
X-Bugzilla-Priority: Normal
X-Bugzilla-Assigned-To: dev@dpdk.org
X-Bugzilla-Target-Milestone: ---
X-Bugzilla-Flags:
X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform
op_sys bug_status bug_severity priority component assigned_to reporter
target_milestone
Message-ID:
Content-Type: multipart/alternative; boundary=17555672090.8BbEda.44146
Content-Transfer-Encoding: 7bit
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
MIME-Version: 1.0
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: DPDK patches and discussions
List-Unsubscribe: ,
List-Archive:
List-Post:
List-Help:
List-Subscribe: ,
Errors-To: dev-bounces@dpdk.org
--17555672090.8BbEda.44146
Date: Tue, 19 Aug 2025 03:33:28 +0200
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
https://bugs.dpdk.org/show_bug.cgi?id=3D1773
Bug ID: 1773
Summary: Crypto devices should be using constant time memcmp
Product: DPDK
Version: 25.07
Hardware: All
OS: All
Status: UNCONFIRMED
Severity: normal
Priority: Normal
Component: cryptodev
Assignee: dev@dpdk.org
Reporter: stephen@networkplumber.org
Target Milestone: ---
To be resistant to timing attacks all cryptodev operations should be using a
version of memcmp that takes constant time.
There is no such function in std libc maybe make a new one?
Examples in current code base:
~/.../main/drivers/crypto $ git grep memcmp
armv8/rte_armv8_pmd.c: if (memcmp(adst, op->sym->auth.digest.data,
ccp/ccp_crypto.c: if (memcmp(dst, op->sym->auth.digest.data,
ccp/ccp_crypto.c: if (memcmp(addr + offset, digest_data,
cnxk/cnxk_ae.h: if (memcmp(rsa->sign.data, rsa->message.data,
cnxk/cnxk_se.h: if (memcmp(mac, gen_mac, mac_len))
ipsec_mb/pmd_aesni_gcm.c: if (memcmp(tag, digest,
session->req_digest_length) !=3D 0)
ipsec_mb/pmd_aesni_gcm.c: return memcmp(digest, tmpdigest,
s->req_digest_length) =3D=3D 0 ? 0
ipsec_mb/pmd_aesni_mb.c: if (memcmp(job->auth_tag_output, crc,
RTE_ETHER_CRC_LEN) !=3D 0)
ipsec_mb/pmd_aesni_mb.c: if (memcmp(job->auth_tag_output, digest, le=
n)
!=3D 0)
ipsec_mb/pmd_aesni_mb.c: if (memcmp(vec->digest[i].v=
a,
dgst[i], len) !=3D 0)
ipsec_mb/pmd_snow3g.c: if (memcmp(dst,
ops[i]->sym->auth.digest.data,
ipsec_mb/pmd_zuc.c: if (memcmp(dst[i],
ops[i]->sym->auth.digest.data,
mlx5/mlx5_crypto_dek.c: return memcmp(key, dek->data, xkey_len);
nitrox/nitrox_sym_reqmgr.c: if (!memcmp(ctx->salt, addr,
AES_GCM_SALT_SIZE))
octeontx/otx_cryptodev_ops.c: if (memcmp(rsa->sign.data,
rsa->message.data,
openssl/rte_openssl_pmd.c: if (CRYPTO_memcmp(dst,
op->sym->auth.digest.data,
openssl/rte_openssl_pmd.c: if (CRYPTO_memcmp(tmp,
op->rsa.message.data,
openssl/rte_openssl_pmd.c: if ((ret <=3D 0) || (CRYPTO_memcmp(=
tmp,
op->rsa.message.data,
scheduler/rte_cryptodev_scheduler.c: return
!memcmp(&sec_cap1->docsis, &sec_cap2->docsis,
uadk/uadk_crypto_pmd.c: if (memcmp(dst,
op->sym->auth.digest.data,
--=20
You are receiving this mail because:
You are the assignee for the bug.=
--17555672090.8BbEda.44146
Date: Tue, 19 Aug 2025 03:33:29 +0200
MIME-Version: 1.0
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable
X-Bugzilla-URL: https://bugs.dpdk.org/
Auto-Submitted: auto-generated
X-Auto-Response-Suppress: All
Crypto devices should be using constant time memcmp
Product
DPDK
Version
25.07
Hardware
All
OS
All
Status
UNCONFIRMED
Severity
normal
Priority
Normal
Component
cryptodev
Assignee
dev@dpdk.org
Reporter
stephen@networkplumber.org
Target Milestone
---
To be resistant to timing attacks =
all cryptodev operations should be using a
version of memcmp that takes constant time.
There is no such function in std libc maybe make a new one?
Examples in current code base:
~/.../main/drivers/crypto $ git grep memcmp
armv8/rte_armv8_pmd.c: if (memcmp(adst, op->sym->auth.digest=
.data,
ccp/ccp_crypto.c: if (memcmp(dst, op->sym->auth.digest.=
data,
ccp/ccp_crypto.c: if (memcmp(addr + offset, digest_data,
cnxk/cnxk_ae.h: if (memcmp(rsa->sign.data, rsa->message.data,
cnxk/cnxk_se.h: if (memcmp(mac, gen_mac, mac_len))
ipsec_mb/pmd_aesni_gcm.c: if (memcmp(tag, digest,
session->req_digest_length) !=3D 0)
ipsec_mb/pmd_aesni_gcm.c: return memcmp(digest, tmpdigest,
s->req_digest_length) =3D=3D 0 ? 0
ipsec_mb/pmd_aesni_mb.c: if (memcmp(job->auth_tag_output, crc,
RTE_ETHER_CRC_LEN) !=3D 0)
ipsec_mb/pmd_aesni_mb.c: if (memcmp(job->auth_tag_output, digest,=
len)
!=3D 0)
ipsec_mb/pmd_aesni_mb.c: if (memcmp(vec->digest[i=
].va,
dgst[i], len) !=3D 0)
ipsec_mb/pmd_snow3g.c: if (memcmp(dst,
ops[i]->sym->auth.digest.data,
ipsec_mb/pmd_zuc.c: if (memcmp(dst[i],
ops[i]->sym->auth.digest.data,
mlx5/mlx5_crypto_dek.c: return memcmp(key, dek->data, xkey_len);
nitrox/nitrox_sym_reqmgr.c: if (!memcmp(ctx->salt, addr,
AES_GCM_SALT_SIZE))
octeontx/otx_cryptodev_ops.c: if (memcmp(rsa->sign.data,
rsa->message.data,
openssl/rte_openssl_pmd.c: if (CRYPTO_memcmp(dst,
op->sym->auth.digest.data,
openssl/rte_openssl_pmd.c: if (CRYPTO_memcmp(tmp,
op->rsa.message.data,
openssl/rte_openssl_pmd.c: if ((ret <=3D 0) || (CRYPTO_memc=
mp(tmp,
op->rsa.message.data,
scheduler/rte_cryptodev_scheduler.c: return
!memcmp(&sec_cap1->docsis, &sec_cap2->docsis,
uadk/uadk_crypto_pmd.c: if (memcmp(dst,
op->sym->auth.digest.data,