# CVE-2025-40329: drm/sched: Fix deadlock in drm\_sched\_entity\_kill\_jobs\_cb

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

- **Severity:** UNSCORED
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Unknown
- **EPSS:** 0.28% (percentile 13, 2026-11-26)
- **Published:** 2025-12-09T04:09:46.156Z
- **Modified:** 2026-10-14T22:10:00.210Z

## Who should check

- Anyone running Linux \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 70150b9443dddf02157d821c68abf438f55a2e8e; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 0d63031ee4a57be0252cb9a4e09ae921c75cece9; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 3e8ada4fd838e3fd2cca94000dac054f3a347c01; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 487df8b698345dd5a91346335f05170ed5f29d4e
- Anyone running Linux 6.2

## Description

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

drm/sched: Fix deadlock in drm\_sched\_entity\_kill\_jobs\_cb

The Mesa issue referenced below pointed out a possible deadlock:

\[ 1231.611031\]  Possible interrupt unsafe locking scenario:

\[ 1231.611033\]        CPU0                    CPU1
\[ 1231.611034\]        ----                    ----
\[ 1231.611035\]   lock(&xa-\>xa\_lock\#17);
\[ 1231.611038\]                                local\_irq\_disable();
\[ 1231.611039\]                                lock(&fence-\>lock);
\[ 1231.611041\]                                lock(&xa-\>xa\_lock\#17);
\[ 1231.611044\]   \<Interrupt\>
\[ 1231.611045\]     lock(&fence-\>lock);
\[ 1231.611047\]
                \*\*\* DEADLOCK \*\*\*

In this example, CPU0 would be any function accessing job-\>dependencies
through the xa\_\* functions that don't disable interrupts (eg:
drm\_sched\_job\_add\_dependency(), drm\_sched\_entity\_kill\_jobs\_cb()).

CPU1 is executing drm\_sched\_entity\_kill\_jobs\_cb() as a fence signalling
callback so in an interrupt context. It will deadlock when trying to
grab the xa\_lock which is already held by CPU0.

Replacing all xa\_\* usage by their xa\_\*\_irq counterparts would fix
this issue, but Christian pointed out another issue: dma\_fence\_signal
takes fence.lock and so does dma\_fence\_add\_callback.

  dma\_fence\_signal() // locks f1.lock
  -\> drm\_sched\_entity\_kill\_jobs\_cb()
  -\> foreach dependencies
     -\> dma\_fence\_add\_callback() // locks f2.lock

This will deadlock if f1 and f2 share the same spinlock.

To fix both issues, the code iterating on dependencies and re-arming them
is moved out to drm\_sched\_entity\_kill\_jobs\_work().

\[phasta: commit message nits\]

## Affected and fixed versions

- Linux: \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 70150b9443dddf02157d821c68abf438f55a2e8e; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 0d63031ee4a57be0252cb9a4e09ae921c75cece9; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 3e8ada4fd838e3fd2cca94000dac054f3a347c01; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 487df8b698345dd5a91346335f05170ed5f29d4e (cvelist)
- Linux: 6.2 (cvelist)

## Mitigation

- Upgrade Linux to 487df8b698345dd5a91346335f05170ed5f29d4e or later.

## Check your systems with an agent

Paste this into a coding agent:

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

Details: https://flawdb.com/CVE-2025-40329.md
Affected: Linux >= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, < 70150b9443dddf02157d821c68abf438f55a2e8e; >= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, < 0d63031ee4a57be0252cb9a4e09ae921c75cece9; >= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, < 3e8ada4fd838e3fd2cca94000dac054f3a347c01; >= 2fdb8a8f07c2f1353770a32…
Fixed in: Linux 70150b9443dddf02157d821c68abf438f55a2e8e, Linux 0d63031ee4a57be0252cb9a4e09ae921c75cece9, Linux 3e8ada4fd838e3fd2cca94000dac054f3a347c01, Linux 487df8b698345dd5a91346335f05170ed5f29d4e

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-2025-40329 being exploited?

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

### How serious is CVE-2025-40329?

It has no CVSS score yet. Unknown.

### Which versions are affected by CVE-2025-40329?

Linux \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 70150b9443dddf02157d821c68abf438f55a2e8e; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 0d63031ee4a57be0252cb9a4e09ae921c75cece9; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 3e8ada4fd838e3fd2cca94000dac054f3a347c01; \>= 2fdb8a8f07c2f1353770a324fd19b8114e4329ac, \< 487df8b698345dd5a91346335f05170ed5f29d4e; Linux 6.2.

### Is there a fix for CVE-2025-40329?

Yes. Fixed in Linux 70150b9443dddf02157d821c68abf438f55a2e8e, Linux 0d63031ee4a57be0252cb9a4e09ae921c75cece9, Linux 3e8ada4fd838e3fd2cca94000dac054f3a347c01, Linux 487df8b698345dd5a91346335f05170ed5f29d4e. Upgrade Linux to 487df8b698345dd5a91346335f05170ed5f29d4e or later.

### How do I check if I'm affected by CVE-2025-40329?

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

- other: <https://git.kernel.org/stable/c/70150b9443dddf02157d821c68abf438f55a2e8e>
- other: <https://git.kernel.org/stable/c/0d63031ee4a57be0252cb9a4e09ae921c75cece9>
- other: <https://git.kernel.org/stable/c/3e8ada4fd838e3fd2cca94000dac054f3a347c01>
- other: <https://git.kernel.org/stable/c/487df8b698345dd5a91346335f05170ed5f29d4e>

## 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-2025-40329>

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