CVE-2025-21880: drm/xe/userptr: fix EFAULT handling

Published Mar 27, 2025
·
Updated

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

drm/xe/userptr: fix EFAULT handling

Currently we treat EFAULT from hmmrangefault() as a non-fatal error when called from xevmuserptrpin() with the idea that we want to avoid killing the entire vm and chucking an error, under the assumption that the user just did an unmap or something, and has no intention of actually touching that memory from the GPU. At this point we have already zapped the PTEs so any access should generate a page fault, and if the pin fails there also it will then become fatal.

However it looks like it's possible for the userptr vma to still be on the rebind list in preemptrebindworkfunc(), if we had to retry the pin again due to something happening in the caller before we did the rebind step, but in the meantime needing to re-validate the userptr and this time hitting the EFAULT.

This explains an internal user report of hitting:

[ 191.738349] WARNING: CPU: 1 PID: 157 at drivers/gpu/drm/xe/xerescursor.h:158 xeptstagebind.constprop.0+0x60a/0x6b0 [xe] [ 191.738551] Workqueue: xe-ordered-wq preemptrebindworkfunc [xe] [ 191.738616] RIP: 0010:xeptstagebind.constprop.0+0x60a/0x6b0 [xe] [ 191.738690] Call Trace: [ 191.738692] <TASK> [ 191.738694] ? showregs+0x69/0x80 [ 191.738698] ? warn+0x93/0x1a0 [ 191.738703] ? xeptstagebind.constprop.0+0x60a/0x6b0 [xe] [ 191.738759] ? reportbug+0x18f/0x1a0 [ 191.738764] ? handlebug+0x63/0xa0 [ 191.738767] ? excinvalidop+0x19/0x70 [ 191.738770] ? asmexcinvalidop+0x1b/0x20 [ 191.738777] ? xeptstagebind.constprop.0+0x60a/0x6b0 [xe] [ 191.738834] ? retfromforkasm+0x1a/0x30 [ 191.738849] bindopprepare+0x105/0x7b0 [xe] [ 191.738906] ? dmaresvreservefences+0x301/0x380 [ 191.738912] xeptupdateopsprepare+0x28c/0x4b0 [xe] [ 191.738966] ? kmemleakalloc+0x4b/0x80 [ 191.738973] opsexecute+0x188/0x9d0 [xe] [ 191.739036] xevmrebind+0x4ce/0x5a0 [xe] [ 191.739098] ? tracehardirqson+0x4d/0x60 [ 191.739112] preemptrebindworkfunc+0x76f/0xd00 [xe]

Followed by NPD, when running some workload, since the sg was never actually populated but the vma is still marked for rebind when it should be skipped for this special EFAULT case. This is confirmed to fix the user report.

v2 (MattB): - Move earlier. v3 (MattB): - Update the commit message to make it clear that this indeed fixes the issue.

(cherry picked from commit 6b93cb98910c826c2e2004942f8b060311e43618)

Affected Software

12 affected componentsFixes available
Linux Foundation Linux Kernel
Linux Linux kernel>=6.10<6.12.18
Linux Linux kernel>=6.13<6.13.6
Linux Linux kernel=6.14-rc1
Linux Linux kernel=6.14-rc2
Linux Linux kernel=6.14-rc3
Linux Linux kernel=6.14-rc4
debian/linux<6.12.19-1
6.12.19-1
debian/linux<6.12.19-1
6.12.19-1
linux/kernel>=6.10.0<6.12.18
6.12.18
linux/kernel>=6.13.0<6.13.6
6.13.6
debian/linux
6.1.176-16.1.190-16.12.107-16.12.115-27.2.15-1

Remediation

Recommended actions to resolve this vulnerability, in priority order.

  1. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.12.19-1
  2. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.12.18
  3. Upgrade

    Upgrade linux/Kernel to a version that resolves this vulnerability.

    Fixed in 6.13.6
  4. Upgrade

    Upgrade debian/linux to a version that resolves this vulnerability.

    Fixed in 6.1.176-1Fixed in 6.1.190-1Fixed in 6.12.107-1Fixed in 6.12.115-2Fixed in 7.2.15-1
  5. Upgrade

    Upgrade to a fixed release to a version that resolves this vulnerability.

    Patch 6b93cb98910c826c2e2004942f8b060311e43618

Event History

Mar 27, 2025
CVE Published
via MITRE·02:57 PM
Data Sourced
via MITRE·02:57 PM
Description
Data Sourced
via OSV·02:57 PM
DescriptionAffected Software
Data Sourced
via NVD·03:15 PM
RemedyDescriptionSeverityAffected Software
Data Sourced
via OSV·03:15 PM
Severity

Frequently Asked Questions

1

What is the severity of CVE-2025-21880?

CVE-2025-21880 is considered a medium severity vulnerability in the Linux kernel.

2

How do I fix CVE-2025-21880?

To mitigate CVE-2025-21880, ensure that you update your Linux kernel to the latest patched version.

3

What are the potential impacts of CVE-2025-21880?

The potential impact of CVE-2025-21880 includes non-fatal errors during memory operations in the Linux kernel.

4

Is my system vulnerable to CVE-2025-21880?

Systems running affected versions of the Linux kernel may be vulnerable to CVE-2025-21880, so checking your kernel version is advised.

5

What kind of systems are affected by CVE-2025-21880?

CVE-2025-21880 affects systems using the Linux kernel specifically with the drm/xe subsystem.

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203