[PATCH 1/3] nvme-auth: Don't log shared secret in nvme_auth_dhchap_exponential()

Thorsten Blum thorsten.blum at linux.dev
Tue Mar 3 11:03:48 PST 2026


When debug logging is enabled, nvme_auth_dhchap_exponential() logs the
DHCHAP shared secret. Remove the log to avoid exposing key material.

Fixes: b61775d185a3 ("nvme-auth: Diffie-Hellman key exchange support")
Cc: stable at vger.kernel.org
Signed-off-by: Thorsten Blum <thorsten.blum at linux.dev>
---
 drivers/nvme/host/auth.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/nvme/host/auth.c b/drivers/nvme/host/auth.c
index 405e7c03b1cf..5e4df2ac3cc0 100644
--- a/drivers/nvme/host/auth.c
+++ b/drivers/nvme/host/auth.c
@@ -655,8 +655,6 @@ static int nvme_auth_dhchap_exponential(struct nvme_ctrl *ctrl,
 		chap->status = NVME_AUTH_DHCHAP_FAILURE_INCORRECT_PAYLOAD;
 		return ret;
 	}
-	dev_dbg(ctrl->device, "shared secret %*ph\n",
-		(int)chap->sess_key_len, chap->sess_key);
 	return 0;
 }
 
-- 
Thorsten Blum <thorsten.blum at linux.dev>
GPG: 1D60 735E 8AEF 3BE4 73B6  9D84 7336 78FD 8DFE EAD4




More information about the Linux-nvme mailing list