# CVE-2025-38731: drm/xe: Fix vm\_bind\_ioctl double free bug

> 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.24% (percentile 9, 2026-11-26)
- **CWE:** CWE-415
- **Published:** 2025-09-05T17:20:30.618Z
- **Modified:** 2026-10-19T21:10:00.160Z

## Who should check

- Anyone running Linux \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 77a946bf1af0e8110ef6e243394217a17f9b7e33; \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 111fb43a557726079a67ce3ab51f602ddbf7097e
- Anyone running Linux 6.15

## Description

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

drm/xe: Fix vm\_bind\_ioctl double free bug

If the argument check during an array bind fails, the bind\_ops are freed
twice as seen below. Fix this by setting bind\_ops to NULL after freeing.

==================================================================
BUG: KASAN: double-free in xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
Free of addr ffff88813bb9b800 by task xe\_vm/14198

CPU: 5 UID: 0 PID: 14198 Comm: xe\_vm Not tainted 6.16.0-xe-eudebug-cmanszew+ \#520 PREEMPT(full)
Hardware name: Intel Corporation Alder Lake Client Platform/AlderLake-P DDR5 RVP, BIOS ADLPFWI1.R00.2411.A02.2110081023 10/08/2021
Call Trace:
 \<TASK\>
 dump\_stack\_lvl+0x82/0xd0
 print\_report+0xcb/0x610
 ? \_\_virt\_addr\_valid+0x19a/0x300
 ? xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
 kasan\_report\_invalid\_free+0xc8/0xf0
 ? xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
 ? xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
 check\_slab\_allocation+0x102/0x130
 kfree+0x10d/0x440
 ? should\_fail\_ex+0x57/0x2f0
 ? xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
 xe\_vm\_bind\_ioctl+0x1b2/0x21f0 \[xe\]
 ? \_\_pfx\_xe\_vm\_bind\_ioctl+0x10/0x10 \[xe\]
 ? \_\_lock\_acquire+0xab9/0x27f0
 ? lock\_acquire+0x165/0x300
 ? drm\_dev\_enter+0x53/0xe0 \[drm\]
 ? find\_held\_lock+0x2b/0x80
 ? drm\_dev\_exit+0x30/0x50 \[drm\]
 ? drm\_ioctl\_kernel+0x128/0x1c0 \[drm\]
 drm\_ioctl\_kernel+0x128/0x1c0 \[drm\]
 ? \_\_pfx\_xe\_vm\_bind\_ioctl+0x10/0x10 \[xe\]
 ? find\_held\_lock+0x2b/0x80
 ? \_\_pfx\_drm\_ioctl\_kernel+0x10/0x10 \[drm\]
 ? should\_fail\_ex+0x57/0x2f0
 ? \_\_pfx\_xe\_vm\_bind\_ioctl+0x10/0x10 \[xe\]
 drm\_ioctl+0x352/0x620 \[drm\]
 ? \_\_pfx\_drm\_ioctl+0x10/0x10 \[drm\]
 ? \_\_pfx\_rpm\_resume+0x10/0x10
 ? do\_raw\_spin\_lock+0x11a/0x1b0
 ? find\_held\_lock+0x2b/0x80
 ? \_\_pm\_runtime\_resume+0x61/0xc0
 ? rcu\_is\_watching+0x20/0x50
 ? trace\_irq\_enable.constprop.0+0xac/0xe0
 xe\_drm\_ioctl+0x91/0xc0 \[xe\]
 \_\_x64\_sys\_ioctl+0xb2/0x100
 ? rcu\_is\_watching+0x20/0x50
 do\_syscall\_64+0x68/0x2e0
 entry\_SYSCALL\_64\_after\_hwframe+0x76/0x7e
RIP: 0033:0x7fa9acb24ded

(cherry picked from commit a01b704527c28a2fd43a17a85f8996b75ec8492a)

## Affected and fixed versions

- Linux: \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 77a946bf1af0e8110ef6e243394217a17f9b7e33; \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 111fb43a557726079a67ce3ab51f602ddbf7097e (cvelist)
- Linux: 6.15 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2025-38731.md
Affected: Linux >= b43e864af0d4e74636c0e1dee857ce3275a84829, < 77a946bf1af0e8110ef6e243394217a17f9b7e33; >= b43e864af0d4e74636c0e1dee857ce3275a84829, < 111fb43a557726079a67ce3ab51f602ddbf7097e; Linux 6.15
Fixed in: Linux 77a946bf1af0e8110ef6e243394217a17f9b7e33, Linux 111fb43a557726079a67ce3ab51f602ddbf7097e

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

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

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

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

Linux \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 77a946bf1af0e8110ef6e243394217a17f9b7e33; \>= b43e864af0d4e74636c0e1dee857ce3275a84829, \< 111fb43a557726079a67ce3ab51f602ddbf7097e; Linux 6.15.

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

Yes. Fixed in Linux 77a946bf1af0e8110ef6e243394217a17f9b7e33, Linux 111fb43a557726079a67ce3ab51f602ddbf7097e. Upgrade Linux to 111fb43a557726079a67ce3ab51f602ddbf7097e or later.

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

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/77a946bf1af0e8110ef6e243394217a17f9b7e33>
- patch: <https://git.kernel.org/stable/c/111fb43a557726079a67ce3ab51f602ddbf7097e>

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

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