/

CVE-2026-46243

Severity:

HIGH RISK

(7.1)

Improper Input Validation in Linux Kernel CIFS cifs.spnego

CVE-2026-46243

Modified

Vulnerability type

Category:

Improper Input Validation

CWE:

CWE-20, CWE-825

Impact:

Privilege or authority spoofing in CIFS/SMB authentication context

Severity:

HIGH RISK

(7.1)

CVSS version:

3.1

Catch this CVE while code is being written

Detect vulnerable code directly in pull requests, so CVEs are fixed before merge.

Summary

The Linux kernel CIFS client incorrectly trusted authority-bearing fields in cifs.spnego key descriptions that could be created from userspace, treating them as if they originated from the kernel.

Under certain conditions, an attacker able to create or manipulate cifs.spnego keys via request_key(2) or add_key(2) could inject fake identity or authority metadata, potentially impacting authentication or access control behavior in CIFS/SMB mounts.

Affected context

This vulnerability exists in the Linux kernel CIFS/SMB client when:

  • The system uses the CIFS client to mount or access SMB shares.
  • The kernel relies on cifs.spnego keys, whose descriptions include fields such as pid, uid, creduid, and upcall_target, to coordinate with cifs.upcall.
  • Userspace processes can invoke request_key(2) or add_key(2) to create keys of type cifs.spnego.

In such environments, the kernel may incorrectly treat user-created key descriptions as if they were kernel-originated, blurring the trust boundary between kernel and userspace.

Exploit preconditions

  • Attack surface: Kernel key management subsystem in systems using the CIFS/SMB client.
  • Required access: Ability to run code on the system and call request_key(2) or add_key(2) to create or influence cifs.spnego keys. Typically requires local user access; further constraints may be imposed by system keyring policies.
  • Trigger point: Authentication or credential negotiation for CIFS/SMB operations where the kernel requests or looks up a cifs.spnego key and consumes its description fields.
  • Why exploitation is possible: The CIFS client logic treated authority-bearing fields (pid, uid, creduid, upcall_target) in cifs.spnego key descriptions as trustworthy kernel-originated data, without robust validation that the descriptions were generated only by the kernel. This allowed untrusted userspace-created keys to masquerade as kernel-authored inputs.

Why this happens

The core issue is improper input validation at the kernel/userspace boundary for key descriptions, aligning with CWE-20 (Improper Input Validation).

The cifs.spnego key type embeds authority-bearing metadata (such as process ID and user IDs) in its description, which is later interpreted by cifs.upcall and associated CIFS client code as if it reliably reflects kernel state. However, the Linux key management APIs allow userspace to create keys of this type directly via request_key(2) or add_key(2). The CIFS client did not sufficiently distinguish between keys created by its internal, trusted mechanism (using spnego_cred) and keys fabricated in userspace.

Conceptually, the bug is that untrusted, user-controlled descriptive fields were accepted as authoritative identity and context information. Rather than enforcing strict provenance checks or scoping, the code path relied on format and type alone, trusting data that should have been considered untrusted input.

Potential impact

  • Local users may be able to spoof authority-bearing metadata (pid, uid, creduid, upcall_target) used during CIFS/SMB authentication flows.
  • CIFS/SMB mounts could potentially be associated with misleading or incorrect credentials, affecting access control decisions at the SMB server or client.
  • Logging, auditing, or attribution around CIFS operations could become unreliable, as forged identity information is consumed as if kernel-originated.
  • In misconfigured or tightly integrated environments, forged key descriptions could contribute to broader credential misuse or privilege-related confusion within CIFS-related workflows.

General mitigation guidance

Mitigation focuses on enforcing strict trust boundaries between kernel and userspace for authority-bearing metadata:

  • Ensure that kernel subsystems that interpret key descriptions or similar metadata only accept values derived from trusted internal sources, not arbitrary userspace-provided data.
  • Gate the acceptance of sensitive key types (such as cifs.spnego) on internal state, such as a private, kernel-controlled credential (e.g., spnego_cred), so that only keys requested under that context are trusted.
  • Treat all data arriving from userspace, even via structured kernel APIs like request_key(2) or add_key(2), as untrusted unless provenance is verifiably kernel-only.
  • Apply least-privilege principles to keyring access: restrict which users and processes may create or modify security-sensitive key types to reduce attack surface.
  • Where feasible, design protocols so that identity and authority data is derived from well-defined kernel structures or cryptographically protected tokens, rather than free-form descriptions.

How teams detect issues like this

Possible detection and assurance strategies include:

  • Code review focus: Examine kernel and low-level components that consume key descriptions, credentials, or identity-bearing fields for any assumptions that such data is kernel- or system-originated. Flag paths where userspace can provide data of the same type or format.
  • Static analysis patterns: Configure tooling to highlight flows where:
  • Userspace-controllable data (key descriptions, ioctl parameters, netlink payloads) is used to populate security-sensitive fields like UIDs, PIDs, or credential selectors.
  • Trust decisions are made based solely on type or format, without checking provenance or call context.
  • Policy and configuration checks: Review keyring and security policy configurations (e.g., LSMs, keyring permissions) to ensure ordinary users cannot create or modify highly sensitive key types such as cifs.spnego.
  • Runtime monitoring: Log and monitor creation and usage of special-purpose key types by unprivileged users. Unexpected patterns of cifs.spnego key creation from non-system processes can be a signal of misuse or attempted exploitation.

Sources

SourceLink
git.kernel.orggit.kernel.org/stable/c/0aece6685fc80a8de492688ca2315fb86ec379c7
git.kernel.orggit.kernel.org/stable/c/2035acfb17221729b1b8ac335e941868a04ca079
git.kernel.orggit.kernel.org/stable/c/3da1fdf4efbc490041eb4f836bf596201203f8f2
git.kernel.orggit.kernel.org/stable/c/7713bd320ed4fc3d08a227cd8e41242219a16981
git.kernel.orggit.kernel.org/stable/c/91f89c1d83e80417629791fcef6af8140d7d01c8
git.kernel.orggit.kernel.org/stable/c/9544559e59438a4b609b2fdfa0763d8360572824
git.kernel.orggit.kernel.org/stable/c/a3bbda6502a9398b816fa2e71c9a3f955f58013d
git.kernel.orggit.kernel.org/stable/c/cf20038657d6d4974349556a34e08fe0490bebbc
openwall.comopenwall.com/lists/oss-security/2026/06/01/6
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23258
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23259
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23329
access.redhat.comaccess.redhat.com/errata/RHSA-2026:23395
access.redhat.comaccess.redhat.com/errata/RHSA-2026:24381
access.redhat.comaccess.redhat.com/errata/RHSA-2026:25908
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26462
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26515
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26535
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26563
access.redhat.comaccess.redhat.com/errata/RHSA-2026:26570
access.redhat.comaccess.redhat.com/errata/RHSA-2026:27708
access.redhat.comaccess.redhat.com/errata/RHSA-2026:27719
access.redhat.comaccess.redhat.com/errata/RHSA-2026:27729
access.redhat.comaccess.redhat.com/errata/RHSA-2026:27735
access.redhat.comaccess.redhat.com/errata/RHSA-2026:28887
access.redhat.comaccess.redhat.com/errata/RHSA-2026:28962
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33219
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33220
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33221
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33222
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33223
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33224
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33225
access.redhat.comaccess.redhat.com/errata/RHSA-2026:33486
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34048
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34757
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34764
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34788
access.redhat.comaccess.redhat.com/errata/RHSA-2026:34815
access.redhat.comaccess.redhat.com/errata/RHSA-2026:36620
access.redhat.comaccess.redhat.com/errata/RHSA-2026:40021
access.redhat.comaccess.redhat.com/errata/RHSA-2026:41236
access.redhat.comaccess.redhat.com/errata/RHSA-2026:47727
access.redhat.comaccess.redhat.com/security/cve/CVE-2026-46243
bugzilla.redhat.combugzilla.redhat.com/show_bug.cgi?id=2481486
cert-portal.siemens.comcert-portal.siemens.com/productcert/html/ssa-784472.html
github.comgithub.com/manizada/CIFSwitch
security.access.redhat.comsecurity.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-46243.json

Frequently asked

questions

Not directly in the typical sense. It primarily requires local code execution with the ability to interact with the key management APIs. However, its effects may influence how CIFS/SMB operations behave in communication with remote servers.

An attacker generally needs local user-level access that allows invoking request_key(2) or add_key(2) and the ability to create or influence cifs.spnego keys. System-specific keyring policies or security modules may further restrict who can perform these operations.

The safest pattern is to treat all data that can originate in userspace as untrusted and validate both its content and its provenance. For authority-bearing metadata, only accept values derived from kernel-controlled structures or from code paths gated by a trusted internal credential or handle. Avoid inferring trust solely from the key type or description format.

Developers should:

  • Clearly document trust boundaries between kernel and userspace (or between privileged and unprivileged components).
  • Ensure that security decisions never rely on data that can be spoofed from a less-trusted domain.
  • Incorporate security-focused code reviews and static checks that flag uses of user-controllable metadata in authentication, authorization, or credential-handling code paths.
  • Favor designs where sensitive identity or authority information is derived from canonical kernel or service-side state rather than from descriptive strings or loosely structured fields.
Find out what's already
exploitable in your codebase.