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

Published Mar 6, 2024
·
Updated

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 spmicontroller. On device remove, spmicontroller 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 spmicontroller.

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

Fix the UAF issue by using unmanaged clkbulkget() and putting the clocks before freeing spmicontroller.

Affected Software

4 affected componentsFixes available
Linux Linux kernel<6.1.77
Linux Linux kernel>=6.2<6.6.16
Linux Linux kernel>=6.7<6.7.4
debian/linux<=5.10.223-1, <=5.10.234-1
6.1.129-16.1.135-16.12.25-16.12.27-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.129-1Fixed in 6.1.135-1Fixed in 6.12.25-1Fixed in 6.12.27-1
  2. Compensating control

    In the Linux kernel SPMI MediaTek PMIF driver, use unmanaged clk_bulk_get() and put the clocks before freeing spmi_controller to prevent the use-after-free during device removal.

Event History

Mar 6, 2024
CVE Published
via MITRE·06:45 AM
Data Sourced
via MITRE·06:45 AM
Description

Frequently Asked Questions

1

What is the severity of CVE-2023-52584?

CVE-2023-52584 has been classified as a moderate severity vulnerability.

2

How do I fix CVE-2023-52584?

To fix CVE-2023-52584, update to the patched versions: linux 6.1.123-1, 6.1.119-1, 6.12.10-1, or 6.12.11-1.

3

What systems are affected by CVE-2023-52584?

CVE-2023-52584 affects specific versions of the Linux kernel, including those up to version 5.10.226-1.

4

What causes CVE-2023-52584?

CVE-2023-52584 is caused by a use-after-free (UAF) issue in the SPMI driver related to device removal.

5

Is there a workaround for CVE-2023-52584?

There are no known workarounds for CVE-2023-52584 other than applying the necessary updates.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203