Zvolte jazyk

WHAT ARE YOU LOOKING FOR?

Popular Tags

Raleigh, NC

32°F
Broken Clouds Humidity: 60%
Wind: 5.14 M/S

CIFSwitch Logic Flaw Turns Fake CIFS Credentials into Root Access on Major Linux Distributions

CIFSwitch Logic Flaw Turns Fake CIFS Credentials into Root Access on Major Linux Distributions

The CIFSwitch vulnerability is unusual among privilege escalation flaws due to the way it was discovered. Instead of traditional manual code review, Asim Manizada, a security engineer at SpaceX, identified the issue using an AI-driven analysis framework. This system builds semantic maps of kernel components and their relationships, then analyzes how different parts of the system interact specifically looking for mismatches between what is created by one component and what is trusted by another. This approach uncovered a complex chain of logic flaws that can ultimately grant root access across multiple Linux distributions, including Linux Mint, CentOS Stream 9, Rocky Linux 9, AlmaLinux 9, Kali Linux, and SLES 15.

The vulnerability has existed in the Linux kernel since 2007 and exists in the interaction between the CIFS (Common Internet File System) client and the cifs-utils package, which manages Kerberos-based authentication for network file shares. When a system mounts a CIFS share requiring Kerberos credentials, the kernel requests a special key (cifs.spnego). This request triggers a privileged helper program, cifs.upcall, which runs as root to retrieve or generate the required authentication data.

The core issue is that unprivileged users can issue the same type of key request with manipulated or fabricated values. Because the system fails to properly validate these requests, the malicious input is treated as legitimate.

CIFS/SMB itself is a Windows-style file-sharing protocol, and on Linux systems, the kernel handles file operations such as mounting and reading data, while delegating authentication duties to a user-space utility like cifs.upcall. Communication between these components occurs through Linux keyrings, where the kernel requests authentication keys and user-space tools fulfill those requests.

Attackers can exploit this mechanism by crafting a fake key request that includes a manipulated process identifier (PID) and a parameter called upcall_target=app. This instructs cifs.upcall to switch into the attacker-controlled process namespace before carrying out its operations. At this point, the exploit chain continues.

Before dropping its elevated privileges, cifs.upcall performs a user lookup using the getpwuid() function. This lookup relies on the Name Service Switch (NSS), which dynamically loads shared libraries defined in system configuration files (nsswitch.conf). By controlling the environment at this stage, an attacker can trick the system into loading a malicious NSS module.

Because the kernel does not distinguish between legitimate and user-crafted key descriptions, it blindly accepts the attacker’s request. This allows the exploit to proceed through several steps: forging a key request, redirecting execution into a controlled namespace, triggering a privileged lookup, and injecting malicious code through NSS.

A proof-of-concept (PoC) exploit demonstrates the impact of this chain. Once executed, it can create a configuration granting full administrative (sudo) privileges to the attacker, making full root access easily achievable.

The vulnerability consists entirely of logical flaws there is no memory corruption involved. The process relies on chaining together several weaknesses in system design: improper validation, misplaced trust, and unsafe privilege transitions.

To address the issue, a simple fix was introduced in the kernel. A validation check was added to ensure that only legitimate CIFS-generated requests are accepted. This patch was implemented upstream before the research was publicly disclosed and is in the process of being distributed across Linux versions. However, adoption varies by distribution, leaving many systems currently exposed.

Exploitation depends on specific conditions:

  • A vulnerable Linux kernel
  • A susceptible version of cifs-utils (generally version 6.14 or newer, though some older versions may also be affected)
  • System configurations that allow user namespaces or lack restrictive security policies such as SELinux or AppArmor

Some operating systems, including Ubuntu 26.04, Fedora 40–44, CentOS Stream 10, and Rocky Linux 10, are not vulnerable under default settings. However, many others such as Ubuntu versions 18.04 through 24.04, Debian 11–13, openSUSE Leap 15.6, and Oracle Linux 8 and 9 remain at risk if the required conditions are met.

For systems that do not rely on CIFS or Kerberos for network file sharing, mitigation can be as simple as uninstalling cifs-utils or disabling the CIFS kernel module. For environments that require these features, applying kernel updates is the most effective solution. Disabling unprivileged user namespaces can also mitigate the risk, although it may impact other system functionality and should be tested carefully.

Beyond the vulnerability itself, the discovery highlights a significant shift in security research methods. Rather than relying solely on human expertise, Manizada’s AI-assisted framework mapped relationships between trusted system components and identified where assumptions could be abused. The system effectively pinpointed a missing validation check by analyzing how trusted data flowed through the system and identifying where it could be manipulated.

This approach demonstrates that AI can accelerate the discovery of complex vulnerabilities finding logic flaws that would traditionally require significant manual effort while also producing fully functional exploit scenarios.

Found this article interesting? Follow us on X(Twitter) ,Threads and FaceBook to read more exclusive content we post. 

Cybersecurity Insight delivers timely updates on global cybersecurity developments, including recent system breaches, cyber-attacks, advancements in artificial intelligence (AI), and emerging technology innovations. Our goal is to keep viewers well-informed about the latest trends in technology and system security, and how these changes impact our lives and the broader ecosystem

Please fill the required field.