{"id":"CVE-2023-52836","aliases":["CVE-2023-52836"],"related":[],"kind":"vulnerability","state":"published","title":"locking/ww_mutex/test: Fix potential workqueue corruption","summary":"In the Linux kernel, the following vulnerability has been resolved:\n\nlocking/ww_mutex/test: Fix potential workqueue corruption\n\nIn some cases running with the test-ww_mutex code, I was seeing\nodd behavior where sometimes it seemed flush_workqueue was\nreturning before all the work threads were finished.\n\nOften this would cause strange crashes as the mutexes would be\nfreed while they were being used.\n\nLooking at the code, there is a lifetime problem as the\ncontrolling thread that spawns the work allocates the\n\"struct stress\" structures that are passed to the workqueue\nthreads. Then when the workqueue threads are finished,\nthey free the stress struct that was passed to them.\n\nUnfortunately the workqueue work_struct node is in the stress\nstruct. Which means the work_struct is freed before the work\nthread returns and while flush_workqueue is waiting.\n\nIt seems like a better idea to have the controlling thread\nboth allocate and free the stress structures, so that we can\nbe sure we don't corrupt the workqueue by freeing the structure\nprematurely.\n\nSo this patch reworks the test to do so, and with this change\nI no longer see the early flush_workqueue returns.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"In the Linux kernel, the following vulnerability has been resolved:\n\nlocking/ww_mutex/test: Fix potential workqueue corruption\n\nIn some cases running with the test-ww_mutex code, I was seeing\nodd behavior where sometimes it seemed flush_workqueue was\nreturning before all the work threads were finished.\n\nOften this would cause strange crashes as the mutexes would be\nfreed while they were being used.\n\nLooking at the code, there is a lifetime problem as the\ncontrolling thread that spawns the work allocates the\n\"struct stress\" structures that are passed to the workqueue\nthreads. Then when the workqueue threads are finished,\nthey free the stress struct that was passed to them.\n\nUnfortunately the workqueue work_struct node is in the stress\nstruct. Which means the work_struct is freed before the work\nthread returns and while flush_workqueue is waiting.\n\nIt seems like a better idea to have the controlling thread\nboth allocate and free the stress structures, so that we can\nbe sure we don't corrupt the workqueue by freeing the structure\nprematurely.\n\nSo this patch reworks the test to do so, and with this change\nI no longer see the early flush_workqueue returns.","source":"cvelist"},{"lang":"es","text":"En el kernel de Linux, se resolvió la siguiente vulnerabilidad: lock/ww_mutex/test: soluciona una posible corrupción de la cola de trabajo. En algunos casos, al ejecutar el código test-ww_mutex, veía un comportamiento extraño en el que a veces parecía que flush_workqueue regresaba antes que todos los subprocesos de trabajo. hemos terminado. A menudo, esto causaría fallas extrañas ya que los mutex se liberarían mientras se estaban usando. Al observar el código, hay un problema de duración, ya que el subproceso de control que genera el trabajo asigna las estructuras de \"estrés de estructura\" que se pasan a los subprocesos de la cola de trabajo. Luego, cuando los subprocesos de la cola de trabajo finalizan, liberan la estructura de tensión que se les pasó. Desafortunadamente, el nodo work_struct de la cola de trabajo está en la estructura de estrés. Lo que significa que work_struct se libera antes de que regrese el hilo de trabajo y mientras descarga_workqueue está esperando. Parece una mejor idea que el subproceso de control asigne y libere las estructuras de tensión, de modo que podamos estar seguros de no corromper la cola de trabajo al liberar la estructura prematuramente. Entonces, este parche reelabora la prueba para hacerlo, y con este cambio ya no veo los primeros retornos de Flush_workqueue.","source":"nvd"}],"published":"2024-05-21T15:31:37.174Z","modified":"2026-06-17T06:43:41.710Z","severity":{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"NVD","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":["CWE-787"],"affected":[{"ranges":[{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"d4d37c9e6a4dbcca958dabd99216550525c7e389","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"d8267cabbe1bed15ccf8b0e684c528bf8eeef715","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"dcd85e3c929368076a7592b27f541e0da8b427f5","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"9ed2d68b3925145f5f51c46559484881d6082f75","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"e89d0ed45a419c485bae999426ecf92697cbdda3","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"c56df79d68677cf062da1b6e3b33e74299a92dfc","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"e36407713163363e65566e7af0abe207d5f59a0c","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"304a2c4aad0fff887ce493e4197bf9cbaf394479","status":"affected"},{"type":"git","introduced":"2a0c11282881875dc44f166a20eedf0d866dd0ef","fixed":"bccdd808902f8c677317cec47c306e42b93b849e","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"4.11","status":"affected"},{"type":"semver","introduced":"0","fixed":"4.11","status":"unaffected"},{"type":"semver","introduced":"4.14.331","lastAffected":"4.14.*","status":"unaffected"},{"type":"semver","introduced":"4.19.300","lastAffected":"4.19.*","status":"unaffected"},{"type":"semver","introduced":"5.4.262","lastAffected":"5.4.*","status":"unaffected"},{"type":"semver","introduced":"5.10.202","lastAffected":"5.10.*","status":"unaffected"},{"type":"semver","introduced":"5.15.140","lastAffected":"5.15.*","status":"unaffected"},{"type":"semver","introduced":"6.1.64","lastAffected":"6.1.*","status":"unaffected"},{"type":"semver","introduced":"6.5.13","lastAffected":"6.5.*","status":"unaffected"},{"type":"semver","introduced":"6.6.3","lastAffected":"6.6.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"6.7","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"status":"affected","fixed":"4.14.331"},{"status":"affected","introduced":"4.15","fixed":"4.19.300"},{"status":"affected","introduced":"4.20","fixed":"5.4.262"},{"status":"affected","introduced":"5.5","fixed":"5.10.202"},{"status":"affected","introduced":"5.11","fixed":"5.15.140"},{"status":"affected","introduced":"5.16","fixed":"6.1.64"},{"status":"affected","introduced":"6.2","fixed":"6.5.13"},{"status":"affected","introduced":"6.6","fixed":"6.6.3"}],"vendor":"linux","product":"linux_kernel","cpe":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","source":"nvd"}],"references":[{"url":"https://git.kernel.org/stable/c/d4d37c9e6a4dbcca958dabd99216550525c7e389","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/d8267cabbe1bed15ccf8b0e684c528bf8eeef715","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/dcd85e3c929368076a7592b27f541e0da8b427f5","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/9ed2d68b3925145f5f51c46559484881d6082f75","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e89d0ed45a419c485bae999426ecf92697cbdda3","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/c56df79d68677cf062da1b6e3b33e74299a92dfc","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/e36407713163363e65566e7af0abe207d5f59a0c","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/304a2c4aad0fff887ce493e4197bf9cbaf394479","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/bccdd808902f8c677317cec47c306e42b93b849e","tags":["patch","x-transferred"],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","ssvc":{"scorer":"CISA-ADP","exploitation":"none","automatable":"no","technicalImpact":"partial","date":"2024-05-22T19:05:10.965Z"},"sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2023-52836","url":"https://www.cve.org/CVERecord?id=CVE-2023-52836","licence":"CVE Terms of Use","modified":"2026-05-11T19:33:57.320Z"},{"source":"nvd","name":"NVD","id":"CVE-2023-52836","url":"https://nvd.nist.gov/vuln/detail/CVE-2023-52836","licence":"Public domain","modified":"2026-06-17T06:43:41.710Z"}],"updatedAt":"2026-11-25T22:58:34.045Z","epss":{"score":0.00255,"percentile":0.18171,"date":"2026-12-02T12:00:21.000Z"}}