scsi: target: Fix multiple LUN_RESET handling
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 51ec502a32665fed66c7f03799ede4023b212536 · < 673db054d7a2b5a470d7a25baf65956d005ad729| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: target: Fix multiple LUN_RESET handling
This fixes a bug where an initiator thinks a LUN_RESET has cleaned up running commands when it hasn't. The bug was added in commit 51ec502a3266 ("target: Delete tmr from list before processing").
The problem occurs when:
1. We have N I/O cmds running in the target layer spread over 2 sessions.
2. The initiator sends a LUN_RESET for each session.
3. session1's LUN_RESET loops over all the running commands from both sessions and moves them to its local drain_task_list.
4. session2's LUN_RESET does not see the LUN_RESET from session1 because the commit above has it remove itself. session2 also does not see any commands since the other reset moved them off the state lists.
From the CVE record · Linux
The Linux kernel SCSI target can mishandle LUN_RESET requests across two sessions when commands are running in both. If an initiator sends a reset for each session, one reset can report success before its commands are cleaned up, leading to invalid task-tag errors or an incorrect task lookup. The input does not specify authentication requirements or user interaction.
Engineers running Linux kernels with the SCSI target should check their systems; affected versions are not specified.