Re: [PATCH v2] nvmet: synchronize DH-CHAP secret removal

From: Keith Busch

Date: Mon Nov 16 2026 - 10:17:14 EST


On Tue, 10 Nov 2026 08:15:59 +0000, Sreeraj S Kurup wrote:
> 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.
>
> [...]

Thanks, applied to nvme-7.4.

[1/1] nvmet: synchronize DH-CHAP secret removal
commit: 706076f51eb78ebb4cc7fb06751bf09042fb515c
--
Keith Busch <kbusch@xxxxxxxxxx>