{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "506e64e710ff9573fd2b86686528762b7901b5e4"
            },
            {
              "fixed": "5d1869d012b475e9165c201a5cc71ad1ac92115a"
            },
            {
              "fixed": "b455bcb13502696e588c7a0e60a196851fb87474"
            },
            {
              "fixed": "64ea0e8226ed98d14e0231af1beae10c3d5c043a"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "6.15.0"
            },
            {
              "fixed": "6.18.65"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.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-139214.json"
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nperf: Fix UAF in attach_task_ctx_data()\n\nstruct perf_ctx_data is RCU protected. In attach_task_ctx_data(),\nthe cmpxchg retry loop runs without holding rcu_read_lock(). If\ntask-\u003eperf_ctx_data already holds a pointer (call it `cd1`), then\ntry_cmpxchg(\u0026task-\u003eperf_ctx_data, \u0026old, cd) fails and loads old = cd1.\nA concurrent thread running detach_task_ctx_data() could free cd1\nleading to UAF and further memory corruption when cd1 is reclaimed by\nanother thread.\n\n  CPU 0: attach_task_ctx_data()     CPU 1: detach_task_ctx_data()\n  -----------------------------     -----------------------------\n  try_cmpxchg(\u0026task-\u003eperf_ctx_data,\n              \u0026old, cd2)\n    -\u003e fails; loads old = cd1\n\n                                    refcount_dec_and_test(\u0026cd1-\u003erefcount)\n                                    try_cmpxchg(\u0026task-\u003eperf_ctx_data,\n                                                \u0026cd1, NULL)\n                                    perf_free_ctx_data_rcu(cd1)\n                                    [ RCU grace period -\u003e kfree(cd1) ]\n\n  refcount_inc_not_zero(\u0026old-\u003erefcount)\n    -\u003e UAF on freed cd1\n\nFix this by taking rcu_read_lock across the race window.",
  "id": "CVE-2026-139214",
  "modified": "2026-12-01T06:45:26.750492214Z",
  "published": "2026-11-30T13:32:38.695Z",
  "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/5d1869d012b475e9165c201a5cc71ad1ac92115a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/64ea0e8226ed98d14e0231af1beae10c3d5c043a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/b455bcb13502696e588c7a0e60a196851fb87474"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139214.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139214"
    }
  ],
  "schema_version": "1.9.2",
  "severity": [
    {
      "score": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
      "type": "CVSS_V3"
    }
  ],
  "summary": "perf: Fix UAF in attach_task_ctx_data()"
}