Skip to content
Heist/ feed
Back to feed
UnratedFix available

drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.

Type: advisorySources: OSV

In the Linux kernel, the following vulnerability has been resolved: drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test. I saw an oops in xe_gem_fault when running the xe-fast-feedback testlist against the realtime kernel without debug options enabled. The panic happens after core_hotunplug unbind-rebind finishes. Presumably what happens is that a process mmaps, unlocks because of the FAULT_FLAG_RETRY_NOWAIT logic, has no process memory left, causing ttm_bo_vm_dummy_page() to return VM_FAULT_NOPAGE, since there was nothing left to populate, and then oopses in "mem_type_is_vram(tbo->resource->mem_type)" because tbo->resource is NULL. It's convoluted, but fits the data and explains the oops after the test exits.

Products
Kernel
Affected versions
Not specified
Fixed versions
6.12.58, 6.17.8
CVEs
CVE-2025-40340
Confirmed fixed CVEs
Not specified
Updated in this feed
7 Nov 2026, 02:06 UTC · Revision 1

Source evidence

drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.

core-osv · Original source

Published 9 Dec 2025, 04:09 UTC

In the Linux kernel, the following vulnerability has been resolved: drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test. I saw an oops in xe_gem_fault when running the xe-fast-feedback testlist against the realtime kernel without debug options enabled. The panic happens after core_hotunplug unbind-rebind finishes. Presumably what happens is that a process mmaps, unlocks because of the FAULT_FLAG_RETRY_NOWAIT logic, has no process memory left, causing ttm_bo_vm_dummy_page() to return VM_FAULT_NOPAGE, since there was nothing left to populate, and then oopses in "mem_type_is_vram(tbo->resource->mem_type)" because tbo->resource is NULL. It's convoluted, but fits the data and explains the oops after the test exits.

osv:CVE-2025-40340

Kernel

Fixed versions: 6.12.58, 6.17.8

Complete source record
{
  "id": "3e51304d9a4cc196b79f81c464d1b893489db8c933f6162fb0fb6e01b36ff8da",
  "url": "https://osv.dev/vulnerability/CVE-2025-40340",
  "method": "structured",
  "payload": {
    "kind": "advisory",
    "title": "drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test.",
    "summary": "In the Linux kernel, the following vulnerability has been resolved: drm/xe: Fix oops in xe_gem_fault when running core_hotunplug test. I saw an oops in xe_gem_fault when running the xe-fast-feedback testlist against the realtime kernel without debug options enabled. The panic happens after core_hotunplug unbind-rebind finishes. Presumably what happens is that a process mmaps, unlocks because of the FAULT_FLAG_RETRY_NOWAIT logic, has no process memory left, causing ttm_bo_vm_dummy_page() to return VM_FAULT_NOPAGE, since there was nothing left to populate, and then oopses in \"mem_type_is_vram(tbo->resource->mem_type)\" because tbo->resource is NULL. It's convoluted, but fits the data and explains the oops after the test exits.",
    "evidence": "osv:CVE-2025-40340",
    "products": [
      {
        "name": {
          "value": "Kernel",
          "evidence": "/affected/1/package/name"
        },
        "prerequisites": [],
        "fixed_versions": [
          {
            "value": "6.12.58",
            "evidence": "/affected/1/ranges"
          },
          {
            "value": "6.17.8",
            "evidence": "/affected/1/ranges"
          }
        ],
        "affected_versions": []
      }
    ],
    "severity": "unknown",
    "structured": {
      "id": "CVE-2025-40340",
      "aliases": [
        "CVE-2025-40340"
      ],
      "affected": [
        {
          "ranges": [
            {
              "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
              "type": "GIT",
              "events": [
                {
                  "introduced": "dd08ebf6c3525a7ea2186e636df064ea47281987"
                },
                {
                  "fixed": "99428bd6123d5676209dfb1d7a8f176cc830b665"
                },
                {
                  "fixed": "29a3064f9c5a908aaf0b39cd6ed30374db11840d"
                },
                {
                  "fixed": "1cda3c755bb7770be07d75949bb0f45fb88651f6"
                }
              ]
            }
          ],
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40340.json"
          }
        },
        {
          "ranges": [
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.8.0"
                },
                {
                  "fixed": "6.12.58"
                }
              ]
            },
            {
              "type": "ECOSYSTEM",
              "events": [
                {
                  "introduced": "6.13.0"
                },
                {
                  "fixed": "6.17.8"
                }
              ]
            }
          ],
          "package": {
            "name": "Kernel",
            "ecosystem": "Linux"
          },
          "database_specific": {
            "source": "https://storage.googleapis.com/cve-osv-conversion/osv-output/CVE-2025-40340.json"
          }
        }
      ],
      "modified": "2026-10-28T02:30:49.315165654Z",
      "provider": "osv",
      "references": [
        "https://git.kernel.org/stable/c/1cda3c755bb7770be07d75949bb0f45fb88651f6",
        "https://git.kernel.org/stable/c/29a3064f9c5a908aaf0b39cd6ed30374db11840d",
        "https://git.kernel.org/stable/c/99428bd6123d5676209dfb1d7a8f176cc830b665",
        "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40340.json",
        "https://nvd.nist.gov/vuln/detail/CVE-2025-40340",
        "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
      ],
      "provider_metadata": {
        "cna_assigner": "Linux",
        "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2025/40xxx/CVE-2025-40340.json"
      }
    },
    "related_cves": [
      {
        "value": "CVE-2025-40340",
        "evidence": "/id"
      }
    ],
    "security_relevant": true,
    "severity_evidence": null
  },
  "source_id": "core-osv",
  "document_id": 517231,
  "published_at": "2025-12-09T04:09:57.059+00:00"
}