Skip to main content
VulnerabilityPublished Updated

CVE-2025-40096: Linux kernel · drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies

Affects Linux kernelSource GCVE Database

0

Not known to be exploited · CVSS 7.8 High · fixed in 6.8.0-1052.55~22.04.1 : patch Linux kernel soon.

Data as of 26 Oct 2026, 17:16 UTC

CVSS 3.1 base score
7.8High
How severe the flaw is on the 0–10 CVSS scale.
EPSS
0.1% chance of exploitation in 30 days – higher than 4% of CVEsExploit Prediction Scoring System: the likelihood attackers will use this flaw soon.
Patch
Available – fixed in 6.8.0-1052.55~22.04.1, 6.8.0-1051.57~22.04.1, 6.8.0-1050.53~22.04.1 +2
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H

Exploitation evidence

  1. Disclosed: evidence found.

    CVE published 30 Oct 2025

  2. Detectable: no evidence on record.

    No public nuclei template indexed

  3. Weaponised: no evidence on record.

    No public exploit code indexed in Metasploit or Exploit-DB

  4. Exploited in the wild: no evidence on record.

    Not in CISA KEV and no source reports exploitation

  5. Observed by OffSeq Mirage: no evidence on record.

    No attack traffic recorded by OffSeq Mirage sensors

A missing step is not evidence of safety. Sources: cve.org (opens in a new tab), the Metasploit, Exploit-DB and nuclei-templates index as of 26 Oct 2026.

What to do

Upgrade to a fixed release listed under Affected software.

Affected software

ProductAffectedFixed in
linux-hwe-edgeAffected
  • <6.8.0-1050.53~22.04.1
  • <6.8.0-1051.57~22.04.1
  • <6.8.0-1052.55~22.04.1
  • <6.8.0-106.106~22.04.1
  • <6.8.0-1049.49~22.04.1
Fixed in
  • 6.8.0-1050.53~22.04.1
  • 6.8.0-1051.57~22.04.1
  • 6.8.0-1052.55~22.04.1
  • 6.8.0-106.106~22.04.1
  • 6.8.0-1049.49~22.04.1

AI-suggested

A fix for this vulnerability has been implemented in the Linux kernel. Users and administrators should update to the latest kernel version containing the fix. Since this is not a cloud service, remediation requires applying the official kernel patches or upgrading to a fixed kernel release. Patch status is not explicitly confirmed in the provided data; therefore, check the official Linux kernel advisories or vendor sources for the exact fixed versions and update accordingly.

Description

In the Linux kernel, the following vulnerability has been resolved: drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies When adding dependencies with drm_sched_job_add_dependency(), that function consumes the fence reference both on success and failure, so in the latter case the dma_fence_put() on the error path (xarray failed to expand) is a double free. Interestingly this bug appears to have been present ever since commit ebd5f74255b9 ("drm/sched: Add dependency tracking"), since the code back then looked like this: drm_sched_job_add_implicit_dependencies(): ... for (i = 0; i < fence_count; i++) { ret = drm_sched_job_add_dependency(job, fences[i]); if (ret) break; } for (; i < fence_count; i++) dma_fence_put(fences[i]); Which means for the failing 'i' the dma_fence_put was already a double free. Possibly there were no users at that time, or the test cases were insufficient to hit it. The bug was then only noticed and fixed after commit 9c2ba265352a ("drm/scheduler: use new iterator in drm_sched_job_add_implicit_dependencies v2") landed, with its fixup of commit 4eaf02d6076c ("drm/scheduler: fix drm_sched_job_add_implicit_dependencies"). At that point it was a slightly different flavour of a double free, which commit 963d0b356935 ("drm/scheduler: fix drm_sched_job_add_implicit_dependencies harder") noticed and attempted to fix. But it only moved the double free from happening inside the drm_sched_job_add_dependency(), when releasing the reference not yet obtained, to the caller, when releasing the reference already released by the former in the failure case. As such it is not easy to identify the right target for the fixes tag so lets keep it simple and just continue the chain. While fixing we also improve the comment and explain the reason for taking the reference and not dropping it.

References

Community reviews

Loading reviews…