# CVE-2024-39508: io\_uring/io-wq: Use set\_bit() and test\_bit() at worker-\>flags

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.25% (percentile 10, 2026-11-26)
- **CWE:** CWE-362
- **Published:** 2024-07-12T12:20:39.607Z
- **Modified:** 2026-08-05T11:33:51.352Z

## Who should check

- Anyone running Linux \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< ab702c3483db9046bab9f40306f1a28b22dbbdc0; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 1cbb0affb15470a9621267fe0a8568007553a4bf; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 8a565304927fbd28c9f028c492b5c1714002cbab
- Anyone running Linux 5.1

## Description

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.

## Affected and fixed versions

- Linux: \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< ab702c3483db9046bab9f40306f1a28b22dbbdc0; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 1cbb0affb15470a9621267fe0a8568007553a4bf; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 8a565304927fbd28c9f028c492b5c1714002cbab (cvelist)
- Linux: 5.1 (cvelist)

## Mitigation

- Upgrade Linux to 8a565304927fbd28c9f028c492b5c1714002cbab or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2024-39508. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-39508.md
Affected: Linux >= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, < ab702c3483db9046bab9f40306f1a28b22dbbdc0; >= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, < 1cbb0affb15470a9621267fe0a8568007553a4bf; >= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, < 8a565304927fbd28c9f028c492b5c1714002cbab; Linux 5.1
Fixed in: Linux 1cbb0affb15470a9621267fe0a8568007553a4bf, Linux 8a565304927fbd28c9f028c492b5c1714002cbab

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2024-39508 being exploited?

There is no confirmed exploitation: CVE-2024-39508 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.25% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2024-39508?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2024-39508?

Linux \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< ab702c3483db9046bab9f40306f1a28b22dbbdc0; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 1cbb0affb15470a9621267fe0a8568007553a4bf; \>= 2b188cc1bb857a9d4701ae59aa7768b5124e262e, \< 8a565304927fbd28c9f028c492b5c1714002cbab; Linux 5.1.

### Is there a fix for CVE-2024-39508?

Yes. Fixed in Linux 1cbb0affb15470a9621267fe0a8568007553a4bf, Linux 8a565304927fbd28c9f028c492b5c1714002cbab. Upgrade Linux to 8a565304927fbd28c9f028c492b5c1714002cbab or later.

### How do I check if I'm affected by CVE-2024-39508?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/ab702c3483db9046bab9f40306f1a28b22dbbdc0>
- patch: <https://git.kernel.org/stable/c/1cbb0affb15470a9621267fe0a8568007553a4bf>
- patch: <https://git.kernel.org/stable/c/8a565304927fbd28c9f028c492b5c1714002cbab>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2024-39508>

HTML: <https://flawdb.com/CVE-2024-39508> · JSON: <https://flawdb.com/api/v1/entries/CVE-2024-39508>
