CVE-2023-52584
spmi: mediatek: Fix UAF on device remove
Check your servers for CVE-2023-52584
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2023-52584 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
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.
Severity (CVSS)
CVSS:3.1/AV:N/AC:L/PR:H/UI:N/S:U/C:L/I:L/A:N
- Attack vector
- network: an attacker can reach the vulnerable part over the network, often from the internet
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- high: the attacker needs an administrative account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality low, integrity low, availability none: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.56%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 48.1% of all scored CVEs. Scores of 1 Dec 2026.
The assessment of CISA (SSVC, 6 Mar 2024):
- Exploitation
- poc: a proof of concept is public
- Automatable
- no: each attack takes manual steps
- Technical impact
- total: full control of the component or of its data
Weakness
- CWE-416 Use After Free
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from b45b3ccef8c063d21eb746d85337eaf71f6b5f07, before 521f28eedd6b14228c46e3b81e3bf9b90c2818d8 affected from b45b3ccef8c063d21eb746d85337eaf71f6b5f07, before f8dcafcb54632536684336161da8bdd52120f95e affected from b45b3ccef8c063d21eb746d85337eaf71f6b5f07, before 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e affected from b45b3ccef8c063d21eb746d85337eaf71f6b5f07, before e821d50ab5b956ed0effa49faaf29912fd4106d9
Other versions: unaffected
|
| Linux |
affected 5.17 unaffected before 5.17 unaffected from 6.1.77 up to and including 6.1.* unaffected from 6.6.16 up to and including 6.6.* unaffected from 6.7.4 up to and including 6.7.* unaffected 6.8 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2023-52584 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2023-52584
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2023-52584
trivy image --scanners vuln IMAGE | grep CVE-2023-52584
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/521f28eedd6b14228c46e3b81e3bf9b90c2818d8 git.kernel.org
- https://git.kernel.org/stable/c/f8dcafcb54632536684336161da8bdd52120f95e git.kernel.org
- https://git.kernel.org/stable/c/9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e git.kernel.org
- https://git.kernel.org/stable/c/e821d50ab5b956ed0effa49faaf29912fd4106d9 git.kernel.org
Source: the record CVE-2023-52584 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST; the CWE catalog of MITRE, CWE Terms of Use. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse