# CVE-2024-57985: firmware: qcom: scm: Cleanup global '__scm' on probe failures

- Severity: High 7.0 (CVSS:3.1, scored by Linux) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.20%, higher than 10% of CVEs (2026-12-02)
- Published: 2025-02-27T02:07:09.983Z
- Modified: 2026-10-15T22:18:04.670Z
- SSVC (CISA-ADP): exploitation none, automatable no, technical impact total
- Assigned by: Linux

## Description

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

(As written by CVE List.)

## Affected

- Linux Linux: from 40289e35ca525f29a03989352ab207b6a9675475 before 390d3baeba51a126f75c97b90ec28b9384ce4b84; from 40289e35ca525f29a03989352ab207b6a9675475 before faf1715798fe72b79e4432ce8c6d03ca69765425; from 40289e35ca525f29a03989352ab207b6a9675475 before 1e76b546e6fca7eb568161f408133904ca6bcf4f; 6.11 (not affected: before 6.11; from 6.12.13 up to 6.12.*; from 6.13.2 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.11 before 6.12.13; from 6.13 before 6.13.2

## Every score

- Linux: CVSS:3.1 7.0 High `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H`
- NVD: CVSS:3.1 5.5 Medium `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`

## References

- <https://git.kernel.org/stable/c/390d3baeba51a126f75c97b90ec28b9384ce4b84> (patch)
- <https://git.kernel.org/stable/c/faf1715798fe72b79e4432ce8c6d03ca69765425> (patch)
- <https://git.kernel.org/stable/c/1e76b546e6fca7eb568161f408133904ca6bcf4f> (patch)

## Sources

- CVE List: [CVE-2024-57985](https://www.cve.org/CVERecord?id=CVE-2024-57985), CVE Terms of Use, modified 2026-10-15
- NVD: [CVE-2024-57985](https://nvd.nist.gov/vuln/detail/CVE-2024-57985), Public domain, modified 2026-10-15

---

Page: https://cve.day/CVE-2024-57985 · Whole record: https://cve.day/CVE-2024-57985.json · Rebuilt by cve.day 2026-11-25T22:58:52.087Z
