{
  "affected": [
    {
      "ranges": [
        {
          "events": [
            {
              "introduced": "a1123418ba1078037d9fecb72573ff7222dfe201"
            },
            {
              "fixed": "e845dc5fa35d90c28861c6a21063f7c73360af75"
            },
            {
              "fixed": "7f0bac5c52cb3a31a674ca61c25cd0be2151a05d"
            },
            {
              "fixed": "c50f84dd10f2b6a0d8fa203b08a48d4bb333a07f"
            },
            {
              "fixed": "7b0cbff7c7e12586dbd55a8ac6a1133da0b7979d"
            },
            {
              "fixed": "d1946ab6dbc31ac4fd87123c337fbabe4da539ef"
            },
            {
              "fixed": "e47ea092ab3cc9f0074f141f749165c86de42171"
            },
            {
              "fixed": "02e31eea7c929384b5efe2e80fa22fb42601724a"
            },
            {
              "fixed": "9dcacdc41083cccff74292851bf9fde999e0731a"
            }
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "type": "GIT"
        }
      ]
    },
    {
      "package": {
        "ecosystem": "Linux",
        "name": "Kernel"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "5.6.0"
            },
            {
              "fixed": "5.10.275"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.11.0"
            },
            {
              "fixed": "5.15.226"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "5.16.0"
            },
            {
              "fixed": "6.1.193"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.2.0"
            },
            {
              "fixed": "6.6.163"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.7.0"
            },
            {
              "fixed": "6.12.119"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.13.0"
            },
            {
              "fixed": "6.18.65"
            }
          ],
          "type": "ECOSYSTEM"
        },
        {
          "events": [
            {
              "introduced": "6.19.0"
            },
            {
              "fixed": "7.3.6"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "database_specific": {
    "cna_assigner": "Linux",
    "osv_generated_from": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139664.json"
  },
  "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": "CVE-2026-139664",
  "modified": "2026-11-30T14:46:04.860798410Z",
  "published": "2026-11-30T13:36:50.627Z",
  "references": [
    {
      "type": "PACKAGE",
      "url": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git"
    },
    {
      "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"
    },
    {
      "type": "ADVISORY",
      "url": "https://github.com/CVEProject/cvelistV5/tree/main/cves/2026/139xxx/CVE-2026-139664.json"
    },
    {
      "type": "ADVISORY",
      "url": "https://nvd.nist.gov/vuln/detail/CVE-2026-139664"
    }
  ],
  "schema_version": "1.9.2",
  "summary": "RDMA/uverbs: Drop restrack ref on ib_init_ucontext() failure in GET_CONTEXT"
}