CVE-2024-26899 (GCVE-0-2024-26899)

Vulnerability from cvelistv5 – Published: 2024-04-17 10:27 – Updated: 2025-05-04 08:59
VLAI?
Title
block: fix deadlock between bd_link_disk_holder and partition scan
Summary
In the Linux kernel, the following vulnerability has been resolved: block: fix deadlock between bd_link_disk_holder and partition scan 'open_mutex' of gendisk is used to protect open/close block devices. But in bd_link_disk_holder(), it is used to protect the creation of symlink between holding disk and slave bdev, which introduces some issues. When bd_link_disk_holder() is called, the driver is usually in the process of initialization/modification and may suspend submitting io. At this time, any io hold 'open_mutex', such as scanning partitions, can cause deadlocks. For example, in raid: T1 T2 bdev_open_by_dev lock open_mutex [1] ... efi_partition ... md_submit_bio md_ioctl mddev_syspend -> suspend all io md_add_new_disk bind_rdev_to_array bd_link_disk_holder try lock open_mutex [2] md_handle_request -> wait mddev_resume T1 scan partition, T2 add a new device to raid. T1 waits for T2 to resume mddev, but T2 waits for open_mutex held by T1. Deadlock occurs. Fix it by introducing a local mutex 'blk_holder_mutex' to replace 'open_mutex'.
Severity ?
No CVSS data available.
Assigner
Impacted products
Vendor Product Version
Linux Linux Affected: 1b0a2d950ee2a54aa04fb31ead32144be0bbf690 , < 1e5c5b0abaee7b62a10b9707a62083b71ad21f62 (git)
Affected: 1b0a2d950ee2a54aa04fb31ead32144be0bbf690 , < 5a87c1f7993bc8ac358a3766bac5dc7126e01e98 (git)
Affected: 1b0a2d950ee2a54aa04fb31ead32144be0bbf690 , < 03f12122b20b6e6028e9ed69030a49f9cffcbb75 (git)
Create a notification for this product.
    Linux Linux Affected: 6.7
Unaffected: 0 , < 6.7 (semver)
Unaffected: 6.7.11 , ≤ 6.7.* (semver)
Unaffected: 6.8.2 , ≤ 6.8.* (semver)
Unaffected: 6.9 , ≤ * (original_commit_for_fix)
Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "adp": [
      {
        "metrics": [
          {
            "other": {
              "content": {
                "id": "CVE-2024-26899",
                "options": [
                  {
                    "Exploitation": "none"
                  },
                  {
                    "Automatable": "no"
                  },
                  {
                    "Technical Impact": "partial"
                  }
                ],
                "role": "CISA Coordinator",
                "timestamp": "2024-06-12T16:21:25.318881Z",
                "version": "2.0.3"
              },
              "type": "ssvc"
            }
          }
        ],
        "providerMetadata": {
          "dateUpdated": "2024-06-12T16:21:49.375Z",
          "orgId": "134c704f-9b21-4f2e-91b3-4a467353bcc0",
          "shortName": "CISA-ADP"
        },
        "title": "CISA ADP Vulnrichment"
      },
      {
        "providerMetadata": {
          "dateUpdated": "2024-08-02T00:21:05.535Z",
          "orgId": "af854a3a-2127-422b-91ae-364da2661108",
          "shortName": "CVE"
        },
        "references": [
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98"
          },
          {
            "tags": [
              "x_transferred"
            ],
            "url": "https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75"
          }
        ],
        "title": "CVE Program Container"
      }
    ],
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "block/holder.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "1e5c5b0abaee7b62a10b9707a62083b71ad21f62",
              "status": "affected",
              "version": "1b0a2d950ee2a54aa04fb31ead32144be0bbf690",
              "versionType": "git"
            },
            {
              "lessThan": "5a87c1f7993bc8ac358a3766bac5dc7126e01e98",
              "status": "affected",
              "version": "1b0a2d950ee2a54aa04fb31ead32144be0bbf690",
              "versionType": "git"
            },
            {
              "lessThan": "03f12122b20b6e6028e9ed69030a49f9cffcbb75",
              "status": "affected",
              "version": "1b0a2d950ee2a54aa04fb31ead32144be0bbf690",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "block/holder.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.7"
            },
            {
              "lessThan": "6.7",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.7.*",
              "status": "unaffected",
              "version": "6.7.11",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.8.*",
              "status": "unaffected",
              "version": "6.8.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.9",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.7.11",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.8.2",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.9",
                  "versionStartIncluding": "6.7",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nblock: fix deadlock between bd_link_disk_holder and partition scan\n\n\u0027open_mutex\u0027 of gendisk is used to protect open/close block devices. But\nin bd_link_disk_holder(), it is used to protect the creation of symlink\nbetween holding disk and slave bdev, which introduces some issues.\n\nWhen bd_link_disk_holder() is called, the driver is usually in the process\nof initialization/modification and may suspend submitting io. At this\ntime, any io hold \u0027open_mutex\u0027, such as scanning partitions, can cause\ndeadlocks. For example, in raid:\n\nT1                              T2\nbdev_open_by_dev\n lock open_mutex [1]\n ...\n  efi_partition\n  ...\n   md_submit_bio\n\t\t\t\tmd_ioctl mddev_syspend\n\t\t\t\t  -\u003e suspend all io\n\t\t\t\t md_add_new_disk\n\t\t\t\t  bind_rdev_to_array\n\t\t\t\t   bd_link_disk_holder\n\t\t\t\t    try lock open_mutex [2]\n    md_handle_request\n     -\u003e wait mddev_resume\n\nT1 scan partition, T2 add a new device to raid. T1 waits for T2 to resume\nmddev, but T2 waits for open_mutex held by T1. Deadlock occurs.\n\nFix it by introducing a local mutex \u0027blk_holder_mutex\u0027 to replace\n\u0027open_mutex\u0027."
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T08:59:12.162Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62"
        },
        {
          "url": "https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98"
        },
        {
          "url": "https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75"
        }
      ],
      "title": "block: fix deadlock between bd_link_disk_holder and partition scan",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-26899",
    "datePublished": "2024-04-17T10:27:49.089Z",
    "dateReserved": "2024-02-19T14:20:24.187Z",
    "dateUpdated": "2025-05-04T08:59:12.162Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "vulnrichment": {
      "containers": "{\"adp\": [{\"title\": \"CVE Program Container\", \"references\": [{\"url\": \"https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98\", \"tags\": [\"x_transferred\"]}, {\"url\": \"https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75\", \"tags\": [\"x_transferred\"]}], \"providerMetadata\": {\"orgId\": \"af854a3a-2127-422b-91ae-364da2661108\", \"shortName\": \"CVE\", \"dateUpdated\": \"2024-08-02T00:21:05.535Z\"}}, {\"title\": \"CISA ADP Vulnrichment\", \"metrics\": [{\"other\": {\"type\": \"ssvc\", \"content\": {\"id\": \"CVE-2024-26899\", \"role\": \"CISA Coordinator\", \"options\": [{\"Exploitation\": \"none\"}, {\"Automatable\": \"no\"}, {\"Technical Impact\": \"partial\"}], \"version\": \"2.0.3\", \"timestamp\": \"2024-06-12T16:21:25.318881Z\"}}}], \"providerMetadata\": {\"orgId\": \"134c704f-9b21-4f2e-91b3-4a467353bcc0\", \"shortName\": \"CISA-ADP\", \"dateUpdated\": \"2024-06-12T16:21:46.323Z\"}}], \"cna\": {\"title\": \"block: fix deadlock between bd_link_disk_holder and partition scan\", \"affected\": [{\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"1b0a2d950ee2\", \"lessThan\": \"1e5c5b0abaee\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"1b0a2d950ee2\", \"lessThan\": \"5a87c1f7993b\", \"versionType\": \"git\"}, {\"status\": \"affected\", \"version\": \"1b0a2d950ee2\", \"lessThan\": \"03f12122b20b\", \"versionType\": \"git\"}], \"programFiles\": [\"block/holder.c\"], \"defaultStatus\": \"unaffected\"}, {\"repo\": \"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\", \"vendor\": \"Linux\", \"product\": \"Linux\", \"versions\": [{\"status\": \"affected\", \"version\": \"6.7\"}, {\"status\": \"unaffected\", \"version\": \"0\", \"lessThan\": \"6.7\", \"versionType\": \"semver\"}, {\"status\": \"unaffected\", \"version\": \"6.7.11\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.7.*\"}, {\"status\": \"unaffected\", \"version\": \"6.8.2\", \"versionType\": \"semver\", \"lessThanOrEqual\": \"6.8.*\"}, {\"status\": \"unaffected\", \"version\": \"6.9\", \"versionType\": \"original_commit_for_fix\", \"lessThanOrEqual\": \"*\"}], \"programFiles\": [\"block/holder.c\"], \"defaultStatus\": \"affected\"}], \"references\": [{\"url\": \"https://git.kernel.org/stable/c/1e5c5b0abaee7b62a10b9707a62083b71ad21f62\"}, {\"url\": \"https://git.kernel.org/stable/c/5a87c1f7993bc8ac358a3766bac5dc7126e01e98\"}, {\"url\": \"https://git.kernel.org/stable/c/03f12122b20b6e6028e9ed69030a49f9cffcbb75\"}], \"x_generator\": {\"engine\": \"bippy-9e1c9544281a\"}, \"descriptions\": [{\"lang\": \"en\", \"value\": \"In the Linux kernel, the following vulnerability has been resolved:\\n\\nblock: fix deadlock between bd_link_disk_holder and partition scan\\n\\n\u0027open_mutex\u0027 of gendisk is used to protect open/close block devices. But\\nin bd_link_disk_holder(), it is used to protect the creation of symlink\\nbetween holding disk and slave bdev, which introduces some issues.\\n\\nWhen bd_link_disk_holder() is called, the driver is usually in the process\\nof initialization/modification and may suspend submitting io. At this\\ntime, any io hold \u0027open_mutex\u0027, such as scanning partitions, can cause\\ndeadlocks. For example, in raid:\\n\\nT1                              T2\\nbdev_open_by_dev\\n lock open_mutex [1]\\n ...\\n  efi_partition\\n  ...\\n   md_submit_bio\\n\\t\\t\\t\\tmd_ioctl mddev_syspend\\n\\t\\t\\t\\t  -\u003e suspend all io\\n\\t\\t\\t\\t md_add_new_disk\\n\\t\\t\\t\\t  bind_rdev_to_array\\n\\t\\t\\t\\t   bd_link_disk_holder\\n\\t\\t\\t\\t    try lock open_mutex [2]\\n    md_handle_request\\n     -\u003e wait mddev_resume\\n\\nT1 scan partition, T2 add a new device to raid. T1 waits for T2 to resume\\nmddev, but T2 waits for open_mutex held by T1. Deadlock occurs.\\n\\nFix it by introducing a local mutex \u0027blk_holder_mutex\u0027 to replace\\n\u0027open_mutex\u0027.\"}], \"providerMetadata\": {\"orgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"shortName\": \"Linux\", \"dateUpdated\": \"2024-11-05T09:17:51.908Z\"}}}",
      "cveMetadata": "{\"cveId\": \"CVE-2024-26899\", \"state\": \"PUBLISHED\", \"dateUpdated\": \"2024-11-05T09:17:51.908Z\", \"dateReserved\": \"2024-02-19T14:20:24.187Z\", \"assignerOrgId\": \"416baaa9-dc9f-4396-8d5f-8c081fb06d67\", \"datePublished\": \"2024-04-17T10:27:49.089Z\", \"assignerShortName\": \"Linux\"}",
      "dataType": "CVE_RECORD",
      "dataVersion": "5.1"
    }
  }
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.


Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…