# CVE-2024-49942: drm/xe: Prevent null pointer access in xe\_migrate\_copy

> 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.30% (percentile 15, 2026-11-26)
- **CWE:** CWE-476
- **Published:** 2024-10-21T18:02:01.043Z
- **Modified:** 2026-06-17T08:00:47.020Z

## Who should check

- Anyone running Linux \>= 266c85885263022954928b125d46ab7a78c77a69, \< 16e0267db156f8a4ea16bfb3ac3f5743c9698df3; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 8f5199b6971f0717c2d31685953971fa2e1b9e1a; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79
- Anyone running Linux 6.8

## Description

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

drm/xe: Prevent null pointer access in xe\_migrate\_copy

xe\_migrate\_copy designed to copy content of TTM resources. When source
resource is null, it will trigger a NULL pointer dereference in
xe\_migrate\_copy. To avoid this situation, update lacks source flag to
true for this case, the flag will trigger xe\_migrate\_clear rather than
xe\_migrate\_copy.

Issue trace:
\<7\> \[317.089847\] xe 0000:00:02.0: \[drm:xe\_migrate\_copy \[xe\]\] Pass 14,
 sizes: 4194304 & 4194304
\<7\> \[317.089945\] xe 0000:00:02.0: \[drm:xe\_migrate\_copy \[xe\]\] Pass 15,
 sizes: 4194304 & 4194304
\<1\> \[317.128055\] BUG: kernel NULL pointer dereference, address:
 0000000000000010
\<1\> \[317.128064\] \#PF: supervisor read access in kernel mode
\<1\> \[317.128066\] \#PF: error\_code(0x0000) - not-present page
\<6\> \[317.128069\] PGD 0 P4D 0
\<4\> \[317.128071\] Oops: Oops: 0000 \[\#1\] PREEMPT SMP NOPTI
\<4\> \[317.128074\] CPU: 1 UID: 0 PID: 1440 Comm: kunit\_try\_catch Tainted:
 G     U           N 6.11.0-rc7-xe \#1
\<4\> \[317.128078\] Tainted: \[U\]=USER, \[N\]=TEST
\<4\> \[317.128080\] Hardware name: Intel Corporation Lunar Lake Client
 Platform/LNL-M LP5 RVP1, BIOS LNLMFWI1.R00.3221.D80.2407291239 07/29/2024
\<4\> \[317.128082\] RIP: 0010:xe\_migrate\_copy+0x66/0x13e0 \[xe\]
\<4\> \[317.128158\] Code: 00 00 48 89 8d e0 fe ff ff 48 8b 40 10 4c 89 85 c8
 fe ff ff 44 88 8d bd fe ff ff 65 48 8b 3c 25 28 00 00 00 48 89 7d d0 31
 ff \<8b\> 79 10 48 89 85 a0 fe ff ff 48 8b 00 48 89 b5 d8 fe ff ff 83 ff
\<4\> \[317.128162\] RSP: 0018:ffffc9000167f9f0 EFLAGS: 00010246
\<4\> \[317.128164\] RAX: ffff8881120d8028 RBX: ffff88814d070428 RCX:
 0000000000000000
\<4\> \[317.128166\] RDX: ffff88813cb99c00 RSI: 0000000004000000 RDI:
 0000000000000000
\<4\> \[317.128168\] RBP: ffffc9000167fbb8 R08: ffff88814e7b1f08 R09:
 0000000000000001
\<4\> \[317.128170\] R10: 0000000000000001 R11: 0000000000000001 R12:
 ffff88814e7b1f08
\<4\> \[317.128172\] R13: ffff88814e7b1f08 R14: ffff88813cb99c00 R15:
 0000000000000001
\<4\> \[317.128174\] FS:  0000000000000000(0000) GS:ffff88846f280000(0000)
 knlGS:0000000000000000
\<4\> \[317.128176\] CS:  0010 DS: 0000 ES: 0000 CR0: 0000000080050033
\<4\> \[317.128178\] CR2: 0000000000000010 CR3: 000000011f676004 CR4:
 0000000000770ef0
\<4\> \[317.128180\] DR0: 0000000000000000 DR1: 0000000000000000 DR2:
 0000000000000000
\<4\> \[317.128182\] DR3: 0000000000000000 DR6: 00000000ffff07f0 DR7:
 0000000000000400
\<4\> \[317.128184\] PKRU: 55555554
\<4\> \[317.128185\] Call Trace:
\<4\> \[317.128187\]  \<TASK\>
\<4\> \[317.128189\]  ? show\_regs+0x67/0x70
\<4\> \[317.128194\]  ? \_\_die\_body+0x20/0x70
\<4\> \[317.128196\]  ? \_\_die+0x2b/0x40
\<4\> \[317.128198\]  ? page\_fault\_oops+0x15f/0x4e0
\<4\> \[317.128203\]  ? do\_user\_addr\_fault+0x3fb/0x970
\<4\> \[317.128205\]  ? lock\_acquire+0xc7/0x2e0
\<4\> \[317.128209\]  ? exc\_page\_fault+0x87/0x2b0
\<4\> \[317.128212\]  ? asm\_exc\_page\_fault+0x27/0x30
\<4\> \[317.128216\]  ? xe\_migrate\_copy+0x66/0x13e0 \[xe\]
\<4\> \[317.128263\]  ? \_\_lock\_acquire+0xb9d/0x26f0
\<4\> \[317.128265\]  ? \_\_lock\_acquire+0xb9d/0x26f0
\<4\> \[317.128267\]  ? sg\_free\_append\_table+0x20/0x80
\<4\> \[317.128271\]  ? lock\_acquire+0xc7/0x2e0
\<4\> \[317.128273\]  ? mark\_held\_locks+0x4d/0x80
\<4\> \[317.128275\]  ? trace\_hardirqs\_on+0x1e/0xd0
\<4\> \[317.128278\]  ? \_raw\_spin\_unlock\_irqrestore+0x31/0x60
\<4\> \[317.128281\]  ? \_\_pm\_runtime\_resume+0x60/0xa0
\<4\> \[317.128284\]  xe\_bo\_move+0x682/0xc50 \[xe\]
\<4\> \[317.128315\]  ? lock\_is\_held\_type+0xaa/0x120
\<4\> \[317.128318\]  ttm\_bo\_handle\_move\_mem+0xe5/0x1a0 \[ttm\]
\<4\> \[317.128324\]  ttm\_bo\_validate+0xd1/0x1a0 \[ttm\]
\<4\> \[317.128328\]  shrink\_test\_run\_device+0x721/0xc10 \[xe\]
\<4\> \[317.128360\]  ? find\_held\_lock+0x31/0x90
\<4\> \[317.128363\]  ? lock\_release+0xd1/0x2a0
\<4\> \[317.128365\]  ? \_\_pfx\_kunit\_generic\_run\_threadfn\_adapter+0x10/0x10
 \[kunit\]
\<4\> \[317.128370\]  xe\_bo\_shrink\_kunit+0x11/0x20 \[xe\]
\<4\> \[317.128397\]  kunit\_try\_run\_case+0x6e/0x150 \[kunit\]
\<4\> \[317.128400\]  ? trace\_hardirqs\_on+0x1e/0xd0
\<4\> \[317.128402\]  ? \_raw\_spin\_unlock\_irqrestore+0x31/0x60
\<4\> \[317.128404\]  kunit\_generic\_run\_threadfn\_adapter+0x1e/0x40 \[ku
---truncated---

## Affected and fixed versions

- Linux: \>= 266c85885263022954928b125d46ab7a78c77a69, \< 16e0267db156f8a4ea16bfb3ac3f5743c9698df3; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 8f5199b6971f0717c2d31685953971fa2e1b9e1a; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79 (cvelist)
- Linux: 6.8 (cvelist)

## Mitigation

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

Details: https://flawdb.com/CVE-2024-49942.md
Affected: Linux >= 266c85885263022954928b125d46ab7a78c77a69, < 16e0267db156f8a4ea16bfb3ac3f5743c9698df3; >= 266c85885263022954928b125d46ab7a78c77a69, < 8f5199b6971f0717c2d31685953971fa2e1b9e1a; >= 266c85885263022954928b125d46ab7a78c77a69, < 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79; Linux 6.8
Fixed in: Linux 16e0267db156f8a4ea16bfb3ac3f5743c9698df3, Linux 8f5199b6971f0717c2d31685953971fa2e1b9e1a, Linux 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79

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

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

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

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

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

Linux \>= 266c85885263022954928b125d46ab7a78c77a69, \< 16e0267db156f8a4ea16bfb3ac3f5743c9698df3; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 8f5199b6971f0717c2d31685953971fa2e1b9e1a; \>= 266c85885263022954928b125d46ab7a78c77a69, \< 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79; Linux 6.8.

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

Yes. Fixed in Linux 16e0267db156f8a4ea16bfb3ac3f5743c9698df3, Linux 8f5199b6971f0717c2d31685953971fa2e1b9e1a, Linux 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79. Upgrade Linux to 7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79 or later.

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

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/16e0267db156f8a4ea16bfb3ac3f5743c9698df3>
- patch: <https://git.kernel.org/stable/c/8f5199b6971f0717c2d31685953971fa2e1b9e1a>
- patch: <https://git.kernel.org/stable/c/7257d9c9a3c6cfe26c428e9b7ae21d61f2f55a79>

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

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