
CIFSwitch (CVE-2026-46243) is a vulnerability found this year in Linux, between the kernel (CIFS subsystem) and the userspace helper cifs.upcall from the cifs-utils package. The vulnerability allows a local unprivileged user to escalate privileges to root and execute arbitrary code.
Root cause:
During Kerberos authentication for SMB mounts, the kernel queries the cifs.spnego key via keyrings, and the request-key (create cifs.spnego * * /usr/sbin/cifs.upcall %k) rule runs cifs.upcall as root.
Before the patch was released, the key type lacked vet_description: the kernel did not verify the origin of the description, and an unprivileged process could call request_key("cifs.spnego", <fake description>), while the helper considers pid, creduid, and upcall_target fields as trusted since they are received from the kernel.
The bug dates back to 2007 (f1d662a, kernel 2.6.24) and affects a large group of Linux distributions. The vulnerability has a CVSS of 7.1–7.8 (High), and PoC exploits are available on the Internet.
Attack mechanics:
The user creates a user+mount namespace via
unshare -Ur -m— a sandbox for the future root process.A fake
nsswitch.confandlibnss_pwn.so.2are bind-mounted over /etc/nsswitch.conf and NSS directories within the namespace. In parallel,mount -t cifs //127.0.0.1/shareis performed to load the cifs module.request_key("cifs.spnego", "ver=0x2;...;uid=0x0;creduid=0x0;pid=<attacker_pid>;upcall_target=app;user=root")is called.The
cifs.upcallhelper withupcall_target=appexecutesswitch_to_process_ns(pid)— switching to the attacker’s mount namespace — and before dropping privileges via setuid(), it callsgetpwuid(0)-> NSS -> loadinglibnss_pwn.so.2into the root-ownedcifs.upcall.The
.solibrary writes “ALL=(ALL:ALL) NOPASSWD: ALL” to /etc/sudoers.d/ or creates a SUID copy of bash in /var/tmp/cifsupcall_rootsh*; followed by a root shell. In general, any activity in now possible fromcifs.upcall(see screenshot above).
Detection:
— request_key()/add_key() calls with cifs.spnego type from an unprivileged process: legitimate requests originate from the kernel under spnego_cred, userspace-initiated calls are anomalous.
— unshare -Ur -m call from a regular user: indicator of sandbox preparation.
— Bind-mount over /etc/nsswitch.conf, appearance of libnss_*.so in user directories.
— cifs.upcall activity: writes to /etc/sudoers.d/*, SUID files in /var/tmp, loading .so from atypical directories. Best correlation — modification of nsswitch.conf + loading NSS module into cifs.upcall
— PoC artifacts: /tmp/cifs-upcall-sudoers-poc-, SUID-shell /var/tmp/cifs_upcall_rootsh*, sudoers entry with comment “# cifs.upcall namespace NSS PoC”.
— mount -t cifs //127.0.0.1/share call from an unprivileged process (forced autoload).
Mitigation:
— Install the patched kernel with commit 3da1fdf4efbc (backport to all stable branches). The patch adds .vet_description, rejecting requests not from the kernel’s private spnego_cred.
— If CIFS is not needed: rmmod cifs and install cifs /bin/false in /etc/modprobe.d, remove cifs-utils.
— Disable unprivileged user namespaces user.max_user_namespaces=0; on Debian/Ubuntu — kernel.unprivileged_userns_clone=0): it breaks the attack chain, but can affect rootless containers.

