CVE-2024-57985 (GCVE-0-2024-57985)
Vulnerability from cvelistv5
Published
2025-02-27 02:07
Modified
2025-05-04 10:07
Severity ?
Summary
In the Linux kernel, the following vulnerability has been resolved: firmware: qcom: scm: Cleanup global '__scm' on probe failures If SCM driver fails the probe, it should not leave global '__scm' variable assigned, because external users of this driver will assume the probe finished successfully. For example TZMEM parts ('__scm->mempool') are initialized later in the probe, but users of it (__scm_smc_call()) rely on the '__scm' variable. This fixes theoretical NULL pointer exception, triggered via introducing probe deferral in SCM driver with call trace: qcom_tzmem_alloc+0x70/0x1ac (P) qcom_tzmem_alloc+0x64/0x1ac (L) qcom_scm_assign_mem+0x78/0x194 qcom_rmtfs_mem_probe+0x2d4/0x38c platform_probe+0x68/0xc8
Impacted products
Vendor Product Version
Linux Linux Version: 40289e35ca525f29a03989352ab207b6a9675475
Version: 40289e35ca525f29a03989352ab207b6a9675475
Version: 40289e35ca525f29a03989352ab207b6a9675475
Create a notification for this product.
Show details on NVD website


{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "drivers/firmware/qcom/qcom_scm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "390d3baeba51a126f75c97b90ec28b9384ce4b84",
              "status": "affected",
              "version": "40289e35ca525f29a03989352ab207b6a9675475",
              "versionType": "git"
            },
            {
              "lessThan": "faf1715798fe72b79e4432ce8c6d03ca69765425",
              "status": "affected",
              "version": "40289e35ca525f29a03989352ab207b6a9675475",
              "versionType": "git"
            },
            {
              "lessThan": "1e76b546e6fca7eb568161f408133904ca6bcf4f",
              "status": "affected",
              "version": "40289e35ca525f29a03989352ab207b6a9675475",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "drivers/firmware/qcom/qcom_scm.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "6.11"
            },
            {
              "lessThan": "6.11",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.12.*",
              "status": "unaffected",
              "version": "6.12.13",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.13.*",
              "status": "unaffected",
              "version": "6.13.2",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "6.14",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.12.13",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.13.2",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.14",
                  "versionStartIncluding": "6.11",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nfirmware: qcom: scm: Cleanup global \u0027__scm\u0027 on probe failures\n\nIf SCM driver fails the probe, it should not leave global \u0027__scm\u0027\nvariable assigned, because external users of this driver will assume the\nprobe finished successfully.  For example TZMEM parts (\u0027__scm-\u003emempool\u0027)\nare initialized later in the probe, but users of it (__scm_smc_call())\nrely on the \u0027__scm\u0027 variable.\n\nThis fixes theoretical NULL pointer exception, triggered via introducing\nprobe deferral in SCM driver with call trace:\n\n  qcom_tzmem_alloc+0x70/0x1ac (P)\n  qcom_tzmem_alloc+0x64/0x1ac (L)\n  qcom_scm_assign_mem+0x78/0x194\n  qcom_rmtfs_mem_probe+0x2d4/0x38c\n  platform_probe+0x68/0xc8"
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2025-05-04T10:07:44.660Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/390d3baeba51a126f75c97b90ec28b9384ce4b84"
        },
        {
          "url": "https://git.kernel.org/stable/c/faf1715798fe72b79e4432ce8c6d03ca69765425"
        },
        {
          "url": "https://git.kernel.org/stable/c/1e76b546e6fca7eb568161f408133904ca6bcf4f"
        }
      ],
      "title": "firmware: qcom: scm: Cleanup global \u0027__scm\u0027 on probe failures",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2024-57985",
    "datePublished": "2025-02-27T02:07:09.983Z",
    "dateReserved": "2025-02-27T02:04:28.913Z",
    "dateUpdated": "2025-05-04T10:07:44.660Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.1",
  "vulnerability-lookup:meta": {
    "nvd": "{\"cve\":{\"id\":\"CVE-2024-57985\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2025-02-27T02:15:11.703\",\"lastModified\":\"2025-02-27T02:15:11.703\",\"vulnStatus\":\"Awaiting Analysis\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nfirmware: qcom: scm: Cleanup global \u0027__scm\u0027 on probe failures\\n\\nIf SCM driver fails the probe, it should not leave global \u0027__scm\u0027\\nvariable assigned, because external users of this driver will assume the\\nprobe finished successfully.  For example TZMEM parts (\u0027__scm-\u003emempool\u0027)\\nare initialized later in the probe, but users of it (__scm_smc_call())\\nrely on the \u0027__scm\u0027 variable.\\n\\nThis fixes theoretical NULL pointer exception, triggered via introducing\\nprobe deferral in SCM driver with call trace:\\n\\n  qcom_tzmem_alloc+0x70/0x1ac (P)\\n  qcom_tzmem_alloc+0x64/0x1ac (L)\\n  qcom_scm_assign_mem+0x78/0x194\\n  qcom_rmtfs_mem_probe+0x2d4/0x38c\\n  platform_probe+0x68/0xc8\"},{\"lang\":\"es\",\"value\":\"En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: firmware: qcom: scm: Limpieza de la variable global \u0027__scm\u0027 en caso de fallos en la sonda Si el controlador SCM hace que la sonda falle, no deber\u00eda dejar asignada la variable global \u0027__scm\u0027, porque los usuarios externos de este controlador asumir\u00e1n que la sonda finaliz\u00f3 correctamente. Por ejemplo, las partes TZMEM (\u0027__scm-\u0026gt;mempool\u0027) se inicializan m\u00e1s tarde en la sonda, pero los usuarios de esta (__scm_smc_call()) dependen de la variable \u0027__scm\u0027. Esto corrige la excepci\u00f3n te\u00f3rica del puntero NULL, activada mediante la introducci\u00f3n de un aplazamiento de la sonda en el controlador SCM con seguimiento de llamadas: qcom_tzmem_alloc+0x70/0x1ac (P) qcom_tzmem_alloc+0x64/0x1ac (L) qcom_scm_assign_mem+0x78/0x194 qcom_rmtfs_mem_probe+0x2d4/0x38c platform_probe+0x68/0xc8\"}],\"metrics\":{},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/1e76b546e6fca7eb568161f408133904ca6bcf4f\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/390d3baeba51a126f75c97b90ec28b9384ce4b84\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/faf1715798fe72b79e4432ce8c6d03ca69765425\",\"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.


Loading…

Loading…