5.5medium
scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler
- Severity
- 5.5medium CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.24% (higher than 16% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
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. If both N and M are big enough, hard lockup can be triggered on acquiring host lock, and it is observed on mpi3mr(128 hw queues, queue depth 8169). Fix the issue by calling scsi_host_busy() outside the host lock. We don't need the host lock for getting busy count because host the lock never covers that. [mkp: Drop unnecessary 'busy' variables pointed out by Bart]
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before f5944853f7a961fedc1227dc8f60393f8936d37c, from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before d37c1c81419fdef66ebd0747cf76fb8b7d979059, from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before db6338f45971b4285ea368432a84033690eaf53c, from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before 65ead8468c21c2676d4d06f50b46beffdea69df1, from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before 07e3ca0f17f579491b5f54e9ed05173d6c1d6fcb, from 6eb045e092efefafc6687409a6fa6d1dabf0fb69 before 4373534a9850627a2695317944898eb1283a2db0, 5.5 Not affected: before 5.5, from 5.10.210 up to 5.10.*, from 5.15.149 up to 5.15.*, from 6.1.77 up to 6.1.*, from 6.6.16 up to 6.6.*, from 6.7.4 up to 6.7.* | CVE List |
| linux linux_kernel | from 5.5 before 5.10.210, from 5.11 before 5.15.149, from 5.16 before 6.1.77, from 6.2 before 6.6.16, from 6.7 before 6.7.4, 6.8 | NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact partial.
What each source says
CVE List
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. If both N and M are big enough, hard lockup can be triggered on acquiring host lock, and it is observed on mpi3mr(128 hw queues, queue depth 8169). Fix the issue by calling scsi_host_busy() outside the host lock. We don't need the host lock for getting busy count because host the lock never covers that. [mkp: Drop unnecessary 'busy' variables pointed out by Bart]
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: scsi: core: Saque scsi_host_busy() del bloqueo del host para activar el controlador EH Dentro de scsi_eh_wakeup(), se llama a scsi_host_busy() y se verifica con el bloqueo del host cada vez para decidir si se produce un error. Es necesario activar el controlador kthread. Esto puede ser demasiado pesado en caso de recuperación, como por ejemplo: - N colas de hardware - la profundidad de la cola es M para cada cola de hardware - cada scsi_host_busy() itera sobre (N * M) etiquetas/solicitudes Si la recuperación se activa en caso de que todas las solicitudes están en curso, cada scsi_eh_wakeup() está estrictamente serializado, cuando se llama a scsi_eh_wakeup() para la última solicitud en curso, scsi_host_busy() se ha ejecutado (N * M - 1) veces y la solicitud se ha iterado durante ( N*M - 1) * (N * M) veces. Si tanto N como M son lo suficientemente grandes, se puede activar un bloqueo duro al adquirir el bloqueo del host, y se observa en mpi3mr (128 colas hw, profundidad de cola 8169). Solucione el problema llamando a scsi_host_busy() fuera del bloqueo del host. No necesitamos el bloqueo del host para obtener el recuento de ocupación porque el bloqueo del host nunca cubre eso. [mkp: elimine las variables 'ocupadas' innecesarias señaladas por Bart]
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2024-26627 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2024-26627 changed 2026-06-17 | Public domain |