En-tête négligent

CIFSwitch CVE-2026-46243,Linux Root Through a Forged CIFS Upcall

CIFSwitch is CVE-2026-46243, a Linux local privilege escalation bug in the boundary between the kernel CIFS/SMB client and the cifs-utils userspace helper path. A low-privileged local user can potentially turn ordinary code execution on a Linux host into root by abusing a forged cifs.spnego request-key upcall. The important word is local. CIFSwitch is not a remote, unauthenticated SMB server bug. It matters after an attacker already has a foothold: a shell account, a compromised web process, a malicious CI job, a container workload with the wrong host exposure, a stolen developer session, or any other way to run unprivileged code on the target machine.

The bug is easy to underestimate because CIFS sounds like a file-sharing feature that only matters to systems actively mounting Windows shares. That is not the right risk model. The exploit chain depends on several host conditions, including cifs-utils, a cifs.spnego request-key rule, a loadable or built-in CIFS kernel client, unprivileged namespace behavior, and Linux security policy. Some distributions and profiles were reported as exploitable under stock defaults; others needed cifs-utils to be installed; others were blocked by default AppArmor or SELinux policy. The result is not universal Linux exposure, but it is serious enough that shared Linux systems, developer workstations, CI runners, cloud images, and security testing machines deserve fast triage. The original oss-security disclosure summarized the impact as unprivileged user to root code execution when cifs-utils, the CIFS kernel module, and unprivileged user and mount namespaces are available, while noting that some default AppArmor or SELinux profiles block the chain. (seclists.org)

The facts that matter first

Champ d'applicationWhat defenders should know
Vulnerability nameCIFSwitch
CVECVE-2026-46243
Primary classLinux local privilege escalation
Zone affectéeLinux kernel CIFS/SMB client interaction with cifs-utils, en particulier cifs.spnego et cifs.upcall
Attack preconditionLocal unprivileged code execution on a host with the vulnerable path reachable
Core bugUserspace could supply cifs.spnego key descriptions containing authority-bearing fields that cifs.upcall treated as if they came from kernel CIFS
Important fieldspid, uid, creduid, upcall_target
Practical impactRoot code execution on exposed systems
Full fixPatched kernel containing the kernel-side validation fix, followed by booting into that fixed kernel
Temporary mitigationsDisable CIFS if unused, remove cifs-utils if unused, override the cifs.spnego request-key rule, disable unprivileged user namespaces where operationally safe, keep SELinux or AppArmor enforcement intact
Main caveatExploitability depends heavily on distro defaults, package state, namespace settings, LSM policy, and whether the fix has been backported

NVD describes the resolved Linux kernel issue as smb: client: reject userspace cifs.spnego descriptions. The NVD record states that cifs.spnego key descriptions contain authority-bearing fields such as pid, uid, creduidet upcall_target, that cifs.upcall treats them as kernel-originating inputs, and that userspace could create keys of this type through request_key(2) ou add_key(2). The kernel fix accepts cifs.spnego descriptions only while CIFS is using its private spnego_cred to request the key. (nvd.nist.gov)

Red Hat’s public bulletin frames the same issue as a vulnerability in the Linux kernel’s CIFS client subsystem that could let a low-privileged local user execute arbitrary commands as root. Red Hat assessed the issue as Important and listed RHEL 10, 9, 8, 7, and 6 as affected, while also warning that RHEL-derived layered products may be potentially impacted because they rely on the RHEL kernel. (Red Hat Customer Portal)

Disclosure and patch timeline

The public disclosure sequence is useful because some early articles and advisories were published before the CVE assignment landed. The oss-security post from Asim Manizada says the issue had been reported to kernel and CIFS maintainers on May 16, 2026, and that the kernel-side fix had been public for more than a week by the time the embargo expired. The disclosed fix commit was 3da1fdf4efbc, titled smb: client: reject userspace cifs.spnego descriptions. (seclists.org)

NVD later received CVE-2026-46243 from kernel.org on June 1, 2026. The NVD change history also shows references to multiple stable kernel commits, including the main fix commit and backports for stable branches. (nvd.nist.gov)

Distribution timing matters. AlmaLinux published an update stating that, as of 2026-06-02 15:31 UTC, the vulnerability had been assigned CVE-2026-46243 and patched kernels had been released to production repositories and mirrors. The same notice instructed users to refresh metadata, upgrade, and reboot. (AlmaLinux OS) LWN also recorded stable kernel releases including 7.0.11, 6.18.34, 6.12.92, 6.6.142, 6.1.175, 5.15.209, and 5.10.258, noting that they contained a fix for CIFSwitch and advising users to upgrade. (lwn.net)

The key operational point is simple: do not decide exposure from the distribution name alone. Decide it from the running kernel, the vendor backport status, installed userspace packages, request-key configuration, namespace policy, and LSM policy. A host can be patched even if it reports an older enterprise kernel version, because enterprise distributions often backport security fixes. A host can also remain vulnerable after a package update if it has not rebooted into the fixed kernel.

CIFS, SMB, cifs-utils, and cifs.upcall

How the Normal CIFS SPNEGO Upcall Flow Works

CIFS is the Linux client-side path for mounting SMB-style network filesystems commonly associated with Windows servers, Samba servers, NAS devices, enterprise file shares, and domain environments. In Linux, the in-kernel CIFS filesystem depends on userspace helpers for some operations that the kernel does not handle directly. The cifs-utils package provides those tools.

The helper at the center of CIFSwitch is cifs.upcall. Les cifs.upcall(8) manual page says the program is generally intended to be run when the kernel calls request-key(8) for a particular key type, and that it is not generally intended to be run directly from the command line. The same manual page lists cifs.spnego as the key type used for retrieving Kerberos session keys and shows a request-key configuration entry that creates cifs.spnego keys by invoking cifs.upcall avec %k. (Man7)

Linux kernel CIFS documentation says Kerberos extended security requires cifs.upcall and request-key configuration. It also notes that NTLM, NTLMv2, and LANMAN support do not require the helper, while Kerberos and DFS support may require userspace helpers and request-key.conf entries. (docs.kernel.org) That distinction matters for mitigation: disabling the cifs.spnego request-key path may break Kerberos CIFS workflows but may be acceptable on systems that do not use Kerberos CIFS mounts.

A second detail matters for modern container and namespace environments. The mount.cifs(8) manual documents the upcall_target option, which determines the namespace in which SMB filesystem upcalls should be handled. The allowed values are mount, which resolves upcalls in the host namespace, and app, which resolves upcalls in the namespace of the calling thread. The documented default is app, and the manual explicitly describes Kubernetes-style use cases where a mount may be performed by a driver pod on behalf of an application in another container. (Man7)

That feature is not inherently bad. It exists to make Kerberos credentials and other user-specific data resolve correctly in containerized or namespace-aware deployments. CIFSwitch arises because a privileged helper trusted inputs that should only have been produced by the kernel’s CIFS path, while userspace could forge the same key type description.

The normal trusted path

A healthy Kerberos CIFS flow looks roughly like this:

User or service requests a CIFS mount with Kerberos
        |
        v
Linux kernel CIFS client needs a SPNEGO or Kerberos key
        |
        v
Kernel constructs a cifs.spnego key description from kernel state
        |
        v
Kernel calls request_key for the cifs.spnego key type
        |
        v
request-key rule invokes cifs.upcall as a privileged helper
        |
        v
cifs.upcall performs credential or Kerberos lookup
        |
        v
Result is returned to the kernel CIFS client

In that normal path, cifs.upcall expects the key description to reflect kernel state. The helper is privileged because it has to perform work on behalf of the kernel’s CIFS client. The bug is not that a helper exists. The bug is that the helper path accepted authority-bearing values from a description that userspace could create.

The name cifs.spnego also matters. SPNEGO, Kerberos, and Active Directory environments are common in enterprise networks, but CIFSwitch is still a local Linux privilege escalation. The attack does not require attacking a remote Windows server. It abuses the local Linux client-side upcall machinery.

The bug, userspace could speak as kernel CIFS

CIFSwitch Attack Path: Forged cifs.spnego Description to Root

The core mistake was a missing origin check. Before the fix, the kernel’s cifs.spnego key type did not reject userspace-created descriptions. The researcher’s write-up explains the bug as a sequence: an attacker in userspace calls request_key("cifs.spnego", fake_description, ...); the pre-patch kernel key type does not reject the untrusted description; the default cifs.spnego request-key rule launches cifs.upcall as root; the helper parses attacker-controlled pid, uid, creduidet upcall_target fields as if they came from kernel CIFS; then upcall_target=app causes the helper to switch into the namespace of the supplied process before performing account lookup. (Hey, it’s Asim)

The dangerous part is the combination. If a root helper switches into a namespace chosen by an attacker-controlled pid, then performs name-service lookups before dropping privileges, the attacker can influence the filesystem view used for those lookups. The same write-up describes the attacker’s mount namespace containing a fake nsswitch.conf and a libnss_*.so.2 module, causing the root helper to load attacker-controlled NSS code. (Hey, it’s Asim)

Red Hat’s technical summary describes the same chain in defensive terms: an attacker can forge cifs.spnego key descriptions through request_key(2), trigger cifs.upcall with attacker-controlled parameters, combine that with user and mount namespace manipulation, and force the helper to load a malicious NSS shared library to achieve local privilege escalation. Red Hat also identifies the affected file as fs/smb/client/cifs_spnego.c, where the key type had registered cifs.spnego without validating that key creation requests originated from the kernel’s CIFS subsystem. (Red Hat Customer Portal)

Why the fields matter

The vulnerable key description fields are not harmless metadata. They shape how a privileged helper interprets authority, namespace, and credential lookup.

Champ d'applicationPourquoi c'est important
pidIdentifies the process whose namespace the helper may treat as the application context
uidHistorically tied to user identity and ownership behavior in CIFS upcall handling
creduidUsed to decide whose credentials should be used for the Kerberos or SPNEGO operation
upcall_targetControls whether the upcall resolves in the mount namespace or application namespace
cifs.spnego key typeTells request-key which helper path to invoke
request-key ruleDefines how the system launches cifs.upcall for the key type

The normal assumption is that these values are kernel-originating. CIFSwitch breaks that assumption. Userspace could create a cifs.spnego request and supply values that cause privileged code to operate in a context chosen by the attacker.

The fix is small but important. The researcher’s write-up shows the essence of the kernel-side fix: add a cifs_spnego_key_vet_description check that returns -EPERM unless the current credentials match CIFS’s private spnego_cred, then register that check as the key type’s .vet_description hook. (Hey, it’s Asim) Debian’s patch view shows the same hardening idea in patch form: cifs.spnego descriptions are authority-bearing inputs to cifs.upcall, and they should only be valid when produced by CIFS using the private spnego_cred; userspace-created keys through request_key(2) ou add_key(2) must be rejected because the helper treats pid, uid, creduidet upcall_target as kernel-originating fields. (sources.debian.org)

That is the whole defensive lesson: authority-bearing descriptions need origin checks. It is not enough that a helper is normally called by the kernel. If userspace can reach the same key type, the helper must not trust the description without proof that it came from the trusted path.

Exploitability conditions

CIFSwitch is not “all Linux machines are rootable.” It is also not “only machines actively mounting SMB shares are interesting.” The right model is a condition chain.

ConditionPourquoi c'est importantExample check
Vulnerable running kernelThe kernel must lack the cifs.spnego description vetting fixVendor advisory, running kernel version, changelog, stable backport
cifs-utils installedProvides cifs.upcall and typical request-key configurationrpm -q cifs-utils ou dpkg -l cifs-utils
cifs.spnego request-key rule presentCauses cifs.upcall to be invoked for the forged key type/etc/request-key.d/cifs.spnego.conf ou /etc/request-key.conf
CIFS kernel client availableThe vulnerable key type must be compiled in or module-loadablelsmod, modinfo cifs, vendor kernel config
Unprivileged namespaces availableNeeded for the namespace portion of the chaindistro sysctls, AppArmor userns policy, container runtime configuration
LSM policy does not block the chainSELinux or AppArmor can disrupt the namespace or helper behaviorgetenforce, aa-status, policy audit logs
Local low-privileged code executionThe attacker must already be able to run code on the hostshell user, compromised process, CI job, malicious local workload

The original disclosure lists the main exploitation prerequisites as cifs-utils with the default cifs.spnego rule, a loadable or compiled-in CIFS kernel module, and unprivileged user and mount namespaces enabled. It also notes that some default AppArmor and SELinux profiles block exploitation. (seclists.org) CIQ’s Rocky Linux advisory gives a similar exposure checklist and warns that systems with local shell users, shared application accounts, CI runners, or workloads that allow attacker-controlled code should be treated as exposed until patched or mitigated. (CIQ Knowledge Base)

Why local still means urgent

A local privilege escalation is often the second half of a real intrusion. The first half gets code execution. The second half turns that foothold into control of the host.

For a single-user laptop that never runs untrusted local code, CIFSwitch may not be the first emergency in the queue. For a shared Linux environment, it is different. A low-privileged foothold is common in many places:

EnvironnementWhy CIFSwitch matters
CI runnersPull requests, build scripts, dependency hooks, and test jobs often execute code with limited privileges
Shared development serversMultiple users may have shell access or run long-lived tools
Web serversA web RCE or uploaded plugin may land as www-data, apache, nginx, or an app user
Security testing machinesKali and lab hosts often run many tools and accept untrusted payloads during authorized testing
Research clustersUsers may be untrusted relative to each other even if they all have accounts
Container hostsA container-level foothold can be dangerous if namespace, mount, or host controls are weak
Kubernetes workersNode compromise after workload execution depends on host hardening and runtime boundaries
Jump boxesLow-privilege shell access can become a path to stored credentials or broader network access

The result of CIFSwitch is not “remote attacker instantly owns the network.” The realistic impact is more precise: an attacker who can run unprivileged code on an exposed host may be able to become root on that host. Root on a CI runner can expose secrets. Root on a developer workstation can expose source, SSH keys, browser sessions, and cloud credentials. Root on a shared server can break tenant isolation. Root on a Kubernetes worker can become a cluster security incident depending on how the node is configured.

Affected distributions and the meaning of non-universal

The researcher called CIFSwitch a non-universal Linux local root vulnerability, and that framing is important. The public distro table includes categories such as stock-default exploitable, exploitable if cifs-utils is installed, and blocked by stock policy. Examples reported as stock-default exploitable include Linux Mint Cinnamon 21.3 and 22.3, CentOS Stream 9 GNOME, Rocky Linux 9 Workstation, multiple Kali Linux headless releases, AlmaLinux 9.7 Workstation or Azure cloud image, and SLES 15 SP7 or SAP variants. The same write-up lists several Ubuntu, Debian, Pop!_OS, CentOS Stream, Rocky, openSUSE, Oracle Linux, and Amazon Linux profiles as exploitable if cifs-utils is installed, while other systems are blocked by default policy unless that policy is relaxed. (Hey, it’s Asim)

Treat that table as a starting point, not as your final source of truth. Enterprise Linux systems are rarely pure stock installs. Security teams change AppArmor profiles, disable or relax SELinux, install file-sharing packages, add Kerberos support, enable rootless containers, run custom kernels, use vendor live patches, and keep old kernels around in boot menus. A host that matches a “blocked by default” distribution can become exposed if policy is relaxed. A host that matches an “exploitable” distribution can be safe if it has a patched kernel, no cifs-utils, no request-key rule, no loadable CIFS client, or user namespaces disabled.

The safe triage question is not “What logo is on this server?” It is “Does this running host still have the vulnerable trusted-upcall path reachable?”

Defensive exposure checks

The following commands are defensive checks. They do not exploit CIFSwitch. They help identify whether a host has the components that make the chain plausible. Run them under your organization’s change and incident-response rules.

#!/usr/bin/env bash
set -u

echo "== Kernel =="
uname -a
cat /proc/version 2>/dev/null || true

echo
echo "== cifs-utils package =="
if command -v rpm >/dev/null 2>&1; then
  rpm -q cifs-utils || true
fi
if command -v dpkg >/dev/null 2>&1; then
  dpkg -l cifs-utils 2>/dev/null | awk 'NR==1 || /cifs-utils/'
fi

echo
echo "== cifs.upcall location =="
command -v cifs.upcall || true
ls -l /usr/sbin/cifs.upcall /sbin/cifs.upcall 2>/dev/null || true

echo
echo "== request-key rules mentioning cifs.spnego =="
grep -R --line-number --fixed-strings "cifs.spnego" \
  /etc/request-key.conf /etc/request-key.d 2>/dev/null || true

echo
echo "== CIFS kernel module state =="
lsmod | awk '$1 == "cifs" {print}'
modinfo cifs 2>/dev/null | sed -n '1,20p' || echo "cifs module info not available"

echo
echo "== Active CIFS mounts =="
findmnt -t cifs 2>/dev/null || true
mount | grep -i ' type cifs ' || true

echo
echo "== CIFS debug data, if available =="
cat /proc/fs/cifs/DebugData 2>/dev/null | sed -n '1,80p' || true

echo
echo "== Namespace related sysctls, distro dependent =="
sysctl kernel.unprivileged_userns_clone 2>/dev/null || true
sysctl user.max_user_namespaces 2>/dev/null || true

echo
echo "== SELinux and AppArmor status =="
command -v getenforce >/dev/null 2>&1 && getenforce || true
command -v aa-status >/dev/null 2>&1 && aa-status --enabled && aa-status || true

Interpreting the result requires care. cifs-utils installed plus a cifs.spnego request-key rule does not prove exploitability. A patched kernel should stop the chain. SELinux or AppArmor may block the chain. Namespace restrictions may block the chain. Conversely, no active CIFS mounts does not automatically mean there is no risk. The bug is triggered through the local request-key path; the system does not need to be actively connected to a Windows file server for the vulnerable helper path to exist.

A practical triage label can look like this:

Triage labelConditions
High priorityRunning kernel not confirmed fixed, cifs-utils installed, cifs.spnego rule present, CIFS available, local users or untrusted code execution exists, namespaces enabled
Medium priorityComponents present but local execution is limited to trusted admins, or LSM policy appears to block the chain
Lower priorityNon cifs-utils, no cifs.spnego rule, CIFS unavailable, or host is confirmed booted into a fixed kernel
Needs investigationVendor backport unclear, custom kernel, live patching, nonstandard request-key configuration, or AppArmor and SELinux policy changed from default

Monitoring for suspicious activity

Detection is not as clean as detection for a network exploit. CIFSwitch lives in local system behavior: keyring syscalls, helper execution, namespaces, NSS lookup, and privilege changes. Red Hat’s bulletin recommends monitoring key creation activity and shows an auditd approach that logs add_key et request_key system calls, which are used during exploitation of the flaw. (Red Hat Customer Portal)

A starting audit rule for x86_64 systems is:

sudo auditctl -a always,exit -F arch=b64 -S add_key -S request_key -k keyring_monitor

For persistent configuration, place an equivalent rule under /etc/audit/rules.d/ according to your distribution’s auditd process, then reload audit rules:

cat <<'EOF' | sudo tee /etc/audit/rules.d/keyring-monitor.rules
-a always,exit -F arch=b64 -S add_key -S request_key -k keyring_monitor
EOF

sudo augenrules --load
sudo auditctl -l | grep keyring_monitor

You can also watch helper execution:

cat <<'EOF' | sudo tee /etc/audit/rules.d/cifs-upcall.rules
-w /usr/sbin/cifs.upcall -p x -k cifs_upcall_exec
-w /sbin/cifs.upcall -p x -k cifs_upcall_exec
EOF

sudo augenrules --load
sudo auditctl -l | grep cifs_upcall

Query examples:

sudo ausearch -k keyring_monitor --start recent
sudo ausearch -k cifs_upcall_exec --start recent
sudo aureport -x --summary | grep -E 'cifs.upcall|request-key|keyctl' || true

Do not treat every request_key event as malicious. Legitimate CIFS Kerberos mounts, DFS behavior, enterprise file-share access, and administrative testing can generate keyring activity. Better alerts combine signals:

SignalPourquoi c'est importantFalse-positive risk
request_key ou add_key from unusual local usersMay indicate forged key attemptsSome legitimate tools use keyrings
cifs.upcall execution without expected CIFS mount activityHelper path invoked unexpectedlyKerberos and DFS can be noisy
User namespace or mount namespace creation near keyring callsMatches the shape of the chainRootless containers and browsers may use namespaces
NSS configuration reads from unusual namespace pathsCould indicate controlled lookup contextHard to observe directly without EDR
Sudden writes under /etc/sudoers.d, /etc/ld.so.preload, systemd units, SSH keysCommon local persistence or privilege follow-onAdmin activity and config management
SELinux or AppArmor denials around cifs.upcall, namespace, NSS, or module loadingMay indicate blocked attemptsCould also reflect normal policy tuning

EDR and SOC teams should avoid writing a single brittle rule such as “any cifs.upcall equals exploit.” The better approach is to correlate unusual keyring syscalls, cifs.upcall, local namespace activity, and post-escalation changes.

Remediation, patched kernel first

CIFSwitch Defense Workflow: Detect, Mitigate, Patch, Reboot

The complete remediation is to install a kernel that contains the CIFSwitch fix and reboot into it. Red Hat explicitly states that applying the kernel fix is the only comprehensive remediation, while mitigation steps reduce attack surface but do not address the root cause. (Red Hat Customer Portal) CIQ’s Rocky Linux advisory states the same core idea: the kernel-side fix is sufficient on its own, and once it is in place the upcall is never invoked with attacker-controlled data. (CIQ Knowledge Base)

A common update workflow looks like this on RHEL-like systems, but use your vendor’s official advisory and your maintenance process:

sudo dnf clean metadata
sudo dnf update 'kernel*' 'cifs-utils*' 'keyutils*'
sudo reboot

On Debian or Ubuntu-like systems:

sudo apt update
sudo apt full-upgrade
sudo reboot

After reboot, confirm that the running kernel changed:

uname -r
last reboot | head
rpm -q kernel 2>/dev/null | tail -n 5 || true
dpkg -l 'linux-image*' 2>/dev/null | awk '/^ii/ {print $2, $3}' | tail -n 10 || true

The mistake to avoid is patching packages but continuing to run the old kernel. Kernel local privilege escalation response is not done until the fixed kernel is running or a live patch solution that includes the fix is confirmed by the vendor.

Temporary mitigations and their tradeoffs

If you cannot reboot immediately, you can break the chain. Each option has business impact.

AtténuationSecurity effectOperational side effectMeilleure adéquation
Disable or blocklist CIFS kernel modulePrevents the CIFS client path from loading if not built inBreaks SMB/CIFS mountsServers that do not need Windows, Samba, NAS, or DFS mounts
Remove cifs-utilsRemoves the userspace helper packageBreaks mount.cifs and Kerberos CIFS workflowsMinimal servers with no CIFS requirement
Override cifs.spnego request-key rulePrevents cifs.upcall from handling cifs.spnegoBreaks Kerberos CIFS authenticationHosts that may need other CIFS behavior but not Kerberos CIFS
Disable unprivileged user namespacesBreaks the namespace portion of the chainCan break rootless containers, some sandboxing, CI workloads, browsers, Podman, build toolsHardened servers where userns is not required
Keep SELinux or AppArmor enforcingMay block exploit stepsPolicy tuning may be needed for legitimate workloadsEnterprise Linux fleets with mature policy operations
Restrict local untrusted code executionReduces precondition availabilityDoes not fix vulnerable host stateShared systems and CI runners while waiting for patch window

The oss-security disclosure includes an example of overriding the cifs.spnego request-key rule so that keyctl negates the request rather than invoking cifs.upcall. (openwall.com) Use this only after validating that Kerberos CIFS is not required on that host:

sudo cp -a /etc/request-key.d/cifs.spnego.conf \
  /etc/request-key.d/cifs.spnego.conf.backup.$(date +%Y%m%d%H%M%S) 2>/dev/null || true

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

If your system uses a different keyctl path, adjust it. Confirm the path first:

command -v keyctl

To disable CIFS if unused:

echo "blacklist cifs" | sudo tee /etc/modprobe.d/disable-cifs.conf

# If cifs is currently loaded, unmount CIFS shares first.
findmnt -t cifs

# Only unload if no CIFS mounts are in use.
sudo modprobe -r cifs

Red Hat warns that blacklisting CIFS prevents all CIFS/SMB client mounts and that active mounts must be unmounted before unloading the module; otherwise a reboot is required for the blacklist to take effect. (Red Hat Customer Portal)

For unprivileged user namespaces, do not blindly apply a sysctl to production. The right control is distribution-specific and workload-specific. On some systems, this may be:

# Example only. Validate on your distribution and workload.
sudo sysctl -w kernel.unprivileged_userns_clone=0

or reducing available user namespaces:

# Example only. Validate before applying broadly.
sudo sysctl -w user.max_user_namespaces=0

These can break legitimate workloads. Rootless containers, browser sandboxing, CI isolation, package build systems, and developer tools may depend on user namespaces. Treat this as a temporary exposure reduction control, not a clean substitute for patching.

Verifying that the fix actually landed

A good post-remediation check answers four questions:

  1. Is the fixed kernel installed?
  2. Is the fixed kernel running?
  3. Are temporary mitigations still needed?
  4. Are any hosts still exposed because they could not reboot?

A defensive validation script can look like this:

#!/usr/bin/env bash
set -u

status="INFO"

echo "CIFSwitch defensive status check"
echo "================================"

running_kernel="$(uname -r)"
echo "Running kernel: $running_kernel"

echo
echo "[1] cifs-utils"
if command -v rpm >/dev/null 2>&1 && rpm -q cifs-utils >/dev/null 2>&1; then
  echo "WARN: cifs-utils installed: $(rpm -q cifs-utils)"
elif command -v dpkg >/dev/null 2>&1 && dpkg -s cifs-utils >/dev/null 2>&1; then
  echo "WARN: cifs-utils installed: $(dpkg-query -W -f='${Version}' cifs-utils)"
else
  echo "PASS: cifs-utils not detected by rpm or dpkg"
fi

echo
echo "[2] cifs.spnego rule"
if grep -R --fixed-strings "cifs.spnego" /etc/request-key.conf /etc/request-key.d >/tmp/cifs_spnego_rules.$$ 2>/dev/null; then
  cat /tmp/cifs_spnego_rules.$$
  if grep -q "cifs.upcall" /tmp/cifs_spnego_rules.$$; then
    echo "WARN: cifs.spnego rule invokes cifs.upcall"
  else
    echo "INFO: cifs.spnego rule exists but does not appear to invoke cifs.upcall"
  fi
else
  echo "PASS: no cifs.spnego request-key rule found"
fi
rm -f /tmp/cifs_spnego_rules.$$

echo
echo "[3] CIFS module"
if lsmod | awk '$1 == "cifs" {found=1} END {exit !found}'; then
  echo "WARN: cifs module currently loaded"
else
  echo "INFO: cifs module not currently loaded"
fi

if modinfo cifs >/dev/null 2>&1; then
  echo "INFO: cifs module is available"
else
  echo "INFO: cifs module not visible through modinfo"
fi

echo
echo "[4] namespaces"
sysctl kernel.unprivileged_userns_clone 2>/dev/null || true
sysctl user.max_user_namespaces 2>/dev/null || true

echo
echo "[5] LSM"
command -v getenforce >/dev/null 2>&1 && echo "SELinux: $(getenforce)" || true
command -v aa-status >/dev/null 2>&1 && aa-status --enabled && echo "AppArmor enabled" || true

echo
echo "Interpretation:"
echo "- PASS on package or rule checks can break the known chain."
echo "- WARN does not prove exploitability."
echo "- A patched running kernel is the preferred fix."
echo "- Confirm fixed kernel status against your distribution advisory."

This script intentionally does not test exploitation. It checks exposure conditions. Running a public PoC on production is a bad validation method because local privilege escalation exploits can alter host state, generate misleading side effects, or contaminate the environment being assessed. Validate exploitability in a controlled lab that mirrors your package set and policy, and use production checks to confirm patch and mitigation status.

For teams using AI-assisted authorized testing workflows, the useful automation is not “spray PoCs everywhere.” It is structured evidence collection: enumerate hosts, classify exposure conditions, confirm patch state, record commands and outputs, retest after reboot, and convert the result into a report that another engineer can reproduce. Penligent describes an authorized, evidence-first agentic pentesting workflow with tool orchestration, finding verification, and reportable proof; that kind of workflow is most useful here when it is constrained to defensive validation and retesting rather than uncontrolled exploit execution. (Penligent)

What CIFSwitch teaches about trust boundaries

CIFSwitch is not a memory corruption story. It is a trust-boundary story. Several individual design choices make sense on their own:

  • CIFS needs userspace help for Kerberos and name-resolution work.
  • request-key provides a mechanism for kernel-triggered userspace helpers.
  • cifs.upcall needs to know which user, credential owner, process, and namespace apply.
  • upcall_target=app is useful for container and Kubernetes-style namespace separation.
  • NSS exists so account lookup can be configured through /etc/nsswitch.conf and modules.

The bug appears when those pieces compose badly. A field that should be kernel-originating can be supplied by userspace. A privileged helper accepts it. The helper switches namespace based on it. NSS loads code based on the namespace’s filesystem view. The final result is root execution.

That is why CIFSwitch is a strong example for security engineers who review Linux integrations, not just kernel developers. The dangerous pattern is broader than CIFS:

Privileged helper accepts structured input
        |
Input contains authority-bearing fields
        |
Helper assumes input came from a trusted component
        |
Userspace can reach the same input path
        |
Helper crosses namespace, filesystem, credential, or policy boundary
        |
Attacker turns a trust assumption into privilege escalation

The fix is a narrow kernel-side origin check, but the design lesson is wider: any helper that treats structured fields as authority must verify both syntax and provenance. Input validation is not only “is this string well formed?” It is also “who was allowed to create this string?”

CIFSwitch compared with Dirty COW, Dirty Pipe, Copy Fail, Dirty Frag, and Fragnesia

CIFSwitch landed in a period when Linux local privilege escalation bugs were already getting fresh attention. It should be compared carefully. The similarities are operational, not always technical.

VulnérabilitéCore primitiveCondition d'exploitationWhy it is relevant to CIFSwitch
Dirty COW, CVE-2016-5195Broken copy-on-write race allowed writes to read-only mappingsLocal userShows how “local only” kernel bugs can become major real-world privilege escalation risks
Dirty Pipe, CVE-2022-0847Uninitialized pipe buffer flags allowed writes to page-cache-backed read-only filesLocal unprivileged userShows how page-cache trust failures can become root paths
Copy Fail, CVE-2026-31431Linux crypto subsystem logic flaw allowed readable file cache corruptionLocal low-privileged executionShows how modern Linux LPEs can chain multiple legitimate features
Dirty Frag and Fragnesia familyNetworking and page-cache related corruption pathsLocal unprivileged execution, subsystem-specificReinforces the importance of subsystem-specific exposure and kernel patch timing
CIFSwitch, CVE-2026-46243Forged CIFS SPNEGO upcall description trusted by privileged helperLocal low-privileged execution plus exposed CIFS upcall chainShows that logic and trust-boundary bugs can be as operationally serious as memory corruption

NVD describes Dirty COW as a race condition in Linux kernel memory handling that allowed local users to gain privileges by leveraging incorrect copy-on-write handling to write to read-only memory mappings, and notes exploitation in the wild in October 2016. (nvd.nist.gov) NVD describes Dirty Pipe as a flaw where uninitialized pipe buffer flags could let an unprivileged local user write to page-cache-backed read-only files and escalate privileges. (nvd.nist.gov) Microsoft describes Copy Fail, CVE-2026-31431, as a high-severity local privilege escalation affecting major Linux distributions, requiring unprivileged local code execution and enabling root escalation through cache corruption of readable files, including setuid binaries. (Microsoft)

CIFSwitch differs from the page-cache family. It does not depend on writing bytes into cached file pages. It depends on a forged key description, a privileged helper, namespace switching, and NSS loading behavior. Still, the shared operational lesson is the same: local footholds are not containment if the kernel or privileged helper path can be turned into root.

Penligent’s Linux LPE coverage of Copy Fail makes a related defensive point: the practical risk in these bugs is often not the nickname, but the path from low-privileged execution to root on systems that run shared or semi-trusted workloads. That same framing applies to CIFSwitch even though the primitive is different. (Penligent)

AI-assisted vulnerability discovery and the multihop problem

The researcher’s own write-up describes CIFSwitch as a distro-specific Linux LPE found by using LLMs for better multihop knowledge composition. (Hey, it’s Asim) That should be read carefully. It does not mean an AI system magically found root on every Linux distribution. It means the discovery involved connecting multiple pieces of knowledge: CIFS key descriptions, request-key behavior, cifs-utils helper assumptions, namespace-aware upcalls, NSS loading, distro package defaults, and LSM policy.

That is exactly the kind of bug class where modern security work is getting harder. A scanner that only checks “is package installed” misses policy nuance. A diff reader that only sees the kernel patch may miss the userspace helper behavior. A pentester who only reads the PoC may miss the business impact of disabling Kerberos CIFS. A SOC rule that only watches cifs.upcall may drown in false positives. The practical response requires composition, but the output still has to be verified against the real host.

For defenders, AI can help summarize advisories, build host checklists, cluster affected assets, and turn command output into evidence. It should not replace patch validation, vendor advisories, or controlled testing. CIFSwitch is a good case for human-reviewed automation: the goal is to reduce blind spots, not to invent certainty.

Prioritization for different teams

Linux administrators should start with patch status and business dependency. Identify hosts with cifs-utils, cifs.spnego rules, CIFS modules, and untrusted local execution. Patch and reboot. If reboot is delayed, break the chain with the least disruptive temporary mitigation.

Cloud security teams should prioritize shared infrastructure: CI runners, Kubernetes workers, developer VMs, bastion hosts, lab boxes, and any instance where users or workloads are not fully trusted. Local privilege escalation on these systems can expose secrets, deployment credentials, source code, SSH keys, cloud tokens, or host-level runtime controls.

SOC teams should deploy temporary audit coverage for request_key, add_keyet cifs.upcall, but should tune alerts around suspicious combinations rather than single events. Watch for namespace creation, unusual local users, helper execution outside expected file-share activity, and follow-on privilege or persistence changes.

Red teams and pentesters should treat CIFSwitch as a post-foothold escalation risk, not an initial access vector. In authorized engagements, the responsible path is to confirm exposure conditions and, if exploit validation is required, run it only in an agreed lab or controlled target scope. A production proof-of-root may be unnecessary when the client accepts a validated vulnerable configuration plus vendor-confirmed impact.

Engineering managers should track exceptions. The most dangerous hosts are often the ones that cannot reboot because they support legacy file-sharing, CI, or production workloads. A temporary mitigation without an owner and expiry date becomes permanent risk.

Common mistakes

The first mistake is dismissing CIFSwitch because it is local. Attack chains are built from stages. Remote code execution as a low-privileged service account followed by local root is a normal pattern, not an edge case.

The second mistake is assuming “we do not use Windows file servers” means “we are safe.” If cifs-utils, cifs.upcallet cifs.spnego request-key configuration are present, the local helper path may exist even without active mounts. Remove or disable what you do not use.

The third mistake is treating SELinux or AppArmor as a universal answer. Some stock policies block the chain, and that is valuable. But policies vary by distribution, version, profile, and local customization. The researcher’s distro table includes systems exploitable with SELinux enforcing or AppArmor active, and systems blocked by stock policy. (Hey, it’s Asim)

The fourth mistake is updating and not rebooting. Kernel fixes do not protect a running host until the fixed kernel is active, unless a vendor-supported live patch mechanism has applied the exact fix.

The fifth mistake is using a public PoC as a production scanner. A PoC is for controlled validation. Production response should rely on patch state, exposure checks, vendor advisories, and safe telemetry.

The sixth mistake is disabling user namespaces everywhere without testing. That may be acceptable on hardened servers, but it can break rootless containers, browser sandboxing, development tools, and CI systems.

Practical response checklist

ÉtapeActionEvidence to keep
1Identify Linux hosts with local users, CI workloads, shared shells, or untrusted code executionAsset list, owner, business role
2Check running kernel and vendor fixed-version statusuname -r, package inventory, vendor advisory mapping
3Vérifier cifs-utils, cifs.upcallet cifs.spnego request-key rulesCommand output from package and config checks
4Check CIFS module availability and active CIFS mountslsmod, modinfo, findmnt -t cifs
5Check namespace and LSM posturesysctls, getenforce, AppArmor status, audit logs
6Patch kernel and rebootchange ticket, reboot time, post-reboot uname -r
7Apply temporary mitigation where reboot is delayedmitigation chosen, business impact, rollback plan
8Monitor keyring and helper activity during exposure windowaudit rules, SIEM queries, triage notes
9Retest after remediationrepeated checklist output
10Close exceptions only after fixed kernel is running or mitigation is formally acceptedowner signoff, expiry date

FAQ

What is CIFSwitch CVE-2026-46243

  • CIFSwitch is a Linux local privilege escalation vulnerability in the CIFS/SMB client and cifs-utils helper path.
  • The CVE is CVE-2026-46243.
  • The bug involves forged cifs.spnego key descriptions that contain fields such as pid, uid, creduidet upcall_target.
  • On exposed systems, a low-privileged local user may be able to execute code as root.
  • It is not a remote unauthenticated SMB server vulnerability.

Is CIFSwitch remotely exploitable

  • Public technical descriptions frame CIFSwitch as local privilege escalation.
  • The attacker needs a way to run low-privileged code on the Linux host first.
  • Remote exposure can still matter indirectly if another vulnerability gives the attacker a local foothold, such as a web RCE, compromised CI job, malicious package script, stolen SSH account, or container workload execution.
  • Treat CIFSwitch as a post-compromise escalation risk.

How do I know whether a Linux host is exposed

  • Confirm whether the running kernel includes the CIFSwitch fix or a vendor backport.
  • Check whether cifs-utils et cifs.upcall are installed.
  • Check whether a cifs.spnego request-key rule invokes cifs.upcall.
  • Check whether the CIFS kernel module is loaded, built in, or loadable.
  • Check whether unprivileged user and mount namespaces are enabled.
  • Check whether SELinux or AppArmor policy blocks the relevant behavior.
  • Prioritize systems that allow local users, CI jobs, containers, or semi-trusted workloads to run code.

Does SELinux or AppArmor block CIFSwitch

  • Sometimes, but not always.
  • Public testing reported some systems blocked by stock policy and others exploitable even with SELinux enforcing or AppArmor active.
  • Local policy changes can move a system from blocked to exposed.
  • Do not rely on the distribution name alone. Check the actual host policy and audit logs.
  • A patched kernel is still the preferred fix.

What is the safest mitigation if I cannot reboot today

  • The safest mitigation depends on business use.
  • If the host does not need SMB/CIFS client functionality, disable or blocklist the cifs kernel module.
  • If the host does not need CIFS tools, remove cifs-utils.
  • If the host does not need Kerberos CIFS, override the cifs.spnego request-key rule so it does not invoke cifs.upcall.
  • If operationally acceptable, disable unprivileged user namespaces temporarily.
  • Keep SELinux or AppArmor enforcing.
  • Record the mitigation owner and expiry date, then patch and reboot as soon as possible.

Should I run the public PoC to test production servers

  • No, not as a default validation method.
  • Public local privilege escalation PoCs can alter host state, trigger root-level side effects, or create confusing forensic artifacts.
  • Use safe exposure checks in production.
  • Validate exploit behavior only in an authorized lab or agreed engagement target.
  • A vendor-confirmed vulnerable configuration plus missing patch is usually enough to justify remediation.

How is CIFSwitch different from Dirty Pipe or Copy Fail

  • Dirty Pipe and Copy Fail are page-cache corruption style local privilege escalation bugs.
  • CIFSwitch is a trusted upcall and namespace/NSS trust-boundary bug.
  • Dirty Pipe abuses pipe buffer state; Copy Fail abuses Linux crypto and page-cache behavior; CIFSwitch abuses a forged cifs.spnego description trusted by cifs.upcall.
  • The operational pattern is similar: low-privileged code execution can become root on exposed Linux hosts.
  • The detection and mitigation signals are different, so do not reuse Dirty Pipe or Copy Fail checks as CIFSwitch coverage.

Does uninstalling cifs-utils fully fix the problem

  • Removing cifs-utils can break the known helper chain on systems that do not need it.
  • It is a mitigation, not the clean kernel fix.
  • If CIFS or Kerberos file sharing is required, uninstalling it may break production workflows.
  • The complete remediation is still a patched kernel running on the host.
  • If you remove it temporarily, track the change and validate business impact.

CIFSwitch is serious because it collapses a local Linux trust boundary. The vulnerable path takes fields that should be kernel-originating, lets userspace forge them, launches a privileged helper, enters a namespace chosen by the attacker, and reaches NSS before dropping privilege. That is not a noisy remote bug. It is the kind of local privilege escalation that turns a modest foothold into host ownership.

The right response is disciplined: identify exposed hosts, patch the kernel, reboot into the fixed version, apply temporary mitigations only where needed, monitor keyring and helper activity during the exposure window, and document the evidence. Do not overstate the bug as universal remote compromise. Do not understate it because it is local. For shared Linux systems, CI infrastructure, developer environments, and cloud nodes that run untrusted or semi-trusted code, CIFSwitch deserves fast, evidence-backed remediation.

Partager l'article :
Articles connexes
fr_FRFrench