{
    "dataType": "CVE_RECORD",
    "dataVersion": "5.2",
    "cveMetadata": {
        "cveId": "CVE-2026-139214",
        "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "state": "PUBLISHED",
        "assignerShortName": "Linux",
        "dateReserved": "2026-11-30T13:22:15.920Z",
        "datePublished": "2026-11-30T13:32:38.695Z",
        "dateUpdated": "2026-11-30T13:32:38.695Z"
    },
    "containers": {
        "cna": {
            "providerMetadata": {
                "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
                "shortName": "Linux",
                "dateUpdated": "2026-11-30T13:32:38.695Z"
            },
            "descriptions": [
                {
                    "lang": "en",
                    "value": "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->perf_ctx_data already holds a pointer (call it `cd1`), then\ntry_cmpxchg(&task->perf_ctx_data, &old, 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(&task->perf_ctx_data,\n              &old, cd2)\n    -> fails; loads old = cd1\n\n                                    refcount_dec_and_test(&cd1->refcount)\n                                    try_cmpxchg(&task->perf_ctx_data,\n                                                &cd1, NULL)\n                                    perf_free_ctx_data_rcu(cd1)\n                                    [ RCU grace period -> kfree(cd1) ]\n\n  refcount_inc_not_zero(&old->refcount)\n    -> UAF on freed cd1\n\nFix this by taking rcu_read_lock across the race window."
                }
            ],
            "affected": [
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "unaffected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "kernel/events/core.c"
                    ],
                    "versions": [
                        {
                            "version": "506e64e710ff9573fd2b86686528762b7901b5e4",
                            "lessThan": "5d1869d012b475e9165c201a5cc71ad1ac92115a",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "506e64e710ff9573fd2b86686528762b7901b5e4",
                            "lessThan": "b455bcb13502696e588c7a0e60a196851fb87474",
                            "status": "affected",
                            "versionType": "git"
                        },
                        {
                            "version": "506e64e710ff9573fd2b86686528762b7901b5e4",
                            "lessThan": "64ea0e8226ed98d14e0231af1beae10c3d5c043a",
                            "status": "affected",
                            "versionType": "git"
                        }
                    ]
                },
                {
                    "product": "Linux",
                    "vendor": "Linux",
                    "defaultStatus": "affected",
                    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
                    "programFiles": [
                        "kernel/events/core.c"
                    ],
                    "versions": [
                        {
                            "version": "6.15",
                            "status": "affected"
                        },
                        {
                            "version": "0",
                            "lessThan": "6.15",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "6.18.65",
                            "lessThanOrEqual": "6.18.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.3.6",
                            "lessThanOrEqual": "7.3.*",
                            "status": "unaffected",
                            "versionType": "semver"
                        },
                        {
                            "version": "7.4-rc1",
                            "lessThanOrEqual": "*",
                            "status": "unaffected",
                            "versionType": "original_commit_for_fix"
                        }
                    ]
                }
            ],
            "cpeApplicability": [
                {
                    "nodes": [
                        {
                            "operator": "OR",
                            "negate": false,
                            "cpeMatch": [
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.15",
                                    "versionEndExcluding": "6.18.65"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.15",
                                    "versionEndExcluding": "7.3.6"
                                },
                                {
                                    "vulnerable": true,
                                    "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                                    "versionStartIncluding": "6.15",
                                    "versionEndExcluding": "7.4-rc1"
                                }
                            ]
                        }
                    ]
                }
            ],
            "references": [
                {
                    "url": "https://git.kernel.org/stable/c/5d1869d012b475e9165c201a5cc71ad1ac92115a"
                },
                {
                    "url": "https://git.kernel.org/stable/c/b455bcb13502696e588c7a0e60a196851fb87474"
                },
                {
                    "url": "https://git.kernel.org/stable/c/64ea0e8226ed98d14e0231af1beae10c3d5c043a"
                }
            ],
            "title": "perf: Fix UAF in attach_task_ctx_data()",
            "x_generator": {
                "engine": "bippy-1.2.0"
            }
        }
    }
}