Skip to content
FlawDB
Sign in
Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

CVE-2025-40096

HIGH 7.8EPSS 9%

drm/sched: Fix potential double free in drm_sched_job_add_resv_dependencies

Mitigation

  • Upgrade Linux to 5801e65206b065b0b2af032f7f1eef222aa2fd83 or later.

Who should check

  • Anyone running Linux >= 963d0b3569354230f6e2c36a286ef270a8901878, < 4c38a63ae12ecc9370a7678077bde2d61aa80e9c; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 57239762aa90ad768dac055021f27705dae73344; >= 963d0b3569354230f6e2c36a286ef270a8901878, < e5e3eb2aff92994ee81ce633f1c4e73bd4b87e11; >= 963d0b3569354230f6e2c36a286ef270a8901878, < fdfb47e85af1e11ec822c82739dde2dd8dff5115; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 5801e65206b065b0b2af032f7f1eef222aa2fd83
  • Anyone running Linux 5.16

Vulnerability facts

Affected
Linux >= 963d0b3569354230f6e2c36a286ef270a8901878, < 4c38a63ae12ecc9370a7678077bde2d61aa80e9c; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 57239762aa90ad768dac055021f27705dae73344; >= 963d0b3569354230f6e2c36a286ef270a8901878, < e5e3eb2aff92994ee81ce633f1c4e73bd4b87e11; >= 963d0b3569354230f6e2c36a286ef270a8901878, < fdfb47e85af1e11ec822c82739dde2dd8dff5115; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 5801e65206b065b0b2af032f7f1eef222aa2fd83; Linux 5.16
Fixed in
Linux 4c38a63ae12ecc9370a7678077bde2d61aa80e9c, Linux 57239762aa90ad768dac055021f27705dae73344, Linux 5801e65206b065b0b2af032f7f1eef222aa2fd83
Exploited in the wild
Not in CISA KEV
Public exploit / PoC
None known
Remote exploitation
Not remotely exploitable (local or adjacent access needed)
CVSS
7.8 (v3.1, CNA)CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:HOpen in CVSS calculator
Show all 8 CVSS metrics
  • Attack vector: Local
  • Attack complexity: Low
  • Privileges required: Low
  • User interaction: None
  • Scope: Unchanged
  • Confidentiality impact: High
  • Integrity impact: High
  • Availability impact: High
EPSS
0.24% chance of exploitation in 30 days (percentile 9, 2026-11-26)
Published
Modified

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.

Affected and fixed versions

Package / productAffectedFixedSource
Linux>= 963d0b3569354230f6e2c36a286ef270a8901878, < 4c38a63ae12ecc9370a7678077bde2d61aa80e9c; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 57239762aa90ad768dac055021f27705dae73344; >= 963d0b3569354230f6e2c36a286ef270a8901878, < e5e3eb2aff92994ee81ce633f1c4e73bd4b87e11; >= 963d0b3569354230f6e2c36a286ef270a8901878, < fdfb47e85af1e11ec822c82739dde2dd8dff5115; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 5801e65206b065b0b2af032f7f1eef222aa2fd83—cvelist
Linux5.16—cvelist

Check your systems with an agent

Paste this into Claude Code, Cursor or another coding agent. It only reads; it changes nothing.

Check whether anything I run is affected by CVE-2025-40096. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-40096.md
Affected: Linux >= 963d0b3569354230f6e2c36a286ef270a8901878, < 4c38a63ae12ecc9370a7678077bde2d61aa80e9c; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 57239762aa90ad768dac055021f27705dae73344; >= 963d0b3569354230f6e2c36a286ef270a8901878, < e5e3eb2aff92994ee81ce633f1c4e73bd4b87e11; >= 963d0b3569354230f6e2c36…
Fixed in: Linux 4c38a63ae12ecc9370a7678077bde2d61aa80e9c, Linux 57239762aa90ad768dac055021f27705dae73344, Linux 5801e65206b065b0b2af032f7f1eef222aa2fd83

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.

References

FAQ

Is CVE-2025-40096 being exploited?

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

How serious is CVE-2025-40096?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

Which versions are affected by CVE-2025-40096?

Linux >= 963d0b3569354230f6e2c36a286ef270a8901878, < 4c38a63ae12ecc9370a7678077bde2d61aa80e9c; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 57239762aa90ad768dac055021f27705dae73344; >= 963d0b3569354230f6e2c36a286ef270a8901878, < e5e3eb2aff92994ee81ce633f1c4e73bd4b87e11; >= 963d0b3569354230f6e2c36a286ef270a8901878, < fdfb47e85af1e11ec822c82739dde2dd8dff5115; >= 963d0b3569354230f6e2c36a286ef270a8901878, < 5801e65206b065b0b2af032f7f1eef222aa2fd83; Linux 5.16.

Is there a fix for CVE-2025-40096?

Yes. Fixed in Linux 4c38a63ae12ecc9370a7678077bde2d61aa80e9c, Linux 57239762aa90ad768dac055021f27705dae73344, Linux 5801e65206b065b0b2af032f7f1eef222aa2fd83. Upgrade Linux to 5801e65206b065b0b2af032f7f1eef222aa2fd83 or later.

How do I check if I'm affected by CVE-2025-40096?

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.

Sponsors