# CVE-2025-40310: amd/amdkfd: resolve a race in amdgpu\_amdkfd\_device\_fini\_sw

> 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-08T00:46:35.862Z
- **Modified:** 2026-10-14T22:10:00.210Z

## Who should check

- Anyone running Linux \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 93f8d67ef8b50334a26129df4da5a4cb60ad4090; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< bc9e789053abe463f8cf74eee5fc2f157c11a79f; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 99d7181bca34e96fbf61bdb6844918bdd4df2814
- Anyone running Linux 6.5

## Description

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

amd/amdkfd: resolve a race in amdgpu\_amdkfd\_device\_fini\_sw

There is race in amdgpu\_amdkfd\_device\_fini\_sw and interrupt.
if amdgpu\_amdkfd\_device\_fini\_sw run in b/w kfd\_cleanup\_nodes and
  kfree(kfd), and KGD interrupt generated.

kernel panic log:

BUG: kernel NULL pointer dereference, address: 0000000000000098
amdgpu 0000:c8:00.0: amdgpu: Requesting 4 partitions through PSP

PGD d78c68067 P4D d78c68067

kfd kfd: amdgpu: Allocated 3969056 bytes on gart

PUD 1465b8067 PMD @

Oops: @002 \[\#1\] SMP NOPTI

kfd kfd: amdgpu: Total number of KFD nodes to be created: 4
CPU: 115 PID: @ Comm: swapper/115 Kdump: loaded Tainted: G S W OE K

RIP: 0010:\_raw\_spin\_lock\_irqsave+0x12/0x40

Code: 89 e@ 41 5c c3 cc cc cc cc 66 66 2e Of 1f 84 00 00 00 00 00 OF 1f 40 00 Of 1f 44% 00 00 41 54 9c 41 5c fa 31 cO ba 01 00 00 00 \<fO\> OF b1 17 75 Ba 4c 89 e@ 41 Sc

89 c6 e8 07 38 5d

RSP: 0018: ffffc90@1a6b0e28 EFLAGS: 00010046

RAX: 0000000000000000 RBX: 0000000000000000 RCX: 0000000000000018
0000000000000001 RSI: ffff8883bb623e00 RDI: 0000000000000098
ffff8883bb000000 RO8: ffff888100055020 ROO: ffff888100055020
0000000000000000 R11: 0000000000000000 R12: 0900000000000002
ffff888F2b97da0@ R14: @000000000000098 R15: ffff8883babdfo00

CS: 010 DS: 0000 ES: 0000 CRO: 0000000080050033

CR2: 0000000000000098 CR3: 0000000e7cae2006 CR4: 0000000002770ce0
0000000000000000 DR1: 0000000000000000 DR2: 0000000000000000
0000000000000000 DR6: 00000000fffeO7FO DR7: 0000000000000400

PKRU: 55555554

Call Trace:

\<IRQ\>

kgd2kfd\_interrupt+@x6b/0x1f@ \[amdgpu\]

? amdgpu\_fence\_process+0xa4/0x150 \[amdgpu\]

kfd kfd: amdgpu: Node: 0, interrupt\_bitmap: 3 YcpxFl Rant tErace

amdgpu\_irq\_dispatch+0x165/0x210 \[amdgpu\]

amdgpu\_ih\_process+0x80/0x100 \[amdgpu\]

amdgpu: Virtual CRAT table created for GPU

amdgpu\_irq\_handler+0x1f/@x60 \[amdgpu\]

\_\_handle\_irq\_event\_percpu+0x3d/0x170

amdgpu: Topology: Add dGPU node \[0x74a2:0x1002\]

handle\_irq\_event+0x5a/@xcO

handle\_edge\_irq+0x93/0x240

kfd kfd: amdgpu: KFD node 1 partition @ size 49148M

asm\_call\_irq\_on\_stack+0xf/@x20

\</IRQ\>

common\_interrupt+0xb3/0x130

asm\_common\_interrupt+0x1le/0x40

5.10.134-010.a1i5000.a18.x86\_64 \#1

## Affected and fixed versions

- Linux: \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 93f8d67ef8b50334a26129df4da5a4cb60ad4090; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< bc9e789053abe463f8cf74eee5fc2f157c11a79f; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 99d7181bca34e96fbf61bdb6844918bdd4df2814 (cvelist)
- Linux: 6.5 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-40310.md
Affected: Linux >= 74c5b85da75475c73a8f040397610fbfcc2c3e78, < 93f8d67ef8b50334a26129df4da5a4cb60ad4090; >= 74c5b85da75475c73a8f040397610fbfcc2c3e78, < bc9e789053abe463f8cf74eee5fc2f157c11a79f; >= 74c5b85da75475c73a8f040397610fbfcc2c3e78, < 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe; >= 74c5b85da75475c73a8f040…
Fixed in: Linux 93f8d67ef8b50334a26129df4da5a4cb60ad4090, Linux 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe, Linux 99d7181bca34e96fbf61bdb6844918bdd4df2814

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

There is no confirmed exploitation: CVE-2025-40310 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-40310?

It has no CVSS score yet. Unknown.

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

Linux \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 93f8d67ef8b50334a26129df4da5a4cb60ad4090; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< bc9e789053abe463f8cf74eee5fc2f157c11a79f; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe; \>= 74c5b85da75475c73a8f040397610fbfcc2c3e78, \< 99d7181bca34e96fbf61bdb6844918bdd4df2814; Linux 6.5.

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

Yes. Fixed in Linux 93f8d67ef8b50334a26129df4da5a4cb60ad4090, Linux 2f89a2d15550b653caaeeab7ab68c4d7583fd4fe, Linux 99d7181bca34e96fbf61bdb6844918bdd4df2814. Upgrade Linux to 99d7181bca34e96fbf61bdb6844918bdd4df2814 or later.

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

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/93f8d67ef8b50334a26129df4da5a4cb60ad4090>
- other: <https://git.kernel.org/stable/c/bc9e789053abe463f8cf74eee5fc2f157c11a79f>
- other: <https://git.kernel.org/stable/c/2f89a2d15550b653caaeeab7ab68c4d7583fd4fe>
- other: <https://git.kernel.org/stable/c/99d7181bca34e96fbf61bdb6844918bdd4df2814>

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

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