{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "7264bc10c7c657a54603c7fc058bf8e15f18ce12"
            },
            {
              "fixed": "6caf097214b892ef6e033c4a2795297a9633c338"
            },
            {
              "fixed": "5e6b21bce9d939b564e1f1c88a429cfa1fe66d3a"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "7.3.0"
            },
            {
              "fixed": "7.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139675.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\ndrm/amdgpu: reserve eviction-fence slot at WPTR caller\n\nRoot cause analysis showed that the previous workaround was fixing the\nsymptom in the wrong layer.\n\nProblem:\n  kernel BUG at drivers/dma-buf/dma-resv.c:319!\n  BUG_ON(fobj-\u003enum_fences \u003e= fobj-\u003emax_fences)\n  Workqueue: events amdgpu_userq_restore_worker\n\n- amdgpu_evf_mgr_attach_fence() had been temporarily taught to reserve/add\n  fence bookkeeping internally as a workaround.\n- This hid the real contract violation and made reservation policy implicit\n  inside a helper.\n\nReview clarification:\n- The helper-side dma_resv_add_fence-related workaround was only an intended\n  proposal sent for review discussion, not the final direction.\n- Final fix keeps fence-slot reservation explicit in callers and leaves the\n  helper free of policy decisions.\n\nFindings from investigation:\n- drm_exec_prepare_obj() both locks and reserves fence slots.\n- drm_exec_lock_obj() only locks and does not reserve slots.\n- Existing attach_fence callers in the GEM/userq restore flows already reserve\n  TTM_NUM_MOVE_FENCES + 1 before adding the bookkeeping eviction fence.\n- The WPTR mapping path in mes_userq_create_wptr_mapping() used\n  drm_exec_lock_obj() and then called amdgpu_evf_mgr_attach_fence(), so this\n  specific path could add a fence without pre-reserved space.\n\nFix:\n- Switch the WPTR mapping path to drm_exec_prepare_obj(...,\n  TTM_NUM_MOVE_FENCES + 1), restoring the caller-side reservation contract.\n- Remove the helper-side reservation workaround from\n  amdgpu_evf_mgr_attach_fence().\n\nWhy this is the right layer:\n- Reservation policy stays explicit at call sites that define how many fences\n  may be added in that execution context.\n- The helper only performs validate + add_fence when called with a properly\n  prepared reservation object, matching the existing drm_exec model.",
  "id": "CVE-2026-139675",
  "modified": "2026-11-30T14:45:34.125839419Z",
  "published": "2026-11-30T13:36:56.611Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/5e6b21bce9d939b564e1f1c88a429cfa1fe66d3a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/6caf097214b892ef6e033c4a2795297a9633c338"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139675.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139675"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "drm/amdgpu: reserve eviction-fence slot at WPTR caller"
}