android_kernel_motorola_sm6375/drivers/nvme
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Damien Le Moal 04c3942088 nvmet: avoid potential UAF in nvmet_req_complete()
[ Upstream commit 6173a77b7e9d3e202bdb9897b23f2a8afe7bf286 ]

An nvme target ->queue_response() operation implementation may free the
request passed as argument. Such implementation potentially could result
in a use after free of the request pointer when percpu_ref_put() is
called in nvmet_req_complete().

Avoid such problem by using a local variable to save the sq pointer
before calling __nvmet_req_complete(), thus avoiding dereferencing the
req pointer after that function call.

Fixes: a07b4970f4 ("nvmet: add a generic NVMe target")
Signed-off-by: Damien Le Moal <damien.lemoal@opensource.wdc.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2023-03-22 13:28:06 +01:00
..
host nvme-pci: Move enumeration by class to be last in the table 2023-02-22 12:50:33 +01:00
target nvmet: avoid potential UAF in nvmet_req_complete() 2023-03-22 13:28:06 +01:00
Kconfig
Makefile