{"schemaVersion":1,"url":"https://cve.openhack.com/cve/CVE-2023-52629","id":"CVE-2023-52629","title":"sh: push-switch: Reorder cleanup operations to avoid use-after-free bug","description":"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  ","descriptionLong":"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.","published":"2024-03-29T09:13:45.848Z","updated":"2026-10-28T02:31:03.570279438Z","reserved":"2024-03-06T09:52:12.092Z","status":"Modified","rejected":false,"assigner":"Linux","metric":{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},"metrics":[{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"CISA-ADP"},{"version":"3.1","score":8.4,"vector":"CVSS:3.1/AV:L/AC:L/PR:N/UI:N/S:U/C:H/I:H/A:H","rating":"high","source":"OSV"}],"rating":"high","products":["Linux"],"affectedProducts":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","versions":[{"version":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","lessThan":"ff635d1f143b55fa005e9e43b16e6d8f677e90a5","status":"affected","versionType":"git"},{"version":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","lessThan":"610dbd8ac271aa36080aac50b928d700ee3fe4de","status":"affected","versionType":"git"},{"version":"9f5e8eee5cfe1328660c71812d87c2a67bda389f","lessThan":"246f80a0b17f8f582b2c0996db02998239057c65","status":"affected","versionType":"git"}],"platforms":[]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","versions":[{"version":"2.6.20","status":"affected"},{"version":"0","lessThan":"2.6.20","status":"unaffected","versionType":"semver"},{"version":"6.1.189","lessThanOrEqual":"6.1.*","status":"unaffected","versionType":"semver"},{"version":"6.5.4","lessThanOrEqual":"6.5.*","status":"unaffected","versionType":"semver"},{"version":"6.6","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}],"platforms":[]}],"packages":[],"cwes":["CWE-416"],"aliases":[],"references":[{"url":"https://git.kernel.org/stable/c/ff635d1f143b55fa005e9e43b16e6d8f677e90a5","tags":["web"]},{"url":"https://git.kernel.org/stable/c/610dbd8ac271aa36080aac50b928d700ee3fe4de","tags":["x_transferred","Patch","web"]},{"url":"https://git.kernel.org/stable/c/246f80a0b17f8f582b2c0996db02998239057c65","tags":["x_transferred","Patch","web"]},{"url":"https://github.com/CVEProject/cvelistV5/tree/main/cves/2023/52xxx/CVE-2023-52629.json","tags":["advisory"]},{"url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52629","tags":["advisory"]},{"url":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","tags":["package"]}],"patchReferenced":true,"fixAvailable":true,"exploitReferenced":false,"kev":false,"kevAdded":null,"kevDue":null,"kevEntry":null,"ssvc":{"exploitation":"none","automatable":"no","technicalImpact":"total"},"epss":0.00254,"epssPercentile":0.17106,"sources":[{"name":"CVE List","url":"https://www.cve.org/CVERecord?id=CVE-2023-52629","ok":true},{"name":"NVD","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52629","ok":true,"note":"Modified"},{"name":"OSV","url":"https://osv.dev/vulnerability/CVE-2023-52629","ok":true,"note":"0 packages"},{"name":"CISA KEV","url":"https://www.cisa.gov/known-exploited-vulnerabilities-catalog","ok":true,"note":"not listed"},{"name":"EPSS","url":"https://api.first.org/data/v1/epss?cve=CVE-2023-52629","ok":true,"note":"scored 2026-11-19"}],"aiTitle":false,"tech":[],"critical":[],"attention":null}