# CVE-2023-52584: spmi: mediatek: Fix UAF on device remove

- Severity: Low 3.8 (CVSS:3.1, scored by CISA-ADP) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N`
- 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.56%, higher than 48% of CVEs (2026-12-01)
- Published: 2024-03-06T06:45:19.847Z
- Modified: 2026-06-17T06:43:05.047Z
- Weaknesses: CWE-416
- SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total
- Assigned by: Linux

## Description

In the Linux kernel, the following vulnerability has been resolved:

spmi: mediatek: Fix UAF on device remove

The pmif driver data that contains the clocks is allocated along with
spmi_controller.
On device remove, spmi_controller will be freed first, and then devres
, including the clocks, will be cleanup.
This leads to UAF because putting the clocks will access the clocks in
the pmif driver data, which is already freed along with spmi_controller.

This can be reproduced by enabling DEBUG_TEST_DRIVER_REMOVE and
building the kernel with KASAN.

Fix the UAF issue by using unmanaged clk_bulk_get() and putting the
clocks before freeing spmi_controller.

(As written by CVE List.)

## Affected

- Linux Linux: from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before 521f28eedd6b14228c46e3b81e3bf9b90c2818d8; from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before f8dcafcb54632536684336161da8bdd52120f95e; from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e; from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before e821d50ab5b956ed0effa49faaf29912fd4106d9; 5.17 (not affected: before 5.17; from 6.1.77 up to 6.1.*; from 6.6.16 up to 6.6.*; from 6.7.4 up to 6.7.*; from 6.8 up to *)
- linux kernel: from 1da177e4c3f4 before 521f28eedd6b; from 1da177e4c3f4 before f8dcafcb5463; from 1da177e4c3f4 before 9a3881b1f07d; from 1da177e4c3f4 before e821d50ab5b9 (not affected: from 6.1.77 up to 6.1.*; from 6.6.16 up to 6.6.*; from 6.7.4 up to 6.7.*; from 6.8 up to *)
- linux linux_kernel: before 6.1.77; from 6.2 before 6.6.16; from 6.7 before 6.7.4

## References

- <https://git.kernel.org/stable/c/521f28eedd6b14228c46e3b81e3bf9b90c2818d8> (patch)
- <https://git.kernel.org/stable/c/f8dcafcb54632536684336161da8bdd52120f95e> (patch)
- <https://git.kernel.org/stable/c/9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e> (patch)
- <https://git.kernel.org/stable/c/e821d50ab5b956ed0effa49faaf29912fd4106d9> (patch)

## Sources

- CVE List: [CVE-2023-52584](https://www.cve.org/CVERecord?id=CVE-2023-52584), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2023-52584](https://nvd.nist.gov/vuln/detail/CVE-2023-52584), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2023-52584 · Whole record: https://cve.day/CVE-2023-52584.json · Rebuilt by cve.day 2026-11-25T22:58:33.272Z
