scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
Linux
Affected versions
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
Linux
| Product | Affected | Fixed in |
|---|---|---|
| Linux Linux |
|
≥ 6eb045e092efefafc6687409a6fa6d1dabf0fb69 · < 4373534a9850627a2695317944898eb1283a2db0| No fix yet |
| Linux Linux |
|
|
In the Linux kernel, the following vulnerability has been resolved:
scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
Inside scsi_eh_wakeup(), scsi_host_busy() is called & checked with host lock every time for deciding if error handler kthread needs to be waken up.
This can be too heavy in case of recovery, such as:
- N hardware queues
- queue depth is M for each hardware queue
- each scsi_host_busy() iterates over (N * M) tag/requests
If recovery is triggered in case that all requests are in-flight, each scsi_eh_wakeup() is strictly serialized, when scsi_eh_wakeup() is called for the last in-flight request, scsi_host_busy() has been run for (N * M - 1) times, and request has been iterated for (N*M - 1) * (N * M) times.
From the CVE record · Linux
The Linux kernel SCSI core can trigger a hard lockup during error recovery when hardware queue counts and queue depths are large. This was observed with mpi3mr using 128 hardware queues and a queue depth of 8169; the input does not describe an attacker path, authentication requirement, or user interaction.
Engineers running Linux kernel SCSI hosts should check their installations; affected versions are not specified.