php2shell patches (CVE-2026-109618 and CVE-2026-109619) for EOL PHP are out now. With sales replies slower than usual due to high demand, the fastest route to patched packages is to buy ELS for Runtimes online (opens in new tab). Read the patch FAQ

Go straight to an AI summary of this blog post instead

  • Summarize this post with Perplexity
  • Summarize this post with Gemini

May 28, 2026 – 7 min read Chris DeMars, Senior Developer Advocate

The Short Version

What: A new Linux local privilege escalation called CIFSwitch chains a missing kernel-side check on cifs.spnego key descriptions with the trust that the userspace cifs.upcall helper places in those descriptions. The result is a root shell from any unprivileged local account on affected hosts. The kernel code path has been latent since 2007. No CVE has been assigned at publication time.

Impact: A public proof of concept from Asim Manizada gives any local unprivileged user a reliable path to root on systems that meet the exploit prerequisites. The author confirmed exposure across roughly 30 distribution and edition combinations.

Status: Manizada disclosed CIFSwitch on oss-security on May 28, 2026 after a linux-distros embargo. The bug was reported to kernel/cifs maintainers on May 16, and the upstream fix (commit 3da1fdf4efbc) has been public for over a week and is queued for stable.

Severity: Confirmed out of the box on AlmaLinux 9.7, Rocky Linux 9 Workstation, CentOS Stream 9 GNOME, Linux Mint 21/22, Kali 2021 through 2026 headless, and SLES 15 SP7/SAP. Vulnerable when cifs-utils is installed manually on Debian 11/12/13, Ubuntu 18/20/22/24.04, openSUSE Leap 15.6, Oracle Linux 8/9, and Amazon Linux 2023.

Why this matters: The exploit targets a default-installed privileged helper, needs only an unprivileged local shell, and has a working public PoC. Any Linux host where an unprivileged attacker can run code should be treated as at immediate risk if cifs-utils and the default cifs.spnego rule are present, the CIFS kernel module is available, unprivileged namespaces are enabled, and LSM policy does not block the pivot.

Do this now: If your host does not mount Kerberos-authenticated SMB shares (most servers do not), override or remove the default cifs.spnego request-key rule. If you do not need rootless containers or unprivileged unshare, disable unprivileged user namespaces instead. Commands and trade-offs are below.

Don’t want to schedule a sixth emergency reboot in a row? KernelCare applies Linux kernel patches without downtime or disruptions.

Update (2026-05-22, 14:00 UTC): Rebootless patches are rolling out from the test feed to the main feed. See the Rebootless Patch section below for current status. We will keep updating this post as patches land.

Get KernelCare

The Long Version

Asim Manizada disclosed CIFSwitch on the oss-security mailing list on May 28, 2026, the day the embargo agreed with linux-distros expired. The original report went to kernel maintainers on May 16. The upstream fix has been public for over a week and is queued for stable. Downstream distributions are still picking it up.

The kernel issue dates back to commit f1d662a in 2007, which added the cifs.spnego key type without a description-validation hook. The flaw stayed dormant for 19 years because the practical exploit chain depends on two later additions: unprivileged user namespaces in Linux v3.8 (2013) and the namespace-switching logic in cifs-utils (nominally, this is 6.14 and higher, but backports of other CVE fixes have introduced issues into older cifs-utils as well). Without all three pieces in the same place, the chain does not run end to end.

Manizada is candid in his writeup that the bug was found using LLM-assisted graph reasoning over kernel objects, security properties, and the boundaries where those objects cross between kernel and userspace. The discovery technique is interesting on its own. For now, the more pressing question is what the bug does and how to stop it.

How the Exploit Works

The exploit chains four pieces: a Linux kernel feature called keyrings, a userspace helper called cifs.upcall, Linux user namespaces, and the Name Service Switch (NSS). Each piece is normal infrastructure doing its job. The bug is that a trust boundary between kernel and userspace was never enforced, and the rest of the chain follows from there.

Step 1: kernel keyrings and the cifs.spnego key type

Linux keyrings is a kernel subsystem that stores authentication material such as Kerberos tickets and encryption keys. When the kernel needs a key it does not have, it asks userspace to produce one through a callout mechanism. A rule in /etc/request-key.d/ says “to produce a key of this type, run this helper as root.” For SMB or CIFS mounts using Kerberos, the key type is cifs.spnego and the default helper is /usr/sbin/cifs.upcall, shipped in the cifs-utils package.

When the kernel asks for a cifs.spnego key, it builds a description string carrying authority-bearing fields: the user ID for the mount, the credential UID, the process ID, and the target namespace. That string is supposed to come from the kernel. The userspace helper trusts those fields and uses them to decide which credentials to look up and which namespace to act in.

Step 2: the missing kernel check

Userspace can call the request_key() syscall directly and ask for a cifs.spnego key with any description it wants. Before the patch, the kernel’s cifs_spnego_key_type definition was missing the .vet_description hook that tells the keyring subsystem “only accept descriptions from a specific origin.” Without that hook, any unprivileged process can ask for a cifs.spnego key with a forged description, and the keyring launches cifs.upcall as root with the attacker’s description in hand.

A detail worth pulling out up front, from Manizada’s writeup: the kernel does not need to actually return a key for cifs.upcall to launch. The helper runs first. By the time the kernel rejects the key as invalid, the root helper has already done what the attacker wanted. That is what makes the missing validation hook above so consequential.

Step 3: namespace switching inside the root helper

cifs.upcall parses the description, finds upcall_target=app and pid=<some-pid>, and calls setns() to switch into the namespaces of the supplied pid. This is a deliberate feature, intended to make cifs.upcall resolve names against the right filesystem and network view when serving containerized mounts. The problem is that the kernel has just been tricked into trusting an attacker’s pid as if it came from a real kernel-side CIFS operation.

Step 4: NSS as a code-loading primitive

Before dropping root, cifs.upcall does an account lookup with getpwuid(). On Linux, account lookups go through the Name Service Switch (NSS), a pluggable system configured in /etc/nsswitch.conf that decides which shared libraries to load for each lookup type. Now that cifs.upcall is inside the attacker’s mount namespace, the nsswitch.conf it reads is the attacker’s, and the NSS module it loads is an attacker-controlled libnss_*.so.2. That shared object runs as root inside the helper.

Step 5: persistence via sudo

The public PoC’s NSS module writes a file under /etc/sudoers.d/ granting the attacker NOPASSWD: ALL. After the helper exits, the attacker leaves the namespace and runs sudo. The shell is root. The on-disk binary of cifs.upcall is untouched; the abuse happens in the live helper process and in the attacker-controlled namespace.

The fix is small. The upstream patch adds a four-line cifs_spnego_key_vet_description() function that compares current_cred() against the kernel’s private spnego_cred. If they do not match, the key request is rejected with -EPERM. Only the kernel’s own CIFS code path is allowed to instantiate a key of this type. That is enough to stop the chain at step 2.

Who Is Affected

The vulnerable cifs.spnego code path dates back to 2007, but the public exploit chain is practically reachable only on systems with Linux v3.8-era unprivileged user namespace support and the other prerequisites in place. Whether the exploit chain works on a given host depends on three downstream conditions: whether cifs-utils is installed, whether unprivileged user namespaces are enabled, and whether the host’s LSM policy (SELinux or AppArmor) blocks any step in the chain.

Stock-exploitable out of the box (cifs-utils preinstalled, unprivileged namespaces on, default LSM policy permits the chain): AlmaLinux 9.7 Workstation and the Azure cloud image, Rocky Linux 9 Workstation, CentOS Stream 9 GNOME, Linux Mint Cinnamon 21.3 and 22.3, Kali Linux 2021.4 through 2026.1 headless, SLES 15 SP7, SLES SAP 15 SP7, and SLES SAP 16.

Also confirmed in-house by KernelCare on CloudLinux 10. CL ships SELinux disabled via its tuned profiles, so the SELinux carve-out that protects RHEL 10, AlmaLinux 10, Rocky Linux 10, and Oracle Linux 10 does not apply to CloudLinux 10.

Exploitable if cifs-utils is installed manually: Ubuntu 18.04, 20.04, 22.04, and 24.04 Desktop and Server (24.04 additionally requires the publicly documented aa-exec -p trinity trick to bypass the AppArmor userns policy); Pop!_OS 22.04 and 24.04; Debian 11, 12, and 13; CentOS Stream 9 Cinnamon/KDE/MATE/XFCE; Rocky Linux 9 KDE and Workstation-Lite; openSUSE Leap 15.6; Rocky Linux 8 GenericCloud; Oracle Linux 8 and 9 KVM; Amazon Linux 2023 KVM.

Blocked by stock policy but vulnerable underneath: Most EL10 distributions (RHEL 10, AlmaLinux 10, Rocky Linux 10, Oracle Linux 10) block the cifs.upcall namespace pivot under SELinux enforcing. Ubuntu 26.04 blocks the chain under its default AppArmor userns policy. Fedora 40 through 44 and CentOS Stream 10 also block by default. These hosts become exploitable if the operator runs setenforce 0 or relaxes the AppArmor userns sysctls.

Not exploitable by the public PoC: Amazon Linux 2, which ships cifs-utils 6.2 and predates the namespace-switching logic. CentOS 7 and RHEL 7, which have user.max_user_namespaces = 0 by default. Kali Linux 2019.4 and 2020.4 with the older cifs-utils 6.9.

Exposure ultimately depends on three things: whether cifs.upcall is available, whether unprivileged userns is permitted, and whether the LSM policy blocks the namespace pivot. Check those with the commands in the next section.

Mitigate Now

The chain has two prerequisites, and each gives a clean mitigation. Pick the one whose trade-offs match your workload.

Recommended: override the default cifs.spnego request-key rule

If the host does not mount Kerberos-authenticated SMB shares (most servers do not), the default cifs.spnego request-key rule is unused. Overriding it stops the chain at step 1. NTLM/password-based SMB client mounts generally do not depend on the Kerberos SPNEGO upcall, but verify your mount options before removing the rule.

echo 'create cifs.spnego * * /usr/sbin/keyctl negate %k 30 %S' | sudo tee /etc/request-key.d/cifs.spnego.conf

Adjust the keyctl path if your distribution places it elsewhere. This matches the author’s recommended override and cleanly negates the key request rather than failing it through a non-keyring binary.

If you do not use SMB at all, remove the file entirely:

sudo rm /etc/request-key.d/cifs.spnego.conf

Do not apply this on hosts that mount Kerberos-authenticated SMB shares. cifs.upcall is exactly the SPNEGO ticket helper those mounts depend on.

Revert after the patch lands by reinstalling cifs-utils (which restores the default rule) or removing your override file.

Alternative: disable unprivileged user namespaces

The PoC must enter a private user and mount namespace before triggering the upcall. Blocking unprivileged userns kills the chain regardless of cifs-utils state.

# EL family:
sudo sysctl -w user.max_user_namespaces=0
echo 'user.max_user_namespaces = 0' | sudo tee /etc/sysctl.d/99-cifswitch.conf

# Debian / Ubuntu:
sudo sysctl -w kernel.unprivileged_userns_clone=0
echo 'kernel.unprivileged_userns_clone = 0' | sudo tee /etc/sysctl.d/99-cifswitch.conf

Compatibility note: unprivileged user namespaces are required by rootless container runtimes (rootless Podman, rootless Docker, bwrap-based Flatpaks), several CI sandboxes, unprivileged unshare(1), and Chromium’s sandbox. Acceptable on hosting workloads, disruptive on developer or container hosts.

Other option: uninstall cifs-utils where SMB client is not used

Most server fleets do not need it. Removing the package removes cifs.upcall and the default request-key rule together.

# Debian / Ubuntu
sudo apt remove cifs-utils

# RHEL / AlmaLinux / Rocky / Oracle / CentOS Stream
sudo dnf remove cifs-utils

Check whether your host is exposed

# Is cifs-utils installed?
command -v cifs.upcall && (rpm -q cifs-utils 2>/dev/null || dpkg -l cifs-utils 2>/dev/null)

# Is the default cifs.spnego request-key rule present?
cat /etc/request-key.d/cifs.spnego.conf 2>/dev/null

# Are unprivileged user namespaces enabled?
sysctl user.max_user_namespaces kernel.unprivileged_userns_clone 2>/dev/null

A host is a viable target only if cifs.upcall is installed, a cifs.spnego request-key rule exists, and unprivileged userns is permitted.

KernelCare Rebootless Patch

Status as of 2026-05-29, 14:00 UTC: EL8 rebootless patches are deployed to the main feed. AlmaLinux 9 patches are also deployed to the main feed. Rebootless patches for the remaining EL9 variants, EL10, Oracle Linux UEK kernels (UEK6 and UEK7), Ubuntu, Debian, and Proxmox VE are deployed to the test feed.

Once available in the test feed, use the instructions below to apply:

kcarectl --update --prefix test

After validation, the patch arrives on the next scheduled run, or pull it on demand:

kcarectl --update

Verify the patch is applied. The patch ships without a CVE id and is identifiable by its upstream description:

kcarectl --patch-info | grep 'cifs.spnego'
# expected: kpatch-description: smb: client: reject userspace cifs.spnego descriptions (cifs LPE)

Once a CVE is assigned, kcarectl –patch-info | grep CVE-2026- will surface it.

What to Watch as This Develops

CVE assignment is still pending. Distribution kernel updates from Red Hat, Ubuntu, Debian, SUSE, Oracle, and Amazon are rolling out as downstreams pick up the queued stable backport.

We will keep updating this post as the rebootless patches are released and as the CVE is assigned.

Patch every kernel, no reboot required

If you are not yet a KernelCare user, now is a good time to see how rebootless patching can protect critical Linux systems without emergency maintenance windows or downtime.

Learn more about KernelCare here →

Summary
CIFSwitch Linux Kernel Flaw Grants Local Root
Article Name
CIFSwitch Linux Kernel Flaw Grants Local Root
Description
CIFSwitch is a Linux local privilege escalation that can grant root on systems using cifs-utils, user namespaces, and vulnerable CIFS SPNEGO handling.
Author
Publisher Name
TuxCare
Publisher Logo

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.

Table of Contents
Get the open-source security answers you need

Join 4,500+ Linux & Open Source Professionals!

2x a month. No spam.