CVE-2024-39508
io_uring/io-wq: Use set_bit() and test_bit() at worker->flags
Reported by linux · Published July 12, 2024
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.
Fixed versions
Upgrade to a fixed version or later. Language registries are listed first, then Linux distributions, then vendor products.
| Package | Ecosystem | Fixed in |
|---|---|---|
| linux_kernel | linux | 6.9.6, 6.6.35 |
Risk scores
Affected products
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | 2b188cc1bb857a9d4701ae59aa7768b5124e262e, 2b188cc1bb857a9d4701ae59aa7768b5124e262e, 2b188cc1bb857a9d4701ae59aa7768b5124e262e |
| Linux | Linux | 5.1, 0, 6.6.35 |
| linux | linux_kernel | 5.1, 5.1, 5.1 |
| Linux | Linux | 2b188cc1bb857a9d4701ae59aa7768b5124e262e, 2b188cc1bb857a9d4701ae59aa7768b5124e262e, 5.1 |
Timeline
- Jul 12, 2024 CVE Published
- Jul 13, 2024 EPSS Score (30 in total, the first dated here)
- Oct 4, 2024 Coalition ESS Score (6 in total, the first dated here)
- Jan 8, 2026 Security Advisory (344 in total, the first dated here)
- Mar 30, 2026 Distribution Patch (174 in total, the first dated here)
- Aug 4, 2026 CVE Updated
Query this with the API
The same record, from the CLI:
vulnetix vdb vuln CVE-2024-39508
vulnetix vdb fixes CVE-2024-39508
Or with curl, using the org id and key from your account page:
curl -s -H "Authorization: ApiKey ${VULNETIX_ORG_ID}:${VULNETIX_API_KEY}" \
"https://api.vdb.vulnetix.com/v2/vuln/CVE-2024-39508/fixes/registry"
The Community plan is free and allows 50 queries a day. Get a free API key · API quickstart