{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-89638","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-11T19:38:34.740Z","datePublished":"2026-09-11T19:45:31.791Z","dateUpdated":"2026-09-13T06:32:18.174Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-09-13T06:32:18.174Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions\n\nWhen a file has the setuid or setgid bit set and is written to, the VFS\nstrips those bits and issues a setattr with ATTR_KILL_SUID/ATTR_KILL_SGID\ntogether with an ATTR_MODE carrying the already-cleared mode.\n\nBoth cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped\nATTR_MODE in that case:\n\n\t/* skip mode change if it's just for clearing setuid/setgid */\n\tif (attrs->ia_valid & (ATTR_KILL_SUID|ATTR_KILL_SGID))\n\t\tattrs->ia_valid &= ~ATTR_MODE;\n\nThis is fine for the default mount, where the mode is only emulated via\nthe DOS read-only attribute and cannot represent the setuid/setgid bits\nanyway.  However, with the \"cifsacl\" or \"modefromsid\" mount options the\nmode is stored on the server through an ACL (id_mode_to_cifs_acl()), with\nthe SMB3.1.1 POSIX extensions the mode is sent to the server directly,\nand with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent\nvia CIFSSMBUnixSetPathInfo().  In all those cases dropping ATTR_MODE means\nthe cleared mode is never pushed to the server, so the setuid/setgid bit\nsurvives the write.\n\nThis is a security issue: on local filesystems the setuid bit is stripped\nwhen a file is written, but over these cifs.ko mounts the bit persists on\nthe server, potentially allowing an unexpected privilege escalation on\nsubsequent execution.\n\nFix this in two places:\n\n  1. cifs_setattr_nounix(): only take the \"skip mode change\" shortcut\n     when the mode is emulated via the DOS read-only attribute (i.e.\n     neither cifsacl/modefromsid nor the SMB3.1.1 POSIX extensions are\n     in effect), so that the cleared mode is propagated to the server\n     in the ACL / POSIX cases.\n\n  2. cifs_setattr_unix(): this function is only called when Unix\n     extensions are in effect, so the mode is always stored on the\n     server.  Remove the shortcut entirely so that the cleared mode is\n     always pushed."}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":7.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:L - The bug is in the CIFS client setattr path, reached by local write(2)/truncate(2) on an SMB mount: cifs_file_write_iter -> netfs_file_write_iter -> file_remove_privs -> notify_change -> cifs_setattr_unix/nounix. This is not ksmbd; a remote SMB peer cannot invoke the ATTR_MODE skip.\nAC:L - Once the share stores POSIX mode (cifsacl, modefromsid, SMB3.1.1 POSIX, or SMB1 Unix extensions), a write to a setuid/setgid file deterministically drops ATTR_MODE so the cleared bits are never pushed. The attacker controls the write and later exec, with no race or uninfluenced memory layout.\nPR:L - An unprivileged local user with write access to the setuid/setgid file (group/world-writable helper, or noperm) triggers file_remove_privs; ATTR_FORCE skips ownership/CAP_FSETID checks in setattr_prepare, and no init-namespace capability is required.\nUI:N - The attacker opens, writes, and execve()s the still-setuid file on an already-mounted share; no other user must mount the filesystem, confirm a prompt, or run the binary.\nS:U - Remaining setuid/setgid execution escalates privileges inside the same kernel/OS security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - After the attacker overwrites a privileged setuid/setgid helper, the uncleared bits allow execve of attacker-controlled contents as the file owner (including root on Samba POSIX/cifsacl deployments), disclosing all data that owner can read.\nI:H - The same still-setuid execution runs attacker-supplied file contents with the owner's privileges, enabling arbitrary writes and full integrity compromise, which is the POSIX reason those bits are stripped on write.\nA:H - Attacker-controlled code running as the privileged file owner can panic, halt, or disable the host, so successful exploitation yields complete availability loss."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/inode.c"],"versions":[{"version":"d32c4f2626acc385d5187bd5c0c24f442328dc60","lessThan":"b10015807e4c628095d1d1d1c9307efc8cdd9e1b","status":"affected","versionType":"git"},{"version":"d32c4f2626acc385d5187bd5c0c24f442328dc60","lessThan":"69bfe810ecd1e0387d8975d711cd326341d13c6e","status":"affected","versionType":"git"},{"version":"d32c4f2626acc385d5187bd5c0c24f442328dc60","lessThan":"b8e5dc4f95e5484159b343903f302eb6d783f2e6","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/client/inode.c"],"versions":[{"version":"2.6.24","status":"affected"},{"version":"0","lessThan":"2.6.24","status":"unaffected","versionType":"semver"},{"version":"6.18.51","lessThanOrEqual":"6.18.*","status":"unaffected","versionType":"semver"},{"version":"7.2.4","lessThanOrEqual":"7.2.*","status":"unaffected","versionType":"semver"},{"version":"7.3-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"6.18.51"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"7.2.4"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"2.6.24","versionEndExcluding":"7.3-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b"},{"url":"https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e"},{"url":"https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6"}],"title":"smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions","x_generator":{"engine":"bippy-1.2.0"}}}}