]> 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, 2 May 2025 05:44:23 +0000 (07:44 +0200)
commit22018622e1e9e371198dbd983af946a844d5924c
tree4bbf182bbe203b914360568c0858cf5b5ae2da23
parent6e9ed2f4721ea00f6333ccfe34b3ddaef4e62f39
scsi: ufs: bsg: Set bsg_queue to NULL after removal

commit 1e95c798d8a7f70965f0f88d4657b682ff0ec75f upstream.

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: Xiangyu Chen <xiangyu.chen@windriver.com>
Signed-off-by: He Zhe <zhe.he@windriver.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/scsi/ufs/ufs_bsg.c