# CVE-2024-46704: workqueue: Fix spruious data race in \_\_flush\_work()

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

- **Severity:** MEDIUM 4.7
- **CVSS:** 4.7 (v3.1, NVD) `CVSS:3.1/AV:L/AC:H/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: High; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: None; Integrity impact: None; 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.24% (percentile 9, 2026-11-26)
- **Published:** 2024-09-13T06:27:31.822Z
- **Modified:** 2026-06-17T07:55:45.800Z

## Who should check

- Anyone running Linux \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 91d09642127a32fde231face2ff489af70eef316; \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 8bc35475ef1a23b0e224f3242eb11c76cab0ea88
- Anyone running Linux 6.10

## Description

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

workqueue: Fix spruious data race in \_\_flush\_work()

When flushing a work item for cancellation, \_\_flush\_work() knows that it
exclusively owns the work item through its PENDING bit. 134874e2eee9
("workqueue: Allow cancel\_work\_sync() and disable\_work() from atomic
contexts on BH work items") added a read of @work-\>data to determine whether
to use busy wait for BH work items that are being canceled. While the read
is safe when @from\_cancel, @work-\>data was read before testing @from\_cancel
to simplify code structure:

	data = \*work\_data\_bits(work);
	if (from\_cancel &&
	    !WARN\_ON\_ONCE(data & WORK\_STRUCT\_PWQ) && (data & WORK\_OFFQ\_BH)) {

While the read data was never used if !@from\_cancel, this could trigger
KCSAN data race detection spuriously:

  ==================================================================
  BUG: KCSAN: data-race in \_\_flush\_work / \_\_flush\_work

  write to 0xffff8881223aa3e8 of 8 bytes by task 3998 on cpu 0:
   instrument\_write include/linux/instrumented.h:41 \[inline\]
   \_\_\_set\_bit include/asm-generic/bitops/instrumented-non-atomic.h:28 \[inline\]
   insert\_wq\_barrier kernel/workqueue.c:3790 \[inline\]
   start\_flush\_work kernel/workqueue.c:4142 \[inline\]
   \_\_flush\_work+0x30b/0x570 kernel/workqueue.c:4178
   flush\_work kernel/workqueue.c:4229 \[inline\]
   ...

  read to 0xffff8881223aa3e8 of 8 bytes by task 50 on cpu 1:
   \_\_flush\_work+0x42a/0x570 kernel/workqueue.c:4188
   flush\_work kernel/workqueue.c:4229 \[inline\]
   flush\_delayed\_work+0x66/0x70 kernel/workqueue.c:4251
   ...

  value changed: 0x0000000000400000 -\> 0xffff88810006c00d

Reorganize the code so that @from\_cancel is tested before @work-\>data is
accessed. The only problem is triggering KCSAN detection spuriously. This
shouldn't need READ\_ONCE() or other access qualifiers.

No functional changes.

## Affected and fixed versions

- Linux: \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 91d09642127a32fde231face2ff489af70eef316; \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 8bc35475ef1a23b0e224f3242eb11c76cab0ea88 (cvelist)
- Linux: 6.10 (cvelist)

## Mitigation

- Upgrade Linux to 8bc35475ef1a23b0e224f3242eb11c76cab0ea88 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-46704. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2024-46704.md
Affected: Linux >= 134874e2eee9380c2700411d4844cbc29297bc01, < 91d09642127a32fde231face2ff489af70eef316; >= 134874e2eee9380c2700411d4844cbc29297bc01, < 8bc35475ef1a23b0e224f3242eb11c76cab0ea88; Linux 6.10
Fixed in: Linux 91d09642127a32fde231face2ff489af70eef316, Linux 8bc35475ef1a23b0e224f3242eb11c76cab0ea88

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-46704 being exploited?

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

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

Medium: CVSS 4.7 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed). The attack needs conditions outside the attacker's control, which makes it harder.

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

Linux \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 91d09642127a32fde231face2ff489af70eef316; \>= 134874e2eee9380c2700411d4844cbc29297bc01, \< 8bc35475ef1a23b0e224f3242eb11c76cab0ea88; Linux 6.10.

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

Yes. Fixed in Linux 91d09642127a32fde231face2ff489af70eef316, Linux 8bc35475ef1a23b0e224f3242eb11c76cab0ea88. Upgrade Linux to 8bc35475ef1a23b0e224f3242eb11c76cab0ea88 or later.

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

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/91d09642127a32fde231face2ff489af70eef316>
- patch: <https://git.kernel.org/stable/c/8bc35475ef1a23b0e224f3242eb11c76cab0ea88>

## 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-46704>

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