DPDK patches and discussions
 help / color / mirror / Atom feed
* [DPDK/cryptodev Bug 1773] Crypto devices should be using constant time memcmp
@ 2025-08-19  1:33 bugzilla
  0 siblings, 0 replies; only message in thread
From: bugzilla @ 2025-08-19  1:33 UTC (permalink / raw)
  To: dev

[-- Attachment #1: Type: text/plain, Size: 2540 bytes --]

https://bugs.dpdk.org/show_bug.cgi?id=1773

            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) != 0)
ipsec_mb/pmd_aesni_gcm.c:       return memcmp(digest, tmpdigest,
s->req_digest_length) == 0 ? 0
ipsec_mb/pmd_aesni_mb.c:        if (memcmp(job->auth_tag_output, crc,
RTE_ETHER_CRC_LEN) != 0)
ipsec_mb/pmd_aesni_mb.c:        if (memcmp(job->auth_tag_output, digest, len)
!= 0)
ipsec_mb/pmd_aesni_mb.c:                        if (memcmp(vec->digest[i].va,
dgst[i], len) != 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 <= 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,

-- 
You are receiving this mail because:
You are the assignee for the bug.

[-- Attachment #2: Type: text/html, Size: 4511 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2025-08-19  1:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-08-19  1:33 [DPDK/cryptodev Bug 1773] Crypto devices should be using constant time memcmp bugzilla

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).