aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_nego.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2015-07-22 00:24:09 -0700
committerNicholas Bellinger <nab@linux-iscsi.org>2015-07-24 14:19:43 -0700
commit417c20a9bdd1e876384127cf096d8ae8b559066c (patch)
treedc8c04ab25bf7d0d987f3fdb228fd361ed8e2364 /drivers/target/iscsi/iscsi_target_nego.c
parentqla2xxx: terminate exchange when command is aborted by LIO (diff)
downloadlinux-dev-417c20a9bdd1e876384127cf096d8ae8b559066c.tar.xz
linux-dev-417c20a9bdd1e876384127cf096d8ae8b559066c.zip
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>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_nego.c')
0 files changed, 0 insertions, 0 deletions