CVE-2026-89638
High · 7.8CVSS
7.8
EPSS
0.2%
Published
Sep 11, 2026
CISA due date
—
Cloudanix analysis
A flaw in how Linux handles file permissions over certain network file shares can let special privilege bits survive file writes, potentially allowing users to keep or gain extra access they should lose.
- Exploitation
- Local Privilege
- Attacker needs
- Low Privilege
- Complexity
- Low
- Impact
- Full Compromise
- Component
- OS kernel
- Class
- Authorization Bypass
- Remediation
- Upgrade
- Effort
- Medium
- Patch risk
- Low
What it actually does
The Linux kernel SMB client fails to propagate cleared setuid/setgid bits to the server when writing files over mounts using cifsacl, modefromsid, or SMB3.1.1 POSIX extensions, leaving the bits intact on the remote filesystem.
Why it matters to the business
Attackers who can write to files on affected SMB shares may retain elevated execution privileges after writes, enabling unauthorized privilege escalation across shared storage used by many Linux systems.
How an attack unfolds
An attacker obtains write access to a setuid or setgid binary on a CIFS mount configured with cifsacl, modefromsid, or POSIX extensions, performs a write that would normally clear those bits, and the kernel omits the mode update so the elevated bits remain; subsequent execution of the file grants the attacker the retained privileges.
How to fix it
Upgrade the Linux kernel to a version containing the fix that removes the ATTR_MODE shortcut in cifs_setattr_nounix and cifs_setattr_unix when ACL or POSIX mode handling is active.
How to confirm the fix worked
Verify the running kernel contains the upstream commit that conditions the ATTR_KILL_SUID/ATTR_KILL_SGID shortcut on DOS-attribute-only emulation; test by writing a setuid file over an affected mount and confirming the mode is cleared on the server.
Typical attack path
- Mount remote SMB share with cifsacl, modefromsid, or POSIX extensions enabled
- Locate or create a setuid/setgid executable on the share
- Write to the file (for example via editor or copy)
- Execute the file to obtain unintended elevated privileges on the client or server
How to detect it
Review kernel audit logs and SMB client traces for setattr operations that omit mode updates on mounts using ACL or POSIX extensions; examine file mode changes on SMB servers for unexpected persistence of setuid/setgid bits after client writes.
What your security team should do
- Prioritize kernel updates for systems mounting SMB shares with cifsacl, modefromsid, or POSIX extensions
- Audit mount options in fstab and automounter configurations for the affected flags
- Restrict write access to setuid/setgid binaries on SMB shares until patches are applied
The record
In the Linux kernel, the following vulnerability has been resolved: smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions When a file has the setuid or setgid bit set and is written to, the VFS strips those bits and issues a setattr with ATTR_KILL_SUID/ATTR_KILL_SGID together with an ATTR_MODE carrying the already-cleared mode. Both cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped ATTR_MODE in that case: /* skip mode change if it's just for clearing setuid/setgid */ if (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID)) attrs->ia_valid &= ~ATTR_MODE; This is fine for the default mount, where the mode is only emulated via the DOS read-only attribute and cannot represent the setuid/setgid bits anyway. However, with the "cifsacl" or "modefromsid" mount options the mode is stored on the server through an ACL (id_mode_to_cifs_acl()), with the SMB3.1.1 POSIX extensions the mode is sent to the server directly, and with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent via CIFSSMBUnixSetPathInfo(). In all those cases dropping ATTR_MODE means the cleared mode is never pushed to the server, so the setuid/setgid bit survives the write. This is a security issue: on local filesystems the setuid bit is stripped when a file is written, but over these cifs.ko mounts the bit persists on the server, potentially allowing an unexpected privilege escalation on subsequent execution. Fix this in two places: 1. cifs_setattr_nounix(): only take the "skip mode change" shortcut when the mode is emulated via the DOS read-only attribute (i.e. neither cifsacl/modefromsid nor the SMB3.1.1 POSIX extensions are in effect), so that the cleared mode is propagated to the server in the ACL / POSIX cases. 2. cifs_setattr_unix(): this function is only called when Unix extensions are in effect, so the mode is always stored on the server. Remove the shortcut entirely so that the cleared mode is always pushed.
Affected packages
| Ecosystem | Package | Introduced | Fixed |
|---|