On 9/16/24 19:41, Vitaliy Shevtsov wrote:
ctrl->dh_key might be used across multiple calls to nvmet_setup_dhgroup() for the same controller. So it's better to nullify it after release on error path in order to avoid double free later in nvmet_destroy_auth().
Found by Linux Verification Center (linuxtesting.org) with Svace.
Fixes: 7a277c37d352 ("nvmet-auth: Diffie-Hellman key exchange support") Cc: stable@vger.kernel.org Signed-off-by: Vitaliy Shevtsov v.shevtsov@maxima.ru
drivers/nvme/target/auth.c | 1 + 1 file changed, 1 insertion(+)
Now that is obviously correct.
Reviewed-by: Hannes Reinecke hare@suse.de
Cheers,
Hannes