Technical impact
In the Linux kernel, when a task calls setns() with CLONE_NEWUSER together with CLONE_NEWNS and at least one more namespace flag, a struct cred can be leaked whenever the call fails during the fs_struct copy. The bug arises because nsset->flags is only set on the success path, so on error the allocated cred is never released by put_nsset(). The leaked cred objects, along with references to user namespaces, accumulate over time, pinning namespaces that can then never be freed. Under memory pressure or a fault‑injecting attacker, the leak can grow enough to exhaust memory or prevent the reclamation of user namespaces, leading to a denial of service.
Affected Systems
All Linux kernels that include CONFIG_USER_NS and expose the setns() system call for use with CLONE_NEWUSER and at least one additional namespace flag are affected. The vulnerability exists in any kernel version released prior to the commit that sets nsset->flags at the start of prepare_nsset(). Specific downstream vendors are not listed; any distribution using an unpatched Linux kernel may be impacted.
Risk and Exploitability
No CVSS or EPSS score is published for this issue, and it is not listed in the CISA KEV catalog. The attack requires the ability to invoke setns() with the relevant flags; failure can be induced by a fault‑injecting attacker or by natural memory pressure. Because it primarily causes a memory leak and prevents namespace cleanup, the direct impact is denial of service rather than privilege escalation. The likelihood of exploitation in the wild is uncertain but non‑zero, especially in environments where setns() is used extensively or where memory pressure is a concern.