scsi: target: iscsi: Fix use-after-free in iscsit_dec_conn_usage_count()
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ e48354ce078c079996f89d715dfa44814b4eba01 · < 3835e49e146a4e6e7787b29465f1a23379b6ec44| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: iscsi: Fix use-after-free in iscsit_dec_conn_usage_count()
In iscsit_dec_conn_usage_count(), the function calls complete() while holding the conn->conn_usage_lock. As soon as complete() is invoked, the waiter (such as iscsit_close_connection()) may wake up and proceed to free the iscsit_conn structure.
If the waiter frees the memory before the current thread reaches spin_unlock_bh(), it results in a KASAN slab-use-after-free as the function attempts to release a lock within the already-freed connection structure.
Fix this by releasing the spinlock before calling complete().
From the CVE record · Linux
A race in the Linux kernel’s iSCSI target can cause a use-after-free when a connection is freed before its usage lock is released. An attacker who can trigger the race could cause this memory error; the input does not specify network or local access requirements, authentication requirements, or user interaction.
Operators running the Linux kernel should check their installations; affected versions are not specified.