summaryrefslogtreecommitdiff
path: root/include/net/aligned_data.h
diff options
context:
space:
mode:
authorMaurizio Lombardi <mlombard@redhat.com>2026-01-12 17:53:52 +0100
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-02-11 13:40:23 +0100
commit41b86a9ec037bd3435d68dd3692f0891a207e7e7 (patch)
tree176874cb1d6010eaa99f46bc45035f8567cdbde0 /include/net/aligned_data.h
parent30f1507376d6e5b3bf0a7dba281d37d6d21d2985 (diff)
scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count()
[ Upstream commit 84dc6037390b8607c5551047d3970336cb51ba9a ] In iscsit_dec_session_usage_count(), the function calls complete() while holding the sess->session_usage_lock. Similar to the connection usage count logic, the waiter signaled by complete() (e.g., in the session release path) may wake up and free the iscsit_session structure immediately. This creates a race condition where the current thread may attempt to execute spin_unlock_bh() on a session structure that has already been deallocated, resulting in a KASAN slab-use-after-free. To resolve this, release the session_usage_lock before calling complete() to ensure all dereferences of the sess pointer are finished before the waiter is allowed to proceed with deallocation. Signed-off-by: Maurizio Lombardi <mlombard@redhat.com> Reported-by: Zhaojuan Guo <zguo@redhat.com> Reviewed-by: Mike Christie <michael.christie@oracle.com> Link: https://patch.msgid.link/20260112165352.138606-3-mlombard@redhat.com Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/net/aligned_data.h')
0 files changed, 0 insertions, 0 deletions