[PATCH] nvmet: synchronize DH-CHAP secret removal

sashiko-bot at kernel.org sashiko-bot at kernel.org
Tue Nov 10 00:05:14 PST 2026


Thank you for your contribution! Sashiko AI review found 1 potential
issue to consider:
- [Low] nvmet: missing Fixes trailer for nvmet_auth_set_key() secret
  clearing fix
--

commit e2778d1ca53fb43c219da377cd2d67684a67c943
Author: Sreeraj S Kurup <sreekuttan2156239 at gmail.com>

> nvmet: synchronize DH-CHAP secret removal
>
> The empty-secret path in nvmet_auth_set_key() modifies and frees
> host authentication secrets without holding nvmet_config_sem.
>
> nvmet_setup_auth() accesses these fields under the read lock,
> allowing concurrent secret removal to cause a use-after-free.
>
> Acquire nvmet_config_sem for writing while clearing the secrets
> to synchronize with authentication setup.
>
> Signed-off-by: Sreeraj S Kurup <sreekuttan2156239 at gmail.com>

[Severity: Low]
Since this fixes the unlocked empty-secret path added to
nvmet_auth_set_key(), should this include:

  Fixes: bb2df18958b4 ("nvmet-auth: allow to clear DH-HMAC-CHAP keys")

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261110075733.2578-1-sreekuttan2156239@gmail.com?part=1



More information about the Linux-nvme mailing list