CVE-2025-40166

Source
https://nvd.nist.gov/vuln/detail/CVE-2025-40166
Import Source
https://storage.googleapis.com/osv-test-cve-osv-conversion/osv-output/CVE-2025-40166.json
JSON Data
https://api.test.osv.dev/v1/vulns/CVE-2025-40166
Downstream
Published
2025-11-12T10:26:24Z
Modified
2025-11-12T20:31:52.217372Z
Summary
drm/xe/guc: Check GuC running state before deregistering exec queue
Details

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

drm/xe/guc: Check GuC running state before deregistering exec queue

In normal operation, a registered exec queue is disabled and deregistered through the GuC, and freed only after the GuC confirms completion. However, if the driver is forced to unbind while the exec queue is still running, the user may call exec_destroy() after the GuC has already been stopped and CT communication disabled.

In this case, the driver cannot receive a response from the GuC, preventing proper cleanup of exec queue resources. Fix this by directly releasing the resources when GuC is not running.

Here is the failure dmesg log: " [ 468.089581] ---[ end trace 0000000000000000 ]--- [ 468.089608] pci 0000:03:00.0: [drm] ERROR GT0: GUC ID manager unclean (1/65535) [ 468.090558] pci 0000:03:00.0: [drm] GT0: total 65535 [ 468.090562] pci 0000:03:00.0: [drm] GT0: used 1 [ 468.090564] pci 0000:03:00.0: [drm] GT0: range 1..1 (1) [ 468.092716] ------------[ cut here ]------------ [ 468.092719] WARNING: CPU: 14 PID: 4775 at drivers/gpu/drm/xe/xettmvrammgr.c:298 ttmvrammgrfini+0xf8/0x130 [xe] "

v2: use xeucfwisrunning() instead of xegucct_enabled(). As CT may go down and come back during VF migration.

(cherry picked from commit 9b42321a02c50a12b2beb6ae9469606257fbecea)

References

Affected packages

Git / git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git

Affected ranges

Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
dd08ebf6c3525a7ea2186e636df064ea47281987
Fixed
2c6e5904c5bdbac8e0eadee40f70c42bb83f6dc6
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
dd08ebf6c3525a7ea2186e636df064ea47281987
Fixed
fa708415566bbe5361c935645107319f8edc8dc1
Type
GIT
Repo
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
Events
Introduced
dd08ebf6c3525a7ea2186e636df064ea47281987
Fixed
9f64b3cd051b825de0a2a9f145c8e003200cedd5

Affected versions

v6.*

v6.10
v6.10-rc1
v6.10-rc2
v6.10-rc3
v6.10-rc4
v6.10-rc5
v6.10-rc6
v6.10-rc7
v6.11
v6.11-rc1
v6.11-rc2
v6.11-rc3
v6.11-rc4
v6.11-rc5
v6.11-rc6
v6.11-rc7
v6.12
v6.12-rc1
v6.12-rc2
v6.12-rc3
v6.12-rc4
v6.12-rc5
v6.12-rc6
v6.12-rc7
v6.12.1
v6.12.10
v6.12.11
v6.12.12
v6.12.13
v6.12.14
v6.12.15
v6.12.16
v6.12.17
v6.12.18
v6.12.19
v6.12.2
v6.12.20
v6.12.21
v6.12.22
v6.12.23
v6.12.24
v6.12.25
v6.12.26
v6.12.27
v6.12.28
v6.12.29
v6.12.3
v6.12.30
v6.12.31
v6.12.32
v6.12.33
v6.12.34
v6.12.35
v6.12.36
v6.12.37
v6.12.38
v6.12.39
v6.12.4
v6.12.40
v6.12.41
v6.12.42
v6.12.43
v6.12.44
v6.12.45
v6.12.46
v6.12.47
v6.12.48
v6.12.49
v6.12.5
v6.12.50
v6.12.51
v6.12.52
v6.12.53
v6.12.54
v6.12.6
v6.12.7
v6.12.8
v6.12.9
v6.13
v6.13-rc1
v6.13-rc2
v6.13-rc3
v6.13-rc4
v6.13-rc5
v6.13-rc6
v6.13-rc7
v6.14
v6.14-rc1
v6.14-rc2
v6.14-rc3
v6.14-rc4
v6.14-rc5
v6.14-rc6
v6.14-rc7
v6.15
v6.15-rc1
v6.15-rc2
v6.15-rc3
v6.15-rc4
v6.15-rc5
v6.15-rc6
v6.15-rc7
v6.16
v6.16-rc1
v6.16-rc2
v6.16-rc3
v6.16-rc4
v6.16-rc5
v6.16-rc6
v6.16-rc7
v6.17
v6.17-rc1
v6.17-rc2
v6.17-rc3
v6.17-rc4
v6.17-rc5
v6.17-rc6
v6.17-rc7
v6.17.1
v6.17.2
v6.17.3
v6.17.4
v6.18-rc1
v6.7
v6.7-rc4
v6.7-rc5
v6.7-rc6
v6.7-rc7
v6.7-rc8
v6.8
v6.8-rc1
v6.8-rc2
v6.8-rc3
v6.8-rc4
v6.8-rc5
v6.8-rc6
v6.8-rc7
v6.9
v6.9-rc1
v6.9-rc2
v6.9-rc3
v6.9-rc4
v6.9-rc5
v6.9-rc6
v6.9-rc7

Database specific

vanir_signatures

[
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@fa708415566bbe5361c935645107319f8edc8dc1",
        "signature_type": "Line",
        "target": {
            "file": "drivers/gpu/drm/xe/xe_guc_submit.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "282368445160951717949483125343051967825",
                "224587300542677934579724182048346589533",
                "27122568096243117006758620885152022883",
                "268174415912166299098342273293587373177",
                "14031209810185955184992683500519863495",
                "191348281491398147095686191441037020738",
                "20409965680023289403456395088653982076",
                "109063443688687676591945464282001667542"
            ]
        },
        "id": "CVE-2025-40166-00752567"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@9f64b3cd051b825de0a2a9f145c8e003200cedd5",
        "signature_type": "Line",
        "target": {
            "file": "drivers/gpu/drm/xe/xe_guc_submit.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "282368445160951717949483125343051967825",
                "224587300542677934579724182048346589533",
                "27122568096243117006758620885152022883",
                "268174415912166299098342273293587373177",
                "14031209810185955184992683500519863495",
                "191348281491398147095686191441037020738",
                "20409965680023289403456395088653982076",
                "109063443688687676591945464282001667542"
            ]
        },
        "id": "CVE-2025-40166-df3cc85b"
    },
    {
        "signature_version": "v1",
        "source": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git@2c6e5904c5bdbac8e0eadee40f70c42bb83f6dc6",
        "signature_type": "Line",
        "target": {
            "file": "drivers/gpu/drm/xe/xe_guc_submit.c"
        },
        "deprecated": false,
        "digest": {
            "threshold": 0.9,
            "line_hashes": [
                "282368445160951717949483125343051967825",
                "224587300542677934579724182048346589533",
                "27122568096243117006758620885152022883",
                "268174415912166299098342273293587373177",
                "270841287146727312929591832127057387337",
                "246528044639992843644808259965594716336",
                "20409965680023289403456395088653982076",
                "333262069466255937790675659613056324701"
            ]
        },
        "id": "CVE-2025-40166-e7453cbd"
    }
]

Linux / Kernel

Package

Name
Kernel

Affected ranges

Type
ECOSYSTEM
Events
Introduced
6.8.0
Fixed
6.12.55
Type
ECOSYSTEM
Events
Introduced
6.13.0
Fixed
6.17.5