{
  "affected": [
    {
      "ecosystem_specific": {
        "urgency": "not yet assigned"
      },
      "package": {
        "ecosystem": "Debian:12",
        "name": "linux"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {
        "urgency": "not yet assigned"
      },
      "package": {
        "ecosystem": "Debian:13",
        "name": "linux"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    },
    {
      "ecosystem_specific": {
        "urgency": "not yet assigned"
      },
      "package": {
        "ecosystem": "Debian:14",
        "name": "linux"
      },
      "ranges": [
        {
          "events": [
            {
              "introduced": "0"
            },
            {
              "fixed": "7.3.6-1"
            }
          ],
          "type": "ECOSYSTEM"
        }
      ]
    }
  ],
  "details": "In the Linux kernel, the following vulnerability has been resolved:  nsproxy: Fix cred leak in the error path of prepare_nsset()  A task that calls setns() with CLONE_NEWUSER together with CLONE_NEWNS and at least one more namespace flag leaks a struct cred (and the user_namespace, ucounts and group_info references it holds) whenever the call fails at the fs_struct copy.  On a kernel with CONFIG_USER_NS the leak is one cred per failed setns(); under memory pressure, or driven by a fault-injecting attacker, it accumulates and pins user namespaces that can then never be freed.  prepare_nsset() sets nsset-\u003eflags only on the success path:  \tif (flags \u0026 CLONE_NEWUSER) \t\tnsset-\u003ecred = prepare_creds(); \t... \t} else if (flags \u0026 CLONE_NEWNS) { \t\tnsset-\u003efs = copy_fs_struct(me-\u003efs); \t\tif (!nsset-\u003efs) \t\t\tgoto out;\t/* flags still 0 here */ \t} \tnsset-\u003eflags = flags; \treturn 0; out: \tput_nsset(nsset);  put_nsset() decides what to release from nsset-\u003eflags:  \tif (flags \u0026 CLONE_NEWUSER) \t\tput_cred(nsset_cred(nsset));  On the copy_fs_struct() failure arm prepare_creds() has already allocated the cred, but nsset-\u003eflags is still the zero from the caller's \"struct nsset nsset = {}\", so put_nsset() does not see CLONE_NEWUSER and never drops it.  The caller (__do_sys_setns) returns the error without touching nsset, so the cred is lost.  Set nsset-\u003eflags at the start of prepare_nsset(), before anything can fail, so every error exit through put_nsset() releases what was taken. commit_nsset(), which clears nsset-\u003ecred on success, is unaffected.  Reproduced on x86_64 under QEMU with failslab aimed at the fs_struct cache and kmemleak enabled: 500 calls of setns(pidfd, CLONE_NEWUSER | CLONE_NEWNS | CLONE_NEWUTS) each fail with -ENOMEM and leave 851 unreferenced cred objects allocated from prepare_creds() via setns() before the fix, and none after (the program is in the notes below).  Found by formal verification of kernel/nsproxy.c.",
  "id": "DEBIAN-CVE-2026-139215",
  "modified": "2026-12-01T03:47:28.527364535Z",
  "published": "2026-11-30T14:18:41.650Z",
  "references": [
    {
      "type": "ADVISORY",
      "url": "https://security-tracker.debian.org/tracker/CVE-2026-139215"
    }
  ],
  "upstream": [
    "CVE-2026-139215"
  ]
}