# CIFSwitch: A Decade-Old Linux Flaw Grants Root Access Across Major Distributions


A newly discovered local privilege escalation vulnerability in the Linux kernel's CIFS subsystem could allow attackers with local access to gain root privileges on vulnerable systems. The flaw, dubbed CIFSwitch, affects multiple Linux distributions and has been present in the codebase since 2007—a stark reminder that kernel-level vulnerabilities can remain undetected for nearly two decades.


Discovered by SpaceX security engineer Asim Viladi Oglu Manizada, CIFSwitch exploits a fundamental validation gap in how the Linux kernel handles Kerberos-based CIFS authentication requests, potentially exposing millions of systems to local privilege escalation attacks.


## The Threat


CIFS (Common Internet File System) is a widely-deployed networking protocol that allows Linux systems to mount and access remote files, folders, and devices across networks—particularly common in enterprise environments using Windows file shares and Kerberos authentication. When a CIFS mount uses Kerberos for authentication, the Linux kernel delegates the heavy lifting to a user-space helper program called cifs.upcall, which is part of the cifs-utils toolset and typically runs with root privileges.


The vulnerability emerges from a critical trust assumption in this workflow. The Linux kernel's CIFS subsystem fails to verify that incoming cifs.spnego key requests—used to obtain authentication material for Kerberos/SPNEGO connections—actually originate from the kernel's CIFS client itself. This creates an opening for an unprivileged local user to forge authentication requests and trigger the normal kernel authentication workflow.


Here's where the exploit becomes dangerous: an attacker can craft a malicious cifs.spnego request that forces a namespace switch, then trigger a Name Service Switch (NSS) lookup *before* the root-privileged cifs.upcall process drops its elevated permissions. By loading a malicious NSS module during this window, the attacker can achieve arbitrary code execution with root privileges.


The vulnerability is non-universal and depends on a specific constellation of conditions: a vulnerable kernel version, a vulnerable cifs-utils version (6.14 and higher, plus some older variants), available user namespaces, and SELinux or AppArmor policies that don't explicitly block the attack. This combination of factors explains why the flaw remained undetected across 19 years of kernel development.


## Severity and Impact


| Attribute | Details |

|-----------|---------|

| Vulnerability Name | CIFSwitch |

| CVE ID | Pending assignment |

| CVSS Score | Pending (estimated 7.8–8.1) |

| Vector | CVSS:3.1/AV:L/AU:L/AC:H/PR:L/UI:N/S:U/C:H/I:H/A:H |

| Attack Type | Local privilege escalation |

| Attack Complexity | High |

| Authentication Required | Yes (local user account) |

| Impact | Complete system compromise (root code execution) |

| Scope | Unchanged (local context) |

| CWE | CWE-269 (Improper Input Validation), CWE-416 (Use After Free) |

| Discoverer | Asim Viladi Oglu Manizada (SpaceX) |

| Date Disclosed | May 30, 2026 |

| First Introduced | Linux kernel 2007 |


## Affected Products


### Confirmed Vulnerable (Default Configuration)

  • Linux Mint: 21.3, 22.3
  • CentOS Stream: 9
  • Rocky Linux: 9
  • AlmaLinux: 9
  • Kali Linux: 2021.4 through 2026.1
  • SLES (SUSE Linux Enterprise Server): 15 SP7

  • ### Conditionally Vulnerable (If cifs-utils Installed)

  • Ubuntu (multiple versions)
  • Debian (multiple versions)
  • Pop!_OS
  • openSUSE (multiple versions)
  • Oracle Linux
  • Amazon Linux (except Amazon Linux 2)

  • ### Protected by Default (SELinux/AppArmor Mitigation)

  • Ubuntu 26.04
  • Fedora 40, 41, 42, 43, 44
  • CentOS Stream 10
  • Rocky Linux 10
  • AlmaLinux 10
  • SLES 16
  • openSUSE Leap 16

  • ### Not Affected

  • Amazon Linux 2
  • Kali Linux 2019.4, 2020.4

  • ## Mitigations


    Organizations should implement the following controls, prioritized by risk:


    1. Apply Kernel Patches: The Linux kernel community has released patches (upstream commit 3da1fdf) that add proper validation of cifs.spnego request origins. Check your distribution's repository for patched kernel versions and apply updates immediately, particularly for enterprise deployments.


    2. Disable or Blacklist CIFS: If your systems do not require CIFS functionality, disable or blacklist the CIFS kernel module entirely to eliminate the attack surface:

    ```bash

    echo "install cifs /bin/true" >> /etc/modprobe.d/blacklist-cifs.conf

    ```


    3. Remove cifs-utils: If CIFS support is not required, uninstall cifs-utils packages to prevent the vulnerable helper program from being available.


    4. Restrict User Namespaces: Disable unprivileged user namespaces if your workload permits, as this restricts the attack prerequisites:

    ```bash

    sysctl -w kernel.unprivileged_userns_clone=0

    ```


    5. Verify SELinux/AppArmor Status: Confirm that mandatory access control frameworks are active and properly configured to restrict cifs.upcall execution.


    6. Validate Patches: Manizada has published a proof-of-concept exploit that organizations can use in isolated environments to verify that applied patches and mitigations are effective.


    ## References


  • Original Technical Report: SpaceX Security Research (May 2026)
  • Linux Kernel CIFS Subsystem: kernel.org CIFS documentation
  • cifs-utils Project: samba.org cifs-utils
  • Upstream Patch: Linux kernel commit 3da1fdf
  • Proof-of-Concept: Available through coordinated disclosure channels

  • ---


    ## HackWire Analysis


    CIFSwitch illustrates a troubling pattern in Linux security: high-impact vulnerabilities can hide in critical kernel subsystems for nearly two decades if the right combination of conditions exists to trigger them. The flaw wasn't exotic—it was a straightforward validation gap that could have been caught with basic input verification. Yet it persisted because the exploit requires a specific alignment of kernel version, helper tool version, namespace support, and security policy configuration.


    What's particularly striking is the *distribution variance*. Some Linux distributions are protected by default through SELinux or AppArmor policies; others are vulnerable out of the box. This creates a false sense of security for users of "hardened" distributions while leaving others exposed. Enterprise customers running Rocky Linux 9, AlmaLinux 9, or CentOS Stream 9 in their data centers are immediately affected and must patch urgently.


    The local-only requirement doesn't diminish the risk. In containerized environments, shared hosting platforms, and multitenant systems, local access is trivial for attackers to obtain—either through compromised applications or legitimate user accounts. A single CIFSwitch exploit in a Kubernetes cluster or a shared server could escalate a low-privilege container breakout into full cluster compromise.


    What defenders should take from this: assume CIFS is being used in your environment unless you've explicitly verified otherwise. Many organizations maintain legacy CIFS shares for backward compatibility with older systems and may not even realize it's active. The patch is straightforward, but the real work is identifying which systems need it and deploying it rapidly across your fleet.


    — HackWire Editorial


    ---


    ## Related Coverage


  • Read more in our [Vulnerabilities](https://www.hackwire.news/category/vulnerabilities) coverage
  • Cross-reference with [Linux Security](https://www.hackwire.news/category/linux-security) and [Privilege Escalation](https://www.hackwire.news/category/privilege-escalation)
  • Stay current via the [HackWire homepage](https://www.hackwire.news/)