CVE-2024-39508: io_uring/io-wq: Use set_bit() and test_bit() at worker->flags

Published Jul 12, 2024
·
Updated

In the Linux kernel, the following vulnerability has been resolved:

iouring/io-wq: Use setbit() and testbit() at worker->flags

Utilize setbit() and testbit() on worker->flags within iouring/io-wq to address potential data races.

The structure ioworker->flags may be accessed through various data paths, leading to concurrency issues. When KCSAN is enabled, it reveals data races occurring in ioworkerhandlework and iowqactivatefreeworker functions.

BUG: KCSAN: data-race in ioworkerhandlework / iowqactivatefreeworker write to 0xffff8885c4246404 of 4 bytes by task 49071 on cpu 28: ioworkerhandlework (iouring/io-wq.c:434 iouring/io-wq.c:569) iowqworker (iouring/io-wq.c:?) <snip>

read to 0xffff8885c4246404 of 4 bytes by task 49024 on cpu 5: iowqactivatefreeworker (iouring/io-wq.c:? iouring/io-wq.c:285) iowqenqueue (iouring/io-wq.c:947) ioqueueiowq (iouring/iouring.c:524) ioreqtasksubmit (iouring/iouring.c:1511) iohandletwlist (iouring/iouring.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 setbit(), testbit(), and clearbit() instead of basic "and" and "or" operations. This ensures thread-safe manipulation of worker flags.

Also, move createindex to avoid holes in the structure.

Affected Software

7 affected componentsFixes available
redhat/kernel<6.6.35
6.6.35
redhat/kernel<6.9.6
6.9.6
redhat/kernel<6.10
6.10
debian/linux<=5.10.223-1, <=5.10.234-1, <=6.1.129-1, <=6.1.135-1
6.12.25-16.12.27-1
Linux Linux kernel>=5.1<6.6.35
Linux Linux kernel>=6.7<6.9.6
Microsoft cbl2 kernel 5.15.186.1-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.6.35
  2. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.9.6
  3. Upgrade

    Upgrade redhat/kernel to a version that resolves this vulnerability.

    Fixed in 6.10
  4. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.25-1Fixed in 6.12.27-1
  5. Upgrade

    Upgrade linux kernel io_uring/io-wq to a version that resolves this vulnerability.

    Patch 18daea77cca6
  6. Configuration

    In io_uring/io-wq, refactor accesses to worker->flags to use atomic bit helpers: replace non-atomic "and"/"or" flag manipulation with set_bit() and test_bit() on worker->flags, and use clear_bit() where clearing is required, to prevent data races reported by KCSAN in io_worker_handle_work and io_wq_activate_free_worker.

    Linux kernel io_uring/io-wq (worker flags) worker->flags bit operations = Use set_bit() and test_bit() (and clear_bit()) instead of basic "and" and "or" operations

Event History

Jul 12, 2024
CVE Published
via MITRE·12:20 PM
Data Sourced
via MITRE·12:20 PM
DescriptionSeverity
Data Sourced
via NVD·01:15 PM
Description
Data Sourced
via NVD·01:15 PM
RemedySeverityWeaknessAffected Software
Apr 27, 2025
Data Sourced
via Ubuntu·05:19 PM
RemedyDescriptionSeverityAffected Software
Oct 5, 2025
Data Sourced
via Microsoft·01:01 AM
DescriptionSeverityWeakness
Data Sourced
via Microsoft·01:01 AM
Affected Software
Updated
via Microsoft·01:01 AM
DescriptionSeverity

Frequently Asked Questions

1

What is the severity of CVE-2024-39508?

CVE-2024-39508 has been classified as a potential data race vulnerability in the Linux kernel.

2

How do I fix CVE-2024-39508?

To fix CVE-2024-39508, update the kernel to version 6.6.35 or later for Red Hat or to version 5.10.223-1, 5.10.226-1, 6.1.119-1, 6.1.123-1 or newer for Debian.

3

Which Linux kernel versions are affected by CVE-2024-39508?

CVE-2024-39508 affects multiple versions of the Linux kernel prior to the specified remediation updates.

4

What causes CVE-2024-39508 in the Linux kernel?

CVE-2024-39508 is caused by improper handling of io_worker flags within the io_uring subsystem, leading to possible data races.

5

Is CVE-2024-39508 a low, medium, or high risk?

CVE-2024-39508 presents a medium risk due to the potential for data races that could affect system stability.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203