mirror of
https://github.com/torvalds/linux.git
synced 2026-05-26 16:12:59 +02:00
nvme-fabrics: use kfree_sensitive() for DHCHAP secrets
The DHCHAP secrets (dhchap_secret and dhchap_ctrl_secret) contain authentication key material for NVMe-oF. Use kfree_sensitive() instead of kfree() in nvmf_free_options() to ensure secrets are zeroed before the memory is freed, preventing recovery from freed pages. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Daniel Hodges <hodgesd@meta.com> Signed-off-by: Keith Busch <kbusch@kernel.org>
This commit is contained in:
parent
ac30cd3043
commit
0a1fc2f301
|
|
@ -1290,8 +1290,8 @@ void nvmf_free_options(struct nvmf_ctrl_options *opts)
|
|||
kfree(opts->subsysnqn);
|
||||
kfree(opts->host_traddr);
|
||||
kfree(opts->host_iface);
|
||||
kfree(opts->dhchap_secret);
|
||||
kfree(opts->dhchap_ctrl_secret);
|
||||
kfree_sensitive(opts->dhchap_secret);
|
||||
kfree_sensitive(opts->dhchap_ctrl_secret);
|
||||
kfree(opts);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(nvmf_free_options);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user