diff options
| author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-07-22 00:24:09 -0700 |
|---|---|---|
| committer | Moyster <oysterized@gmail.com> | 2016-08-26 19:58:52 +0200 |
| commit | bc8db37df72f04b71e25c2f5932592865fb7685a (patch) | |
| tree | 8fa0cc36e539b4125e81f97b3d686cb532fb042b /scripts/kernel-doc | |
| parent | 14d3c6e3dc9253d263be993f001974c0749e5271 (diff) | |
iscsi-target: Fix use-after-free during TPG session shutdown
commit 417c20a9bdd1e876384127cf096d8ae8b559066c upstream.
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>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Stefan Guendhoer <stefan@guendhoer.com>
Diffstat (limited to 'scripts/kernel-doc')
0 files changed, 0 insertions, 0 deletions
