bitVakt

Kernel Kit / Infix / v26.10.0latest

CVE-2026-98983

—unknown

linux6.18.60 · 6.18.54in 2 of 4 releases

Not yet analysed by NVD. Matched on the vendor's record; this may change when NVD has analysed it.

Reach linux · 4 builds in 2 of 4 releases

full reviewcross-check✓ a member decided

v25.03.1not in NVD's range
v26.01.0not in NVD's range
v26.09.06.18.54
v26.10.0latest6.18.60
aarch64_minimal
x86_64
aarch64_minimal–
x86_64–
aarch64_minimal–
x86_64–
aarch64_minimalAAwaiting reviewx86_64AAwaiting reviewaarch64_minimalAAwaiting reviewx86_64AAwaiting review

Description · NVD

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.

Published 2026-10-23NVD

References 2
Review Av26.10.0x86_64False positiveFable 5.2 · medium confidence · 2026-11-19

The match to linux 6.18.60 does not fit: the CVE is an imbalance in the *active* namespace reference counting (deactivate_nsproxy(), nsproxy_ns_active_put(), __ns_ref_active_put(), nsproxy_free()), and none of that machinery exists in this kernel tree.

In this tree put_nsproxy() goes straight to free_nsproxy(), which only drops the ordinary references that create_new_namespaces() took. The put_nsproxy(new_nsproxy) call on the failed set_cred_ucounts() path in ksys_unshare() is therefore balanced, and there is no listns() to be affected.

The code is compiled and unshare() is reachable (CONFIG_NAMESPACES=y, CONFIG_USER_NS=y), but that does not matter because the buggy code was introduced in a later kernel series. Confidence is medium only because I could not read the CNA's affected range from the tree; the source evidence itself is unambiguous.

Evidence 10
  1. The source tree is plain 6.18.60 (VERSION 6, PATCHLEVEL 18, SUBLEVEL 60).

    output/build/linux-6.18.60/Makefile:2-4

  2. `put_nsproxy()` calls `free_nsproxy()` directly; there is no `deactivate_nsproxy()` step.

    output/build/linux-6.18.60/include/linux/nsproxy.h:104-107

  3. `free_nsproxy()` only does `put_mnt_ns()`, `put_uts_ns()`, `put_ipc_ns()`, `put_pid_ns()`, `put_time_ns()`, `put_cgroup_ns()` and `put_net()` and then frees the nsproxy; no active-reference drop.

    output/build/linux-6.18.60/kernel/nsproxy.c:186-197

  4. `switch_task_namespaces()` only swaps the pointer and puts the old nsproxy; it takes no active references on install, so there is nothing for an uninstalled nsproxy to over-drop.

    output/build/linux-6.18.60/kernel/nsproxy.c:229-242

  5. The `ksys_unshare()` path named in the CVE exists (`set_cred_ucounts()` failure -> `bad_unshare_cleanup_nsproxy` -> `put_nsproxy(new_nsproxy)`), but here it only releases the references taken by `create_new_namespaces()`.

    output/build/linux-6.18.60/kernel/fork.c:3138-3142, 3189-3191

  6. A failed `setns()` in `put_nsset()` also uses `free_nsproxy()`; there is no separate `nsproxy_free()` for never-installed nsproxies, i.e. the split made by commit cefd55bd2159 is not in this tree.

    output/build/linux-6.18.60/kernel/nsproxy.c:318

  7. The file is 83 lines and contains no `__ns_ref_active_put` (the CVE's warning site is `kernel/nscommon.c:171`). A grep for `ns_ref_active`, `listns` and `cefd55bd2159` across `kernel/`, `include/linux/`, `fs/nsfs.c` and `arch/x86/entry/syscalls/syscall_64.tbl` returns nothing.

    output/build/linux-6.18.60/kernel/nscommon.c

  8. 139 patches applied; none mention nsproxy, unshare, namespace or ucount, and no file under `patches/linux` touches `nsproxy` or `kernel/fork.c`, so the active-reference code is not backported by the build either.

    output/build/linux-6.18.60/.applied_patches_list

  9. `CONFIG_NAMESPACES=y`, `CONFIG_USER_NS=y` and the other namespace types are enabled, so `unshare()` itself is built and usable; only the buggy refcounting is absent.

    output/build/linux-6.18.60/.config:222-228

  10. `kernel/fork.o`, `kernel/nscommon.o` and `kernel/nsproxy.o` were built, confirming the reviewed sources are the ones in the image.

    output/objects.txt:21971, 21980, 22084

Version and patches

The tree is unmodified 6.18.60 in the affected files. The bug needs the namespace active-reference infrastructure and the nsproxy_free() / deactivate_nsproxy() split from commit cefd55bd2159; neither is present in 6.18.60, and no applied patch adds them. The fix commits (0b6f31a3c0b1, 56fe03a0c05d) are not present and are not needed, since there is no nsproxy_free() to switch to. I could not read the CNA's affected range or the fix commits (no network access), so the claim that the range starts after 6.18 rests on the source, not on the advisory.

Recommendation

Document as not applicable to the 6.18.y kernel; no upgrade or backport is needed for this CVE.

Re-check when the kernel is bumped to a series that contains the active namespace reference counting (look for deactivate_nsproxy in kernel/nsproxy.c); at that point make sure the stable release includes the fix.

Open questions

The kernel CNA's affected version range and the content of the two fix commits could not be checked from the tree. If the CNA record does list 6.18.y as affected, that would contradict the source here and deserve a second look.

One combined shell command was rejected by the sandbox; I re-ran the same checks as separate read-only commands, so nothing was skipped.

Members of Kernel Kit decide. Sign in if you are one.