{"answers":{"affected":"","exploited":"There is no known exploitation of CVE-2026-139215 in the wild and no public exploit code.","exposure":"","fix":"Upgrade to a fixed version.","what":"CVE-2026-139215 is a vulnerability in Linux, published on 30 Nov 2026."},"fix_prompt":"Check this codebase for CVE-2026-139215 and fix it if it is affected.\n\nWhat it is: CVE-2026-139215 is a vulnerability in Linux, published on 30 Nov 2026. \nExploitation: There is no known exploitation of CVE-2026-139215 in the wild and no public exploit code.\n\nAffected product: Linux. No package-level version data is available, so check the vendor advisory linked from the reference page.\n\nTask:\n1. Search the dependency manifests and lockfiles (for example package.json, package-lock.json, requirements.txt, poetry.lock, uv.lock, pom.xml, build.gradle, go.mod, Cargo.lock, Gemfile.lock) and any Dockerfiles for the affected packages, including transitive dependencies.\n2. If an affected version is in use, upgrade it to the fixed version for its release line with the project's package manager, so the lockfile is regenerated. Prefer the smallest upgrade that fixes it.\n3. If there is no fix, or the upgrade would break the build, do not guess: explain the risk and the safest workaround instead.\n4. Run the tests and summarise what changed and why.\n5. If nothing in the project is affected, say so and change nothing.\n\nReference: https://insights.sbomify.com/CVE-2026-139215/ (Markdown: https://insights.sbomify.com/CVE-2026-139215/index.md)","id":"CVE-2026-139215","markdown":"https://insights.sbomify.com/CVE-2026-139215/index.md","name":"CVE-2026-139215","record":{"aliases":["BELL-CVE-2026-139215","DEBIAN-CVE-2026-139215","GHSA-2h96-524f-7rrv","UBUNTU-CVE-2026-139215"],"analysis":null,"analysis_generated_by":null,"assigner":"Linux","component":null,"cpe":[],"cvss":{"score":null,"severity":null,"source":null,"vector":null,"version":null},"cwes":[],"description":"In the Linux kernel, the following vulnerability has been resolved:\n\nnsproxy: Fix cred leak in the error path of prepare_nsset()\n\nA task that calls setns() with CLONE_NEWUSER together with CLONE_NEWNS\nand at least one more namespace flag leaks a struct cred (and the\nuser_namespace, ucounts and group_info references it holds) whenever the\ncall fails at the fs_struct copy.  On a kernel with CONFIG_USER_NS the\nleak is one cred per failed setns(); under memory pressure, or driven by\na fault-injecting attacker, it accumulates and pins user namespaces that\ncan then never be freed.\n\nprepare_nsset() sets nsset-\u003eflags only on the success path:\n\n\tif (flags \u0026 CLONE_NEWUSER)\n\t\tnsset-\u003ecred = prepare_creds();\n\t...\n\t} else if (flags \u0026 CLONE_NEWNS) {\n\t\tnsset-\u003efs = copy_fs_struct(me-\u003efs);\n\t\tif (!nsset-\u003efs)\n\t\t\tgoto out;\t/* flags still 0 here */\n\t}\n\tnsset-\u003eflags = flags;\n\treturn 0;\nout:\n\tput_nsset(nsset);\n\nput_nsset() decides what to release from nsset-\u003eflags:\n\n\tif (flags \u0026 CLONE_NEWUSER)\n\t\tput_cred(nsset_cred(nsset));\n\nOn the copy_fs_struct() failure arm prepare_creds() has already\nallocated the cred, but nsset-\u003eflags is still the zero from the caller's\n\"struct nsset nsset = {}\", so put_nsset() does not see CLONE_NEWUSER and\nnever drops it.  The caller (__do_sys_setns) returns the error without\ntouching nsset, so the cred is lost.\n\nSet nsset-\u003eflags at the start of prepare_nsset(), before anything can\nfail, so every error exit through put_nsset() releases what was taken.\ncommit_nsset(), which clears nsset-\u003ecred on success, is unaffected.\n\nReproduced on x86_64 under QEMU with failslab aimed at the fs_struct\ncache and kmemleak enabled: 500 calls of\nsetns(pidfd, CLONE_NEWUSER | CLONE_NEWNS | CLONE_NEWUTS) each fail with\n-ENOMEM and leave 851 unreferenced cred objects allocated from\nprepare_creds() via setns() before the fix, and none after (the program\nis in the notes below).\n\nFound by formal verification of kernel/nsproxy.c.","ecosystems":[],"exploits":{"exploitdb":0,"first_seen":null,"github_poc":0,"max_poc_stars":null,"metasploit":0,"nuclei":0,"refs":[],"tier":"none_known"},"has_fix":true,"headline":"nsproxy: Fix cred leak in the error path of prepare_nsset()","id":"CVE-2026-139215","indexable":true,"kev":null,"kind":"cve","links":{"ecosystem":null,"product":null,"products":[],"type":null,"year":"2026"},"main_cpe":null,"main_fixed":[],"main_package":null,"n_packages":0,"n_references":8,"n_vendor_status":0,"next":{"headline":"ntfs: fix u16 truncation of the update sequence array count check","id":"CVE-2026-139216"},"nickname":null,"packages":[],"prev":{"headline":"perf: Fix UAF in attach_task_ctx_data()","id":"CVE-2026-139214"},"products":["Linux"],"published":"2026-11-30","related":[],"sources":[{"class":"attribution","licence":"CVE Terms of Use (MITRE)","name":"CVE List","prefix":"CVE"}],"ssvc":{"automatable":null,"exploitation":null,"technical_impact":null},"state":"PUBLISHED","text_fixes":[],"updated":"2026-11-30","vendor_status":[],"vendors":["Linux"]},"summary":null,"url":"https://insights.sbomify.com/CVE-2026-139215/"}