CVE-2024-39508

In the Linux kernel, the following vulnerability has been resolved: io_uring/io-wq: Use set_bit() and test_bit() at worker->flags Utilize set_bit() and test_bit() on worker->flags within io_uring/io-wq to address potential data races. The structure io_worker->flags may be accessed through various data paths, leading to concurrency issues. When KCSAN is enabled, it reveals data races occurring in io_worker_handle_work and io_wq_activate_free_worker functions. BUG: KCSAN: data-race in io_worker_handle_work / io_wq_activate_free_worker write to 0xffff8885c4246404 of 4 bytes by task 49071 on cpu 28: io_worker_handle_work (io_uring/io-wq.c:434 io_uring/io-wq.c:569) io_wq_worker (io_uring/io-wq.c:?) <snip> read to 0xffff8885c4246404 of 4 bytes by task 49024 on cpu 5: io_wq_activate_free_worker (io_uring/io-wq.c:? io_uring/io-wq.c:285) io_wq_enqueue (io_uring/io-wq.c:947) io_queue_iowq (io_uring/io_uring.c:524) io_req_task_submit (io_uring/io_uring.c:1511) io_handle_tw_list (io_uring/io_uring.c:1198) <snip> Line numbers against commit 18daea77cca6 ("Merge tag 'for-linus' of git://git.kernel.org/pub/scm/virt/kvm/kvm"). These races involve writes and reads to the same memory location by different tasks running on different CPUs. To mitigate this, refactor the code to use atomic operations such as set_bit(), test_bit(), and clear_bit() instead of basic "and" and "or" operations. This ensures thread-safe manipulation of worker flags. Also, move `create_index` to avoid holes in the structure.
Configurations

Configuration 1 (hide)

OR cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*

History

03 Oct 2025, 15:13

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/1cbb0affb15470a9621267fe0a8568007553a4bf - () https://git.kernel.org/stable/c/1cbb0affb15470a9621267fe0a8568007553a4bf - Patch
References () https://git.kernel.org/stable/c/8a565304927fbd28c9f028c492b5c1714002cbab - () https://git.kernel.org/stable/c/8a565304927fbd28c9f028c492b5c1714002cbab - Patch
References () https://git.kernel.org/stable/c/ab702c3483db9046bab9f40306f1a28b22dbbdc0 - () https://git.kernel.org/stable/c/ab702c3483db9046bab9f40306f1a28b22dbbdc0 - Patch
CPE cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*
CWE CWE-362
CVSS v2 : unknown
v3 : unknown
v2 : unknown
v3 : 4.7
First Time Linux linux Kernel
Linux

21 Nov 2024, 09:27

Type Values Removed Values Added
References () https://git.kernel.org/stable/c/1cbb0affb15470a9621267fe0a8568007553a4bf - () https://git.kernel.org/stable/c/1cbb0affb15470a9621267fe0a8568007553a4bf -
References () https://git.kernel.org/stable/c/8a565304927fbd28c9f028c492b5c1714002cbab - () https://git.kernel.org/stable/c/8a565304927fbd28c9f028c492b5c1714002cbab -
References () https://git.kernel.org/stable/c/ab702c3483db9046bab9f40306f1a28b22dbbdc0 - () https://git.kernel.org/stable/c/ab702c3483db9046bab9f40306f1a28b22dbbdc0 -
Summary
  • (es) En el kernel de Linux, se ha resuelto la siguiente vulnerabilidad: io_uring/io-wq: use set_bit() y test_bit() en trabajador-&gt;flags Utilice set_bit() y test_bit() en trabajador-&gt;flags dentro de io_uring/io-wq para abordar posibles ejecucións de datos. Se puede acceder a la estructura io_worker-&gt;flags a través de varias rutas de datos, lo que genera problemas de concurrencia. Cuando KCSAN está habilitado, revela ejecucións de datos que ocurren en las funciones io_worker_handle_work y io_wq_activate_free_worker. ERROR: KCSAN: ejecución de datos en io_worker_handle_work/io_wq_activate_free_worker escribe en 0xffff8885c4246404 de 4 bytes por tarea 49071 en la CPU 28: io_worker_handle_work (io_uring/io-wq.c:434 io_uring/io-wq.c:569) (io_durante/io -wq.c:?) leer en 0xffff8885c4246404 de 4 bytes por tarea 49024 en la CPU 5: io_wq_activate_free_worker (io_uring/io-wq.c:? io_uring/io-wq.c:285) io_wq_enqueue (io_uring/io- wq.c:947) io_queue_iowq (io_uring/io_uring.c:524) io_req_task_submit (io_uring/io_uring.c:1511) io_handle_tw_list (io_uring/io_uring.c:1198) Números de línea contra El commit 18daea77cca6 ("Etiqueta de combinación 'para -linus' de git://git.kernel.org/pub/scm/virt/kvm/kvm"). Estas ejecuciones implican escrituras y lecturas en la misma ubicación de memoria mediante diferentes tareas que se ejecutan en diferentes CPU. Para mitigar esto, refactorice el código para usar operaciones atómicas como set_bit(), test_bit() y clear_bit() en lugar de operaciones básicas "y" y "o". Esto garantiza una manipulación segura para subprocesos de los indicadores de los trabajadores. Además, mueva `create_index` para evitar agujeros en la estructura.

12 Jul 2024, 16:34

Type Values Removed Values Added
New CVE

Information

Published : 2024-07-12 13:15

Updated : 2025-10-03 15:13


NVD link : CVE-2024-39508

Mitre link : CVE-2024-39508

CVE.ORG link : CVE-2024-39508


JSON object : View

Products Affected

linux

  • linux_kernel
CWE
CWE-362

Concurrent Execution using Shared Resource with Improper Synchronization ('Race Condition')