scsi: iscsi: Fix conn use after free during resets
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 660d0831d1494a6837b2f810d08b5be092c1f31d · < ec29d0ac29be366450a7faffbcf8cba3a6a3b506| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: iscsi: Fix conn use after free during resets
If we haven't done a unbind target call we can race where iscsi_conn_teardown wakes up the EH thread and then frees the conn while those threads are still accessing the conn ehwait.
We can only do one TMF per session so this just moves the TMF fields from the conn to the session. We can then rely on the iscsi_session_teardown->iscsi_remove_session->__iscsi_unbind_session call to remove the target and it's devices, and know after that point there is no device or scsi-ml callout trying to access the session.
From the CVE record · Linux
The Linux kernel’s iSCSI code has a use-after-free race during resets if a target has not been unbound. Connection teardown can free a connection while error-handling threads still access it. The input does not specify how an attacker could trigger the race or whether network access, authentication, or user interaction is required.
Engineers running Linux kernels with iSCSI support should check their versions; affected versions are not specified in the input.