scsi: core: wake eh reliably when using scsi_schedule_eh
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6eb045e092efefafc6687409a6fa6d1dabf0fb69 · < dccf3b1798b70f94e958b3d00b83010399e6fb05| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: wake eh reliably when using scsi_schedule_eh
Drivers which use the scsi_schedule_eh function to run the error handler currently risk the error handler thread never waking once all commands are timed out or inactive. There is no enforced memory order between setting the host into error recovery state and counting busy commands. This can result in a race with scsi_dec_host_busy where neither CPU sees both conditions of all commands inactive and the host error state to request waking the error handler.
To fix this, run the scsi_schedule_eh's scsi_eh_wakeup from a new work item which will use rcu to ensure scsi_schedule_eh's call to scsi_host_busy will occur after the error state is globally visible and will be seen by any current scsi_dec_host_busy callers.
From the CVE record · Linux
Linux kernel SCSI drivers that use scsi_schedule_eh can encounter a race that prevents the error-handler thread from waking after all commands time out or become inactive. The input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernels with SCSI drivers that use scsi_schedule_eh should check their exposure; affected versions are not specified.