Skip to content
Heist/ feed
Back to feed
MediumFix available

scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler

Type: advisorySources: OSV

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]

Products
Kernel
Affected versions
Not specified
Fixed versions
5.10.210, 5.15.149, 6.1.77, 6.6.16, 6.7.4
CVEs
CVE-2024-26627
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 18:46 UTC · Revision 1

Source evidence

scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler

core-osv · Original source

Published 6 Mar 2024, 06:45 UTC

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]

osv:CVE-2024-26627

Kernel

Fixed versions: 5.10.210, 5.15.149, 6.1.77, 6.6.16, 6.7.4

Complete source record
{
  "id": "f8cffd7c8523864ca403327e1617ceab977971180129abfd6d350f22e205c9b0",
  "url": "https://osv.dev/vulnerability/CVE-2024-26627",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "scsi: core: Move scsi_host_busy() out of host lock for waking up EH handler",
    "summary": "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]",
    "evidence": "osv:CVE-2024-26627",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "5.10.210",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "5.15.149",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.1.77",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.6.16",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.7.4",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "medium",
    "structured": {
      "id": "CVE-2024-26627",
      "aliases": [
        "CVE-2024-26627"
      ],
      "metrics": [
        {
          "type": "CVSS_V3",
          "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H"
        }
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "6eb045e092efefafc6687409a6fa6d1dabf0fb69"
                },
                {
                  "fixed": "f5944853f7a961fedc1227dc8f60393f8936d37c"
                },
                {
                  "fixed": "d37c1c81419fdef66ebd0747cf76fb8b7d979059"
                },
                {
                  "fixed": "db6338f45971b4285ea368432a84033690eaf53c"
                },
                {
                  "fixed": "65ead8468c21c2676d4d06f50b46beffdea69df1"
                },
                {
                  "fixed": "07e3ca0f17f579491b5f54e9ed05173d6c1d6fcb"
                },
                {
                  "fixed": "4373534a9850627a2695317944898eb1283a2db0"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26627.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.5.0"
                },
                {
                  "fixed": "5.10.210"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.11.0"
                },
                {
                  "fixed": "5.15.149"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "5.16.0"
                },
                {
                  "fixed": "6.1.77"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.2.0"
                },
                {
                  "fixed": "6.6.16"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.7.0"
                },
                {
                  "fixed": "6.7.4"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2024-26627.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:51.608333010Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/07e3ca0f17f579491b5f54e9ed05173d6c1d6fcb",
        "https://git.kernel.org/stable/c/4373534a9850627a2695317944898eb1283a2db0",
        "https://git.kernel.org/stable/c/65ead8468c21c2676d4d06f50b46beffdea69df1",
        "https://git.kernel.org/stable/c/d37c1c81419fdef66ebd0747cf76fb8b7d979059",
        "https://git.kernel.org/stable/c/db6338f45971b4285ea368432a84033690eaf53c",
        "https://git.kernel.org/stable/c/f5944853f7a961fedc1227dc8f60393f8936d37c",
        "https://lists.debian.org/debian-lts-announce/2024/06/msg00017.html",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26627.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2024-26627",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2024/26xxx/CVE-2024-26627.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2024-26627",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": "/severity/0/score"
  },
  "source_id": "core-osv",
  "document_id": 520134,
  "published_at": "2024-03-06T06:45:34.339+00:00"
}