3.8low
spmi: mediatek: Fix UAF on device remove
- Severity
- 3.8low CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.56% (higher than 48% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
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
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before 521f28eedd6b14228c46e3b81e3bf9b90c2818d8, from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before f8dcafcb54632536684336161da8bdd52120f95e, from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before 9a3881b1f07db1bb55cb0108e6f05cfd027eaf2e, from b45b3ccef8c063d21eb746d85337eaf71f6b5f07 before e821d50ab5b956ed0effa49faaf29912fd4106d9, 5.17 Not affected: before 5.17, from 6.1.77 up to 6.1.*, from 6.6.16 up to 6.6.*, from 6.7.4 up to 6.7.*, from 6.8 up to * | CVE List |
| linux kernel | from 1da177e4c3f4 before 521f28eedd6b, from 1da177e4c3f4 before f8dcafcb5463, from 1da177e4c3f4 before 9a3881b1f07d, from 1da177e4c3f4 before e821d50ab5b9 Not affected: from 6.1.77 up to 6.1.*, from 6.6.16 up to 6.6.*, from 6.7.4 up to 6.7.*, from 6.8 up to * | CVE List |
| linux linux_kernel | before 6.1.77, from 6.2 before 6.6.16, from 6.7 before 6.7.4 | NVD |
Classification
SSVC (CISA-ADP): exploitation poc, automatable no, technical impact total.
What each source says
CVE List
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.
NVD (es)
En el kernel de Linux, se resolvió la siguiente vulnerabilidad: spmi: mediatek: reparar UAF en la eliminación del dispositivo. Los datos del controlador pmif que contienen los relojes se asignan junto con spmi_controller. Al eliminar el dispositivo, primero se liberará spmi_controller y luego se limpiarán los devres, incluidos los relojes. Esto lleva a UAF porque al poner los relojes se accederá a los relojes en los datos del controlador pmif, que ya están liberados junto con spmi_controller. Esto se puede reproducir habilitando DEBUG_TEST_DRIVER_REMOVE y compilando el kernel con KASAN. Solucione el problema de UAF utilizando clk_bulk_get() no administrado y poniendo los relojes antes de liberar spmi_controller.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-52584 changed 2026-05-11 | CVE Terms of Use |
| NVD | CVE-2023-52584 changed 2026-06-17 | Public domain |