[PATCH v7 13/14] nvme-auth: link pre-provisioned keys into .nvme keyring
Martin Belanger
martin.nvme.dev at gmail.com
Thu Nov 26 08:49:40 PST 2026
On 11/26/26 09:30, sashiko-bot at kernel.org wrote:
> [Severity: High]
> Does nvme_keyring_unlink() remove a pre-provisioned key that originally
> lived in the .nvme keyring or is shared across multiple controllers?
Hi Hannes,
I can confirm this one with a test. nvme-keysd adds the dhchap keys to
the .nvme keyring. After the first disconnect, or a failed connect,
the keys are gone from the keyring, and the next connect fails.
I think the kernel should not add keys to a keyring or remove them.
A pre-provisioned key is either in the keyring or it is not. If it is
not, the connect fails, and it is up to the user or the key manager to
fix that. While a controller uses the key, the reference it holds
(ctrl->host_key) keeps the key alive. So I do not think
nvme_keyring_link() and nvme_keyring_unlink() are needed for
pre-provisioned keys.
Otherwise the design works for nvme-keysd: each authentication reads
the key again, so a key the key manager updates in place reaches the
next authentication.
I will re-run the test on v8.
Thanks,
Martin
More information about the Linux-nvme
mailing list