CVE-2024-56568
Vulnerability from cvelistv5
Published
2024-12-27 14:23
Modified
2024-12-27 14:23
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: iommu/arm-smmu: Defer probe of clients after smmu device bound Null pointer dereference occurs due to a race between smmu driver probe and client driver probe, when of_dma_configure() for client is called after the iommu_device_register() for smmu driver probe has executed but before the driver_bound() for smmu driver has been called. Following is how the race occurs: T1:Smmu device probe T2: Client device probe really_probe() arm_smmu_device_probe() iommu_device_register() really_probe() platform_dma_configure() of_dma_configure() of_dma_configure_id() of_iommu_configure() iommu_probe_device() iommu_init_device() arm_smmu_probe_device() arm_smmu_get_by_fwnode() driver_find_device_by_fwnode() driver_find_device() next_device() klist_next() /* null ptr assigned to smmu */ /* null ptr dereference while smmu->streamid_mask */ driver_bound() klist_add_tail() When this null smmu pointer is dereferenced later in arm_smmu_probe_device, the device crashes. Fix this by deferring the probe of the client device until the smmu device has bound to the arm smmu driver. [will: Add comment]
Impacted products
Vendor Product Version
Linux Linux Version: 4.9
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/iommu/arm/arm-smmu/arm-smmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "c2527d07c7e9cda2c6165d5edccf74752baac1b0",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            },
            {
              "lessThan": "dc02407ea952e20c544a078a6be2e6f008327973",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            },
            {
              "lessThan": "f8f794f387ad21c4696e5cd0626cb6f8a5f6aea5",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            },
            {
              "lessThan": "4a9485918a042e3114890dfbe19839a1897f8b2c",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            },
            {
              "lessThan": "5018696b19bc6c021e934a8a59f4b1dd8c0ac9f8",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            },
            {
              "lessThan": "229e6ee43d2a160a1592b83aad620d6027084aad",
              "status": "affected",
              "version": "021bb8420d44cf56102d44fca9af628625e75482",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/iommu/arm/arm-smmu/arm-smmu.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "4.9"
            },
            {
              "lessThan": "4.9",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.10.*",
              "status": "unaffected",
              "version": "5.10.231",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "5.15.*",
              "status": "unaffected",
              "version": "5.15.174",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.1.*",
              "status": "unaffected",
              "version": "6.1.120",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.6.*",
              "status": "unaffected",
              "version": "6.6.66",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.13-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\niommu/arm-smmu: Defer probe of clients after smmu device bound\n\nNull pointer dereference occurs due to a race between smmu\ndriver probe and client driver probe, when of_dma_configure()\nfor client is called after the iommu_device_register() for smmu driver\nprobe has executed but before the driver_bound() for smmu driver\nhas been called.\n\nFollowing is how the race occurs:\n\nT1:Smmu device probe\t\tT2: Client device probe\n\nreally_probe()\narm_smmu_device_probe()\niommu_device_register()\n\t\t\t\t\treally_probe()\n\t\t\t\t\tplatform_dma_configure()\n\t\t\t\t\tof_dma_configure()\n\t\t\t\t\tof_dma_configure_id()\n\t\t\t\t\tof_iommu_configure()\n\t\t\t\t\tiommu_probe_device()\n\t\t\t\t\tiommu_init_device()\n\t\t\t\t\tarm_smmu_probe_device()\n\t\t\t\t\tarm_smmu_get_by_fwnode()\n\t\t\t\t\t\tdriver_find_device_by_fwnode()\n\t\t\t\t\t\tdriver_find_device()\n\t\t\t\t\t\tnext_device()\n\t\t\t\t\t\tklist_next()\n\t\t\t\t\t\t    /* null ptr\n\t\t\t\t\t\t       assigned to smmu */\n\t\t\t\t\t/* null ptr dereference\n\t\t\t\t\t   while smmu-\u003estreamid_mask */\ndriver_bound()\n\tklist_add_tail()\n\nWhen this null smmu pointer is dereferenced later in\narm_smmu_probe_device, the device crashes.\n\nFix this by deferring the probe of the client device\nuntil the smmu device has bound to the arm smmu driver.\n\n[will: Add comment]"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2024-12-27T14:23:11.733Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/c2527d07c7e9cda2c6165d5edccf74752baac1b0"
        },
        {
          "url": "https://git.kernel.org/stable/c/dc02407ea952e20c544a078a6be2e6f008327973"
        },
        {
          "url": "https://git.kernel.org/stable/c/f8f794f387ad21c4696e5cd0626cb6f8a5f6aea5"
        },
        {
          "url": "https://git.kernel.org/stable/c/4a9485918a042e3114890dfbe19839a1897f8b2c"
        },
        {
          "url": "https://git.kernel.org/stable/c/5018696b19bc6c021e934a8a59f4b1dd8c0ac9f8"
        },
        {
          "url": "https://git.kernel.org/stable/c/229e6ee43d2a160a1592b83aad620d6027084aad"
        }
      ],
      "title": "iommu/arm-smmu: Defer probe of clients after smmu device bound",
      "x_generator": {
        "engine": "bippy-5f407fcff5a0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-56568",
    "datePublished": "2024-12-27T14:23:11.733Z",
    "dateReserved": "2024-12-27T14:03:05.996Z",
    "dateUpdated": "2024-12-27T14:23:11.733Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-56568\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2024-12-27T15:15:15.733\",\"lastModified\":\"2024-12-27T15:15:15.733\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\niommu/arm-smmu: Defer probe of clients after smmu device bound\\n\\nNull pointer dereference occurs due to a race between smmu\\ndriver probe and client driver probe, when of_dma_configure()\\nfor client is called after the iommu_device_register() for smmu driver\\nprobe has executed but before the driver_bound() for smmu driver\\nhas been called.\\n\\nFollowing is how the race occurs:\\n\\nT1:Smmu device probe\\t\\tT2: Client device probe\\n\\nreally_probe()\\narm_smmu_device_probe()\\niommu_device_register()\\n\\t\\t\\t\\t\\treally_probe()\\n\\t\\t\\t\\t\\tplatform_dma_configure()\\n\\t\\t\\t\\t\\tof_dma_configure()\\n\\t\\t\\t\\t\\tof_dma_configure_id()\\n\\t\\t\\t\\t\\tof_iommu_configure()\\n\\t\\t\\t\\t\\tiommu_probe_device()\\n\\t\\t\\t\\t\\tiommu_init_device()\\n\\t\\t\\t\\t\\tarm_smmu_probe_device()\\n\\t\\t\\t\\t\\tarm_smmu_get_by_fwnode()\\n\\t\\t\\t\\t\\t\\tdriver_find_device_by_fwnode()\\n\\t\\t\\t\\t\\t\\tdriver_find_device()\\n\\t\\t\\t\\t\\t\\tnext_device()\\n\\t\\t\\t\\t\\t\\tklist_next()\\n\\t\\t\\t\\t\\t\\t    /* null ptr\\n\\t\\t\\t\\t\\t\\t       assigned to smmu */\\n\\t\\t\\t\\t\\t/* null ptr dereference\\n\\t\\t\\t\\t\\t   while smmu-\u003estreamid_mask */\\ndriver_bound()\\n\\tklist_add_tail()\\n\\nWhen this null smmu pointer is dereferenced later in\\narm_smmu_probe_device, the device crashes.\\n\\nFix this by deferring the probe of the client device\\nuntil the smmu device has bound to the arm smmu driver.\\n\\n[will: Add comment]\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/229e6ee43d2a160a1592b83aad620d6027084aad\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/4a9485918a042e3114890dfbe19839a1897f8b2c\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/5018696b19bc6c021e934a8a59f4b1dd8c0ac9f8\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/c2527d07c7e9cda2c6165d5edccf74752baac1b0\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/dc02407ea952e20c544a078a6be2e6f008327973\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/f8f794f387ad21c4696e5cd0626cb6f8a5f6aea5\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}"
  }
}


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 seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.