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

Published Oct 23, 2026
·
Updated

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 switchtasknamespaces() and copynamespaces() and dropped again by putnsproxy() through deactivatensproxy().

But ksysunshare() calls putnsproxy() on an nsproxy that was never installed when setcreducounts() 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 nsrefactiveput+0x1cd/0x230 nsproxynsactiveput deactivatensproxy ksysunshare

Afterwards the namespaces the caller lives in aren't listed by listns() anymore. setcreducounts() only fails when allocucounts() can't allocate and it only allocates when the real uid of the caller differs from its effective uid.

Commit cefd55bd2159 ("nsproxy: fix freensproxy() and simplify createnewnamespaces()") separated the two cases on purpose. nsproxyfree() frees an nsproxy that was prepared but never installed and that's what a failed setns() uses in putnsset(). Export it and use it for a failed unshare() as well.

Affected Software

1 affected component
Linux Linux kernel

Event History

Oct 23, 2026
CVE Published
via MITRE·12:20 PM
Data Sourced
via MITRE·12:20 PM
Description

Contact

SecAlerts Pty Ltd.
132 Wickham Terrace
Fortitude Valley,
QLD 4006, Australia
info@secalerts.co
By using SecAlerts services, you agree to our services end-user license agreement. This website is safeguarded by reCAPTCHA and governed by the Google Privacy Policy and Terms of Service. All names, logos, and brands of products are owned by their respective owners, and any usage of these names, logos, and brands for identification purposes only does not imply endorsement. If you possess any content that requires removal, please get in touch with us.
© 2026 SecAlerts Pty Ltd.
ABN: 70 645 966 203, ACN: 645 966 203