PT-2026-90354 · Linux · Linux

CVE-2026-89638

·

Published

2026-09-11

·

Updated

2026-09-11

None

No severity ratings or metrics are available. When they are, we'll update the corresponding info on the page.
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.
Found an issue in the description? Have something to add? Feel free to write us 👾

Related Identifiers

CVE-2026-89638

Affected Products

Linux