# CVE-2024-57985: firmware: qcom: scm: Cleanup global '\_\_scm' on probe failures

- Priority: **Routine**
- Reason: Not severe (CVSS 7, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2025-02-27 · Modified: 2026-10-15
- Aliases: UBUNTU-CVE-2024-57985, DEBIAN-CVE-2024-57985
- Record: https://cvemate.com/vulnerability/CVE-2024-57985 · JSON: https://cvemate.com/vulnerability/CVE-2024-57985/json

## Description

```text
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
```

## Signals

- CVSS: 7 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.203%, percentile 10.868%, as of 2026-12-04
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 86)

- debian linux (Debian): \< 6.12.13-1
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.11 (Ubuntu): \< 6.11.0-1015.15~24.04.1
- ubuntu linux-azure-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-edge (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/390d3baeba51a126f75c97b90ec28b9384ce4b84>
- <https://git.kernel.org/stable/c/faf1715798fe72b79e4432ce8c6d03ca69765425>
- <https://git.kernel.org/stable/c/1e76b546e6fca7eb568161f408133904ca6bcf4f>
- <https://ubuntu.com/security/CVE-2024-57985>
- <https://www.cve.org/CVERecord?id=CVE-2024-57985>
- <https://git.kernel.org/linus/1e76b546e6fca7eb568161f408133904ca6bcf4f>
- <https://ubuntu.com/security/notices/USN-7521-1>
- <https://ubuntu.com/security/notices/USN-7521-2>
- <https://ubuntu.com/security/notices/USN-7521-3>
- <https://security-tracker.debian.org/tracker/CVE-2024-57985>

---

Data as of 2026-12-05T03:28:40.092Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
