{"id":"CVE-2026-139214","sourceIdentifier":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","published":"2026-11-30T14:18:41.540","lastModified":"2026-12-01T06:17:39.047","vulnStatus":"Received","cveTags":[],"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":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","affectedData":[{"vendor":"Linux","product":"Linux","defaultStatus":"unaffected","programFiles":["kernel/events/core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"506e64e710ff9573fd2b86686528762b7901b5e4","lessThan":"5d1869d012b475e9165c201a5cc71ad1ac92115a","versionType":"git","status":"affected"},{"version":"506e64e710ff9573fd2b86686528762b7901b5e4","lessThan":"b455bcb13502696e588c7a0e60a196851fb87474","versionType":"git","status":"affected"},{"version":"506e64e710ff9573fd2b86686528762b7901b5e4","lessThan":"64ea0e8226ed98d14e0231af1beae10c3d5c043a","versionType":"git","status":"affected"}]},{"vendor":"Linux","product":"Linux","defaultStatus":"affected","programFiles":["kernel/events/core.c"],"repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","versions":[{"version":"6.15","status":"affected"},{"version":"0","lessThan":"6.15","versionType":"semver","status":"unaffected"},{"version":"6.18.65","lessThanOrEqual":"6.18.*","versionType":"semver","status":"unaffected"},{"version":"7.3.6","lessThanOrEqual":"7.3.*","versionType":"semver","status":"unaffected"},{"version":"7.4-rc1","lessThanOrEqual":"*","versionType":"original_commit_for_fix","status":"unaffected"}]}]}],"metrics":{"cvssMetricV31":[{"source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","type":"Secondary","cvssData":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH","attackVector":"LOCAL","attackComplexity":"LOW","privilegesRequired":"LOW","userInteraction":"NONE","scope":"UNCHANGED","confidentialityImpact":"HIGH","integrityImpact":"HIGH","availabilityImpact":"HIGH"},"exploitabilityScore":1.8,"impactScore":5.9}]},"references":[{"url":"https://git.kernel.org/stable/c/5d1869d012b475e9165c201a5cc71ad1ac92115a","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/64ea0e8226ed98d14e0231af1beae10c3d5c043a","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"},{"url":"https://git.kernel.org/stable/c/b455bcb13502696e588c7a0e60a196851fb87474","source":"416baaa9-dc9f-4396-8d5f-8c081fb06d67"}]}