CVE-2026-139214
perf: Fix UAF in attach_task_ctx_data()
Check your servers for CVE-2026-139214
The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-139214 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.
Description
In the Linux kernel, the following vulnerability has been resolved:
perf: Fix UAF in attach_task_ctx_data()
struct perf_ctx_data is RCU protected. In attach_task_ctx_data(), the cmpxchg retry loop runs without holding rcu_read_lock(). If task->perf_ctx_data already holds a pointer (call it `cd1`), then try_cmpxchg(&task->perf_ctx_data, &old, cd) fails and loads old = cd1. A concurrent thread running detach_task_ctx_data() could free cd1 leading to UAF and further memory corruption when cd1 is reclaimed by another thread.
CPU 0: attach_task_ctx_data() CPU 1: detach_task_ctx_data() ----------------------------- ----------------------------- try_cmpxchg(&task->perf_ctx_data, &old, cd2) -> fails; loads old = cd1
refcount_dec_and_test(&cd1->refcount) try_cmpxchg(&task->perf_ctx_data, &cd1, NULL) perf_free_ctx_data_rcu(cd1) [ RCU grace period -> kfree(cd1) ]
refcount_inc_not_zero(&old->refcount) -> UAF on freed cd1
Fix this by taking rcu_read_lock across the race window.
Severity (CVSS)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- Attack vector
- local: the attacker needs local access, or a user has to open a prepared file
- Attack complexity
- low: an attack works without special conditions
- Privileges required
- low: the attacker needs an ordinary user account
- User interaction
- none: nobody has to click or open anything
- Scope
- unchanged: the damage stays inside the vulnerable component
- Impact
- confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)
Exploitation
EPSS 0.18%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 8.38% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from 506e64e710ff9573fd2b86686528762b7901b5e4, before 5d1869d012b475e9165c201a5cc71ad1ac92115a affected from 506e64e710ff9573fd2b86686528762b7901b5e4, before b455bcb13502696e588c7a0e60a196851fb87474 affected from 506e64e710ff9573fd2b86686528762b7901b5e4, before 64ea0e8226ed98d14e0231af1beae10c3d5c043a
Other versions: unaffected
|
| Linux |
affected 6.15 unaffected before 6.15 unaffected from 6.18.65 up to and including 6.18.* unaffected from 7.3.6 up to and including 7.3.* unaffected 7.4-rc1 and later
Other versions: affected
|
Is my server affected?
This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:
uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-139214 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139214
With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:
trivy rootfs --scanners vuln / | grep CVE-2026-139214
trivy image --scanners vuln IMAGE | grep CVE-2026-139214
Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.
References
Other references
- https://git.kernel.org/stable/c/5d1869d012b475e9165c201a5cc71ad1ac92115a git.kernel.org
- https://git.kernel.org/stable/c/b455bcb13502696e588c7a0e60a196851fb87474 git.kernel.org
- https://git.kernel.org/stable/c/64ea0e8226ed98d14e0231af1beae10c3d5c043a git.kernel.org
Source: the record CVE-2026-139214 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.
Vulnpocalypse