[EXTERNAL] [PATCH] cryptodev: reset resource pointers in init error path

Akhil Goyal gakhil at marvell.com
Tue Jun 2 21:27:20 CEST 2026


> cryptodev_cb_init() may free partially allocated resources on failure,
> but does not reset their pointers afterwards.
> 
> A later call to cryptodev_cb_cleanup() may then attempt to release both
> resources even when one of them has already been freed, because the
> cleanup logic does not rely on both pointers being valid independently.
> 
> Set freed pointers to NULL in the cryptodev_cb_init() error path to
> make subsequent cleanup safe.
> 
> Found by Linux Verification Center (linuxtesting.org) with SVACE.
> 
> Fixes: 1c3ffb95595e ("cryptodev: add enqueue and dequeue callbacks")
> Cc: stable at dpdk.org
> 
> Signed-off-by: Daniil Agalakov <ade at amicon.ru>
> Signed-off-by: Daniil Iskhakov <dish at amicon.ru>
Applied to dpdk-next-crypto
Thanks.


More information about the dev mailing list