KernelScan.io

HIGH

iscsi target Session Usage UAF

CVE-2026-23193

CVSS 8.8 / 10.0 NVD

CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

KernelScan AI8.8HIGH

01

In the Linux kernel, the following vulnerability has been resolved: scsi: target: iscsi: Fix use-after-free in iscsit_dec_session_usage_count() 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.

02

Engine v0.2.0

Risk summary

A use-after-free vulnerability in the iSCSI target subsystem allows local attackers with appropriate privileges to potentially cause system crashes or execute arbitrary code. The vulnerability occurs during session cleanup when multiple threads race to access session structures, leading to memory corruption when one thread frees memory that another thread is still using.

Affecteddrivers/target/iscsi/iscsi_target_util.c

Vulnerability analysis

Root Cause: In iscsit_dec_session_usage_count(), the function calls complete() while still holding the sess->session_usage_lock spinlock. The waiter signaled by complete() (typically in the session release path) can immediately wake up and free the iscsit_session structure. This creates a race condition where the current thread attempts to execute spin_unlock_bh() on a session structure that has already been deallocated.

Attack Surface: This vulnerability affects iSCSI target implementations in the kernel. It requires local access with sufficient privileges to interact with iSCSI target sessions. The race condition occurs during session cleanup operations, making it exploitable when multiple threads are concurrently managing iSCSI session lifecycle operations.

Fix Mechanism: The fix reorders the operations to release the session_usage_lock before calling complete(). This ensures all dereferences of the sess pointer are finished before the waiter is allowed to proceed with deallocation. The fix adds an early return after complete() to avoid the subsequent spin_unlock_bh() call.

03

BranchFixed inPatch commit
5.105.10.2502b64015550a1
5.155.15.200fd8b09001733
6.16.1.163d8dbdc146e9e
6.126.12.7041b86a9ec037
6.186.18.104530f4e4d0e6
6.66.6.12411ebafffce31
mainline6.1984dc6037390b