[PATCH v1 0/1] nvme-auth: constant-time DH-HMAC-CHAP response comparison

Xixin Liu liuxixin at kylinos.cn
Tue Jun 30 23:30:00 PDT 2026


DH-HMAC-CHAP compares HMAC digests during in-band authentication.  The
host and target paths currently use memcmp(), which may short-circuit on
the first differing byte and leak timing information to a remote party.

This series switches both security-sensitive comparisons to
crypto_memneq().  Non-secret memcmp() uses (fixed prefix strings, NGUID
checks) are unchanged.

Xixin Liu (1):
  nvme-auth: use crypto_memneq for DH-HMAC-CHAP response comparison

 drivers/nvme/host/auth.c               | 3 ++-
 drivers/nvme/target/fabrics-cmd-auth.c | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)
-- 
2.43.0




More information about the Linux-nvme mailing list