CVE-2023-52584

Severity CVSS v4.0:
Pending analysis
Type:
CWE-416 Use After Free
Publication date:
06/03/2024
Last modified:
14/03/2025

Description

In the Linux kernel, the following vulnerability has been resolved:<br /> <br /> spmi: mediatek: Fix UAF on device remove<br /> <br /> The pmif driver data that contains the clocks is allocated along with<br /> spmi_controller.<br /> On device remove, spmi_controller will be freed first, and then devres<br /> , including the clocks, will be cleanup.<br /> This leads to UAF because putting the clocks will access the clocks in<br /> the pmif driver data, which is already freed along with spmi_controller.<br /> <br /> This can be reproduced by enabling DEBUG_TEST_DRIVER_REMOVE and<br /> building the kernel with KASAN.<br /> <br /> Fix the UAF issue by using unmanaged clk_bulk_get() and putting the<br /> clocks before freeing spmi_controller.

Vulnerable products and versions

CPE From Up to
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.1.77 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.2 (including) 6.6.16 (excluding)
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:* 6.7 (including) 6.7.4 (excluding)