scsi: target: iscsi: Fix hang for aborted WRITE_PENDING commands
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 2c9fa49e100f962af988f1c0529231bf14905cda · < f6f6351e98c77c27b51763ef52deb2efe4b46ac7| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: iscsi: Fix hang for aborted WRITE_PENDING commands
When a LUN_RESET aborts a WRITE command that is in the TRANSPORT_WRITE_PENDING state, the target core sets CMD_T_ABORTED and waits for the frontend to finish processing.
If the initiator subsequently sends the remaining dataout PDUs, __iscsit_check_dataout_hdr() catches the payload, stops the dataout timer if the sequence is final and finally dumps the data. However, the iSCSI target doesn't trigger the completion process for these aborted commands. Because of this, the abort path hangs indefinitely in target_put_cmd_and_wait(), leading to a deadlocked target worker thread.
Fix this by explicitly calling target_complete_cmd() when the final dataout PDU is received for an aborted WRITE command. target_complete_cmd() detects the CMD_T_ABORTED flag and cleanly routes the command into target_abort_work, allowing the abort completion to successfully unblock.
From the CVE record · Linux
The Linux kernel’s iSCSI target can hang a target worker thread when a LUN_RESET aborts a WRITE command that is waiting for data. If the initiator then sends the remaining data over the network, the abort can deadlock indefinitely. The input does not specify authentication requirements or any required user interaction.
Engineers running the Linux kernel with the iSCSI target should check their systems; affected versions are not specified.