{"id":"CVE-2023-52629","aliases":["CVE-2023-52629"],"related":[],"kind":"vulnerability","state":"published","title":"sh: push-switch: Reorder cleanup operations to avoid use-after-free bug","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nsh: push-switch: Reorder cleanup operations to avoid use-after-free bug\n\nThe original code puts flush_work() before timer_shutdown_sync()\nin switch_drv_remove(). Although we use flush_work() to stop\nthe worker, it could be rescheduled in switch_timer(). As a result,\na use-after-free bug can occur. The details are shown below:\n\n      (cpu 0)                    |      (cpu 1)\nswitch_drv_remove()              |\n flush_work()                    |\n  ...                            |  switch_timer // timer\n                                 |   schedule_work(&psw->work)\n timer_shutdown_sync()           |\n ...                             |  switch_work_handler // worker\n kfree(psw) // free              |\n                                 |   psw->state = 0 // use\n\nThis patch puts timer_shutdown_sync() before flush_work() to\nmitigate the bugs. As a result, the worker and timer will be\nstopped safely before the deallocate operations.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nsh: push-switch: Reorder cleanup operations to avoid use-after-free bug\n\nThe original code puts flush_work() before timer_shutdown_sync()\nin switch_drv_remove(). Although we use flush_work() to stop\nthe worker, it could be rescheduled in switch_timer(). As a result,\na use-after-free bug can occur. The details are shown below:\n\n      (cpu 0)                    |      (cpu 1)\nswitch_drv_remove()              |\n flush_work()                    |\n  ...                            |  switch_timer // timer\n                                 |   schedule_work(&psw->work)\n timer_shutdown_sync()           |\n ...                             |  switch_work_handler // worker\n kfree(psw) // free              |\n                                 |   psw->state = 0 // use\n\nThis patch puts timer_shutdown_sync() before flush_work() to\nmitigate the bugs. As a result, the worker and timer will be\nstopped safely before the deallocate operations.","source":"cvelist"},{"lang":"es","text":"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(&amp;psw-&gt;trabajo) timer_shutdown_sync() | ... | switch_work_handler // trabajador kfree(psw) // gratis | | psw-&gt;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.","source":"nvd"}],"published":"2024-03-29T09:13:45.848Z","modified":"2026-10-03T11:17:26.973Z","severity":{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"},"severities":[{"scorer":"CISA-ADP","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","score":8.4,"rating":"HIGH"}],"cwes":["CWE-416"],"affected":[{"ranges":[{"type":"git","introduced":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","fixed":"ff635d1f143b55fa005e9e43b16e6d8f677e90a5","status":"affected"},{"type":"git","introduced":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","fixed":"610dbd8ac271aa36080aac50b928d700ee3fe4de","status":"affected"},{"type":"git","introduced":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","fixed":"246f80a0b17f8f582b2c0996db02998239057c65","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"2.6.20","status":"affected"},{"type":"semver","introduced":"0","fixed":"2.6.20","status":"unaffected"},{"type":"semver","introduced":"6.1.189","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.5.4","lastAffected":"6.5.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.6","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"type":"custom","introduced":"9f5e8eee5cfe","fixed":"610dbd8ac271","status":"affected"},{"type":"custom","introduced":"9f5e8eee5cfe","fixed":"246f80a0b17f","status":"affected"},{"version":"2.6.20","status":"affected"},{"type":"custom","introduced":"0","fixed":"2.6.20","status":"unaffected"},{"type":"custom","introduced":"6.54","lastAffected":"6.6","status":"unaffected"},{"type":"custom","introduced":"0","lastAffected":"6.6","status":"unaffected"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:-:*:*:*:*:*:*:*","source":"cvelist"},{"ranges":[{"status":"affected","introduced":"2.6.20","fixed":"6.5.4"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/ff635d1f143b55fa005e9e43b16e6d8f677e90a5","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/610dbd8ac271aa36080aac50b928d700ee3fe4de","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/246f80a0b17f8f582b2c0996db02998239057c65","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"total","date":"2024-04-01T17:41:22.649Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52629","url":"https://www.cve.org/CVERecord?id=CVE-2023-52629","licence":"CVE Terms of Use","modified":"2026-10-03T10:54:49.171Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52629","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52629","licence":"Public domain","modified":"2026-10-03T11:17:26.973Z"}],"updatedAt":"2026-11-25T22:58:33.436Z","epss":{"score":0.00256,"percentile":0.18364,"date":"2026-12-01T12:00:22.000Z"}}