# CVE-2024-35991: dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue

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

- **Severity:** MEDIUM 5.5
- **CVSS:** 5.5 (v3.1, NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; 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.23% (percentile 8, 2026-11-30)
- **CWE:** CWE-667
- **Published:** 2024-05-20T09:47:56.401Z
- **Modified:** 2026-06-17T07:35:53.910Z

## Who should check

- Anyone running Linux \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< 758071a35d9f3ffd84ff12169d081412a2f5f098; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< c9b732a9f73eadc638abdcf0a6d39bc7a0c1af5f; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< d5638de827cff0fce77007e426ec0ffdedf68a44
- Anyone running Linux 6.4

## Description

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

dmaengine: idxd: Convert spinlock to mutex to lock evl workqueue

drain\_workqueue() cannot be called safely in a spinlocked context due to
possible task rescheduling. In the multi-task scenario, calling
queue\_work() while drain\_workqueue() will lead to a Call Trace as
pushing a work on a draining workqueue is not permitted in spinlocked
context.
    Call Trace:
    \<TASK\>
    ? \_\_warn+0x7d/0x140
    ? \_\_queue\_work+0x2b2/0x440
    ? report\_bug+0x1f8/0x200
    ? handle\_bug+0x3c/0x70
    ? exc\_invalid\_op+0x18/0x70
    ? asm\_exc\_invalid\_op+0x1a/0x20
    ? \_\_queue\_work+0x2b2/0x440
    queue\_work\_on+0x28/0x30
    idxd\_misc\_thread+0x303/0x5a0 \[idxd\]
    ? \_\_schedule+0x369/0xb40
    ? \_\_pfx\_irq\_thread\_fn+0x10/0x10
    ? irq\_thread+0xbc/0x1b0
    irq\_thread\_fn+0x21/0x70
    irq\_thread+0x102/0x1b0
    ? preempt\_count\_add+0x74/0xa0
    ? \_\_pfx\_irq\_thread\_dtor+0x10/0x10
    ? \_\_pfx\_irq\_thread+0x10/0x10
    kthread+0x103/0x140
    ? \_\_pfx\_kthread+0x10/0x10
    ret\_from\_fork+0x31/0x50
    ? \_\_pfx\_kthread+0x10/0x10
    ret\_from\_fork\_asm+0x1b/0x30
    \</TASK\>

The current implementation uses a spinlock to protect event log workqueue
and will lead to the Call Trace due to potential task rescheduling.

To address the locking issue, convert the spinlock to mutex, allowing
the drain\_workqueue() to be called in a safe mutex-locked context.

This change ensures proper synchronization when accessing the event log
workqueue, preventing potential Call Trace and improving the overall
robustness of the code.

## Affected and fixed versions

- Linux: \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< 758071a35d9f3ffd84ff12169d081412a2f5f098; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< c9b732a9f73eadc638abdcf0a6d39bc7a0c1af5f; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< d5638de827cff0fce77007e426ec0ffdedf68a44 (cvelist)
- Linux: 6.4 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2024-35991.md
Affected: Linux >= c40bd7d9737bdcfb02d42765bc6c59b338151123, < 758071a35d9f3ffd84ff12169d081412a2f5f098; >= c40bd7d9737bdcfb02d42765bc6c59b338151123, < c9b732a9f73eadc638abdcf0a6d39bc7a0c1af5f; >= c40bd7d9737bdcfb02d42765bc6c59b338151123, < d5638de827cff0fce77007e426ec0ffdedf68a44; Linux 6.4
Fixed in: Linux 758071a35d9f3ffd84ff12169d081412a2f5f098

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

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

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

Medium: CVSS 5.5 (v3.1, scored by NVD). Not remotely exploitable (local or adjacent access needed).

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

Linux \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< 758071a35d9f3ffd84ff12169d081412a2f5f098; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< c9b732a9f73eadc638abdcf0a6d39bc7a0c1af5f; \>= c40bd7d9737bdcfb02d42765bc6c59b338151123, \< d5638de827cff0fce77007e426ec0ffdedf68a44; Linux 6.4.

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

Yes. Fixed in Linux 758071a35d9f3ffd84ff12169d081412a2f5f098. No fix listed yet: follow the vendor advisory.

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

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/758071a35d9f3ffd84ff12169d081412a2f5f098>
- patch: <https://git.kernel.org/stable/c/c9b732a9f73eadc638abdcf0a6d39bc7a0c1af5f>
- patch: <https://git.kernel.org/stable/c/d5638de827cff0fce77007e426ec0ffdedf68a44>

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

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