remarkable-linux/drivers/target
Nicholas Bellinger 417c20a9bd iscsi-target: Fix use-after-free during TPG session shutdown
This patch fixes a use-after-free bug in iscsit_release_sessions_for_tpg()
where se_portal_group->session_lock was incorrectly released/re-acquired
while walking the active se_portal_group->tpg_sess_list.

The can result in a NULL pointer dereference when iscsit_close_session()
shutdown happens in the normal path asynchronously to this code, causing
a bogus dereference of an already freed list entry to occur.

To address this bug, walk the session list checking for the same state
as before, but move entries to a local list to avoid dropping the lock
while walking the active list.

As before, signal using iscsi_session->session_restatement=1 for those
list entries to be released locally by iscsit_free_session() code.

Reported-by: Sunilkumar Nadumuttlu <sjn@datera.io>
Cc: Sunilkumar Nadumuttlu <sjn@datera.io>
Cc: <stable@vger.kernel.org> # v3.1+
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
2015-07-24 14:19:43 -07:00
..
iscsi iscsi-target: Fix use-after-free during TPG session shutdown 2015-07-24 14:19:43 -07:00
loopback target: use 64-bit LUNs 2015-06-15 23:26:01 -07:00
sbp Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
tcm_fc Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
Kconfig
Makefile
target_core_alua.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_alua.h target: Subsume se_port + t10_alua_tg_pt_gp_member into se_lun 2015-06-01 00:26:38 -07:00
target_core_configfs.c target/configfs: handle match_int() errors 2015-07-23 23:41:22 -07:00
target_core_device.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_fabric_configfs.c target: remove target_core_configfs.h 2015-06-23 00:43:51 -07:00
target_core_fabric_lib.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_file.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_file.h
target_core_hba.c target: simplify backend driver registration 2015-06-01 00:25:34 -07:00
target_core_iblock.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_iblock.h
target_core_internal.h target: remove target_core_configfs.h 2015-06-23 00:43:51 -07:00
target_core_pr.c target/pr: Fix possible uninitialized variable usage 2015-07-06 17:07:30 -07:00
target_core_pr.h target: use 64-bit LUNs 2015-06-15 23:26:01 -07:00
target_core_pscsi.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_pscsi.h SCSI misc on 20150622 2015-06-23 15:55:44 -07:00
target_core_rd.c target/rd: Set ramdisk as non rotational device 2015-07-06 18:07:19 -07:00
target_core_rd.h
target_core_sbc.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_spc.c target: Add extra TYPE_DISK + protection checks for INQUIRY SPT 2015-07-06 18:07:17 -07:00
target_core_stat.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_tmr.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_tpg.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_transport.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_ua.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_ua.h target: Send UA when changing LUN inventory 2015-06-23 00:43:02 -07:00
target_core_user.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_xcopy.c Merge branch 'for-next' of git://git.kernel.org/pub/scm/linux/kernel/git/nab/target-pending 2015-07-04 14:13:43 -07:00
target_core_xcopy.h