]> git.ipfire.org Git - thirdparty/kernel/stable.git/commit
scsi: ufs: bsg: Set bsg_queue to NULL after removal
authorGuixin Liu <kanie@linux.alibaba.com>
Wed, 18 Dec 2024 01:42:14 +0000 (09:42 +0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 21 Feb 2025 12:49:59 +0000 (13:49 +0100)
commit5e7b6e44468c3242c21c2a8656d009fb3eb50a73
treeb1a595d2cd32ec323f05068ab5d62e6f4f1ab1c3
parente86cc66b106d8b0b775b0e740100fb9baf4c4865
scsi: ufs: bsg: Set bsg_queue to NULL after removal

[ Upstream commit 1e95c798d8a7f70965f0f88d4657b682ff0ec75f ]

Currently, this does not cause any issues, but I believe it is necessary to
set bsg_queue to NULL after removing it to prevent potential use-after-free
(UAF) access.

Signed-off-by: Guixin Liu <kanie@linux.alibaba.com>
Link: https://lore.kernel.org/r/20241218014214.64533-3-kanie@linux.alibaba.com
Reviewed-by: Avri Altman <avri.altman@wdc.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/ufs/core/ufs_bsg.c