CVE-2026-139664
RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT
Check your servers for CVE-2026-139664
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-139664 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:
RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT
The UVERBS_METHOD_GET_CONTEXT handler allocates the ucontext via ib_alloc_ucontext(), which calls rdma_restrack_new() (initialising the kref to 1) and rdma_restrack_set_name(NULL), the latter attaching the current task and taking a task_struct reference. When ib_init_ucontext() subsequently fails, the error path only does:
kfree(attrs->context); attrs->context = NULL;
without first calling rdma_restrack_put() on &attrs->context->res. The kref therefore never reaches zero, restrack_release() is never invoked, and put_task_struct() is never called, so the task_struct reference taken during set_name is leaked permanently.
A local user with access to an RDMA device can repeat this path (e.g. by hitting an RDMA cgroup limit or supplying invalid ucaps) and leak one task_struct reference per attempt, eventually preventing those processes from being reaped or exhausting memory.
The legacy ib_uverbs_get_context() path already handles this correctly at its err_ucontext label, where rdma_restrack_put() precedes kfree(). Mirror that ordering here.
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 7.45% of all scored CVEs. Scores of 1 Dec 2026.
Affected products
As the CNA lists them.
| Product | Versions |
|---|---|
| Linux |
affected from a1123418ba1078037d9fecb72573ff7222dfe201, before e845dc5fa35d90c28861c6a21063f7c73360af75 affected from a1123418ba1078037d9fecb72573ff7222dfe201, before 7f0bac5c52cb3a31a674ca61c25cd0be2151a05d affected from a1123418ba1078037d9fecb72573ff7222dfe201, before c50f84dd10f2b6a0d8fa203b08a48d4bb333a07f affected from a1123418ba1078037d9fecb72573ff7222dfe201, before 7b0cbff7c7e12586dbd55a8ac6a1133da0b7979d affected from a1123418ba1078037d9fecb72573ff7222dfe201, before d1946ab6dbc31ac4fd87123c337fbabe4da539ef affected from a1123418ba1078037d9fecb72573ff7222dfe201, before e47ea092ab3cc9f0074f141f749165c86de42171 affected from a1123418ba1078037d9fecb72573ff7222dfe201, before 02e31eea7c929384b5efe2e80fa22fb42601724a affected from a1123418ba1078037d9fecb72573ff7222dfe201, before 9dcacdc41083cccff74292851bf9fde999e0731a
Other versions: unaffected
|
| Linux |
affected 5.6 unaffected before 5.6 unaffected from 5.10.275 up to and including 5.10.* unaffected from 5.15.226 up to and including 5.15.* unaffected from 6.1.193 up to and including 6.1.* unaffected from 6.6.163 up to and including 6.6.* unaffected from 6.12.119 up to and including 6.12.* 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-139664 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-139664
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-139664
trivy image --scanners vuln IMAGE | grep CVE-2026-139664
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/e845dc5fa35d90c28861c6a21063f7c73360af75 git.kernel.org
- https://git.kernel.org/stable/c/7f0bac5c52cb3a31a674ca61c25cd0be2151a05d git.kernel.org
- https://git.kernel.org/stable/c/c50f84dd10f2b6a0d8fa203b08a48d4bb333a07f git.kernel.org
- https://git.kernel.org/stable/c/7b0cbff7c7e12586dbd55a8ac6a1133da0b7979d git.kernel.org
- https://git.kernel.org/stable/c/d1946ab6dbc31ac4fd87123c337fbabe4da539ef git.kernel.org
- https://git.kernel.org/stable/c/e47ea092ab3cc9f0074f141f749165c86de42171 git.kernel.org
- https://git.kernel.org/stable/c/02e31eea7c929384b5efe2e80fa22fb42601724a git.kernel.org
- https://git.kernel.org/stable/c/9dcacdc41083cccff74292851bf9fde999e0731a git.kernel.org
Source: the record CVE-2026-139664 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