GHSA-V739-P7X4-WQP2

Vulnerability from github – Published: 2026-11-30 15:32 – Updated: 2026-11-30 15:32
VLAI
Details

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.

Show details on source website

{
  "affected": [],
  "aliases": [
    "CVE-2026-139664"
  ],
  "database_specific": {
    "cwe_ids": [],
    "github_reviewed": false,
    "github_reviewed_at": null,
    "nvd_published_at": "2026-11-30T14:19:50Z",
    "severity": null
  },
  "details": "In the Linux kernel, the following vulnerability has been resolved:\n\nRDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT\n\nThe UVERBS_METHOD_GET_CONTEXT handler allocates the ucontext via\nib_alloc_ucontext(), which calls rdma_restrack_new() (initialising the\nkref to 1) and rdma_restrack_set_name(NULL), the latter attaching the\ncurrent task and taking a task_struct reference.  When ib_init_ucontext()\nsubsequently fails, the error path only does:\n\n\tkfree(attrs-\u003econtext);\n\tattrs-\u003econtext = NULL;\n\nwithout first calling rdma_restrack_put() on \u0026attrs-\u003econtext-\u003eres.  The\nkref therefore never reaches zero, restrack_release() is never invoked,\nand put_task_struct() is never called, so the task_struct reference taken\nduring set_name is leaked permanently.\n\nA local user with access to an RDMA device can repeat this path (e.g. by\nhitting an RDMA cgroup limit or supplying invalid ucaps) and leak one\ntask_struct reference per attempt, eventually preventing those processes\nfrom being reaped or exhausting memory.\n\nThe legacy ib_uverbs_get_context() path already handles this correctly\nat its err_ucontext label, where rdma_restrack_put() precedes kfree().\nMirror that ordering here.",
  "id": "GHSA-v739-p7x4-wqp2",
  "modified": "2026-11-30T15:32:40Z",
  "published": "2026-11-30T15:32:40Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139664"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/02e31eea7c929384b5efe2e80fa22fb42601724a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7b0cbff7c7e12586dbd55a8ac6a1133da0b7979d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/7f0bac5c52cb3a31a674ca61c25cd0be2151a05d"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/9dcacdc41083cccff74292851bf9fde999e0731a"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/c50f84dd10f2b6a0d8fa203b08a48d4bb333a07f"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/d1946ab6dbc31ac4fd87123c337fbabe4da539ef"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e47ea092ab3cc9f0074f141f749165c86de42171"
    },
    {
      "type": "WEB",
      "url": "https://git.kernel.org/stable/c/e845dc5fa35d90c28861c6a21063f7c73360af75"
    }
  ],
  "schema_version": "1.4.0",
  "severity": []
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Drag nodes to arrange them. Double-click a related vulnerability to open it, or a source to visit its link. The Physics button on the left tunes the layout and the simulation; the legend at the bottom left hides or shows nodes by kind and by sighting type.

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.
Vulnerability timeline

Sightings and recorded dates, grouped by day · UTC

JSON
How durations are calculated

Following the VTEM framework (Black Hat USA 2015), time to patch starts when the vendor or a coordinator was informed, total time to patch at discovery, and disclosure to patch at public disclosure; vendor response time runs from the report to its acknowledgement. Time to exploit and time unpatched start at the earliest discovery or report, falling back to public disclosure. Unpatched time ends at the first recorded patch, or the calculation time when no patch is recorded. Exploitation to patch shows the interval between those two events; a published proof of concept is a public exploit, not exploitation. The method is described in a publication.

Each result shows its source dates. A negative interval means the end event came first; when date-only inputs leave the order open, the result says so. Date-only inputs are approximate. The earliest evidence wins: KEV report dates and sightings are labelled as such. Records describing another vulnerability are listed but never calculated from, and a PoC alone does not establish exploitation. Missing patch evidence does not prove that no patch exists. Filters below change the event list only.

Events included in the timeline

Loading timeline…


    Loading…

    Loading…

    Loading…

    Related by attack behaviour

    Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.