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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** LOW 3.8
- **CVSS:** 3.8 (v3.1, CNA) `CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N`
- **CVSS metrics:** Attack vector: Network; Attack complexity: Low; Privileges required: High; User interaction: None; Scope: Unchanged; Confidentiality impact: Low; Integrity impact: Low; Availability impact: None
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Remote, login needed
- **EPSS:** 0.77% (percentile 52, 2026-11-26)
- **CWE:** CWE-416
- **Published:** 2024-03-06T06:45:19.847Z
- **Modified:** 2026-06-17T06:43:05.047Z

## Who should check

- Anyone running Linux \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 521f28eedd6b14228c46e3b81e3bf9b90c2818d8; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< f8dcafcb54632536684336161da8bdd52120f95e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< e821d50ab5b956ed0effa49faaf29912fd4106d9
- Anyone running Linux 5.17

## 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.

## Affected and fixed versions

- Linux: \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 521f28eedd6b14228c46e3b81e3bf9b90c2818d8; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< f8dcafcb54632536684336161da8bdd52120f95e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< e821d50ab5b956ed0effa49faaf29912fd4106d9 (cvelist)
- Linux: 5.17 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2023-52584. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2023-52584.md
Affected: Linux >= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, < 521f28eedd6b14228c46e3b81e3bf9b90c2818d8; >= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, < f8dcafcb54632536684336161da8bdd52120f95e; >= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, < 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e; >= b45b3ccef8c063d21eb746d…
Fixed in: Linux 521f28eedd6b14228c46e3b81e3bf9b90c2818d8, Linux 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2023-52584 being exploited?

There is no confirmed exploitation: CVE-2023-52584 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.77% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2023-52584?

Low: CVSS 3.8 (v3.1, scored by CNA). Remote, login needed.

### Which versions are affected by CVE-2023-52584?

Linux \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 521f28eedd6b14228c46e3b81e3bf9b90c2818d8; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< f8dcafcb54632536684336161da8bdd52120f95e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e; \>= b45b3ccef8c063d21eb746d85337eaf71f6b5f07, \< e821d50ab5b956ed0effa49faaf29912fd4106d9; Linux 5.17.

### Is there a fix for CVE-2023-52584?

Yes. Fixed in Linux 521f28eedd6b14228c46e3b81e3bf9b90c2818d8, Linux 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2023-52584?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <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>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2023-52584>

HTML: <https://flawdb.com/CVE-2023-52584> · JSON: <https://flawdb.com/api/v1/entries/CVE-2023-52584>
