[PATCH] nvme: auth: validate DHCHAP secret before stopping authentication
Hannes Reinecke
hare at suse.de
Mon Sep 21 06:49:57 PDT 2026
On 9/17/26 10:04 AM, Sreeraj S Kurup wrote:
> The driver currently calls nvme_auth_stop() before checking if the new
> secret key is valid. If a bad key is passed through sysfs, the key
> parser fails and exits early.
>
> Since nvme_auth_stop() was already called, the current authentication
> session gets stopped. However, because the parser failed, the work
> thread is never restarted. This leaves the NVMe controller stuck in a
> stopped state until someone writes a valid key.
>
Are you sure?
All what 'nvme_auth_stop()' does is stopping a currently running
authentication. And if someone writes an invalid key it certainly
was his intention to _start_ authentication.
I find it kinda weird to allow an pre-existing authentication to
run while the admin indicates that he wants to start a new one.
So not really sure if this fixes anything.
Cheers,
Hannes
--
Dr. Hannes Reinecke Kernel Storage Architect
hare at suse.de +49 911 74053 688
SUSE Software Solutions GmbH, Frankenstr. 146, 90461 Nürnberg
HRB 36809 (AG Nürnberg), GF: I. Totev, A. McDonald, W. Knoblich
More information about the Linux-nvme
mailing list