8.4high
sh: push-switch: Reorder cleanup operations to avoid use-after-free bug
- Severity
- 8.4high CVSS:3.1 by CISA-ADP
- Exploit likelihood
- 0.26% (higher than 18% of CVEs; EPSS, by FIRST)
- Published
- Last changed
- Assigned by
- Linux
Description
In the Linux kernel, the following vulnerability has been resolved: sh: push-switch: Reorder cleanup operations to avoid use-after-free bug The original code puts flush_work() before timer_shutdown_sync() in switch_drv_remove(). Although we use flush_work() to stop the worker, it could be rescheduled in switch_timer(). As a result, a use-after-free bug can occur. The details are shown below: (cpu 0) | (cpu 1) switch_drv_remove() | flush_work() | ... | switch_timer // timer | schedule_work(&psw->work) timer_shutdown_sync() | ... | switch_work_handler // worker kfree(psw) // free | | psw->state = 0 // use This patch puts timer_shutdown_sync() before flush_work() to mitigate the bugs. As a result, the worker and timer will be stopped safely before the deallocate operations.
Affected
| Product or package | Versions | Reported by |
|---|---|---|
| Linux Linux | from 9f5e8eee5cfe1328660c71812d87c2a67bda389f before ff635d1f143b55fa005e9e43b16e6d8f677e90a5, from 9f5e8eee5cfe1328660c71812d87c2a67bda389f before 610dbd8ac271aa36080aac50b928d700ee3fe4de, from 9f5e8eee5cfe1328660c71812d87c2a67bda389f before 246f80a0b17f8f582b2c0996db02998239057c65, 2.6.20 Not affected: before 2.6.20, from 6.1.189 up to 6.1.*, from 6.5.4 up to 6.5.*, from 6.6 up to * | CVE List |
| linux linux_kernel | from 9f5e8eee5cfe before 610dbd8ac271, from 9f5e8eee5cfe before 246f80a0b17f, 2.6.20, from 2.6.20 before 6.5.4 Not affected: before 2.6.20, from 6.54 up to 6.6, up to 6.6 | CVE List, NVD |
Classification
SSVC (CISA-ADP): exploitation none, automatable no, technical impact total.
What each source says
CVE List
In the Linux kernel, the following vulnerability has been resolved: sh: push-switch: Reorder cleanup operations to avoid use-after-free bug The original code puts flush_work() before timer_shutdown_sync() in switch_drv_remove(). Although we use flush_work() to stop the worker, it could be rescheduled in switch_timer(). As a result, a use-after-free bug can occur. The details are shown below: (cpu 0) | (cpu 1) switch_drv_remove() | flush_work() | ... | switch_timer // timer | schedule_work(&psw->work) timer_shutdown_sync() | ... | switch_work_handler // worker kfree(psw) // free | | psw->state = 0 // use This patch puts timer_shutdown_sync() before flush_work() to mitigate the bugs. As a result, the worker and timer will be stopped safely before the deallocate operations.
NVD (es)
En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: sh: push-switch: reordenar las operaciones de limpieza para evitar el error de use after free. El código original coloca Flush_work() antes de timer_shutdown_sync() en switch_drv_remove(). Aunque usamos Flush_work() para detener al trabajador, podría reprogramarse en switch_timer(). Como resultado, puede ocurrir un error de use after free. Los detalles se muestran a continuación: (cpu 0) | (procesador 1) switch_drv_remove() | descarga_trabajo() | ... | switch_timer // temporizador | Schedule_work(&psw->trabajo) timer_shutdown_sync() | ... | switch_work_handler // trabajador kfree(psw) // gratis | | psw->state = 0 // uso Este parche coloca timer_shutdown_sync() antes de Flush_work() para mitigar los errores. Como resultado, el trabajador y el temporizador se detendrán de forma segura antes de las operaciones de desasignación.
References
Sources
| Source | Record | Licence |
|---|---|---|
| CVE List | CVE-2023-52629 changed 2026-10-03 | CVE Terms of Use |
| NVD | CVE-2023-52629 changed 2026-10-03 | Public domain |