Re: [PATCH] scsi: elx: libefc: potential use after free in efc_nport_vport_del()
From: Martin K. Petersen
Date: Thu Aug 22 2024 - 21:09:29 EST
Dan,
> The kref_put() function will call nport->release if the refcount drops
> to zero. The nport->release release function is _efc_nport_free()
> which frees "nport". But then we dereference "nport" on the next line
> which is a use after free. Re-order these lines to avoid the use after
> free.
Applied to 6.12/scsi-staging, thanks!
--
Martin K. Petersen Oracle Linux Engineering