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

- Priority: **Routine**
- Reason: Not severe (CVSS 3.8, network access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2024-03-06 · Modified: 2026-05-11
- Aliases: UBUNTU-CVE-2023-52584, DEBIAN-CVE-2023-52584
- Record: https://cvemate.com/vulnerability/CVE-2023-52584 · JSON: https://cvemate.com/vulnerability/CVE-2023-52584/json

## Description

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

## Signals

- CVSS: 3.8 low (v3.1, CVE.org) CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
- EPSS: 0.562%, percentile 48.177%, 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 78)

- debian linux (Debian): \< 6.1.82-1 \| \< 6.7.7-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.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-6.5 (Ubuntu): \< 6.5.0-1022.23~22.04.1
- ubuntu linux-azure-edge (Ubuntu): All versions (No fix recorded)
- ubuntu linux-azure-fde (Ubuntu): All versions (No fix recorded)

## References

- <https://git.kernel.org/stable/c/521f28eedd6b14228c46e3b81e3bf9b90c2818d8>
- <https://git.kernel.org/stable/c/f8dcafcb54632536684336161da8bdd52120f95e>
- <https://git.kernel.org/stable/c/9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e>
- <https://git.kernel.org/stable/c/e821d50ab5b956ed0effa49faaf29912fd4106d9>
- <https://ubuntu.com/security/CVE-2023-52584>
- <https://git.kernel.org/linus/e821d50ab5b956ed0effa49faaf29912fd4106d9>
- <https://ubuntu.com/security/notices/USN-6688-1>
- <https://www.cve.org/CVERecord?id=CVE-2023-52584>
- <https://ubuntu.com/security/notices/USN-6818-1>
- <https://ubuntu.com/security/notices/USN-6819-1>
- <https://ubuntu.com/security/notices/USN-6818-2>
- <https://ubuntu.com/security/notices/USN-6819-2>
- <https://ubuntu.com/security/notices/USN-6819-3>
- <https://ubuntu.com/security/notices/USN-6818-3>
- <https://ubuntu.com/security/notices/USN-6818-4>
- <https://ubuntu.com/security/notices/USN-6819-4>
- <https://security-tracker.debian.org/tracker/CVE-2023-52584>

---

Data as of 2026-12-05T06:22:27.001Z. 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
