CVE-2026-89638
Last modified
CVE-2026-89638 is a high-severity vulnerability rated 7.8/10 on the CVSS scale. 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(). EPSS estimates a 0.21% chance of exploitation in the next 30 days.
Description
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.
Metrics
Affected Software
Source: CNA advisory (CVE.org). NVD analysis pending.
| Vendor | Product | Versions |
|---|---|---|
| Linux | Linux | >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < b10015807e4c628095d1d1d1c9307efc8cdd9e1b; >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < 69bfe810ecd1e0387d8975d711cd326341d13c6e; >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < b8e5dc4f95e5484159b343903f302eb6d783f2e6 |
| Linux | Linux | 2.6.24 |
References
Timeline
- Published
- Last Modified
- Status
- Received
Frequently Asked Questions
What is CVE-2026-89638?
How severe is CVE-2026-89638?
How do I fix CVE-2026-89638?
How Strix Helps
- How Strix found a critical auth bypass in etcdStrix autonomously discovered a critical authentication bypass in etcd, later designated CVE-2026-33413.
- Autonomous PentestingAI agents that find and validate exploitable vulnerabilities like this one across your applications.
- PR ReviewsPentest every pull request so vulnerable code is caught before it ships to production.
- AI Penetration TestingHow AI-driven penetration testing continuously covers your attack surface.
Related CVEs from 2026
- CVE-2026-89632In the Linux kernel, the following vulnerability has been re…8.2
- CVE-2026-89633In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-89634In the Linux kernel, the following vulnerability has been re…9.1
- CVE-2026-89635In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-89636In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-89637In the Linux kernel, the following vulnerability has been re…9.8
- CVE-2026-89639In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2026-8964Spoofing issue in the Popup Blocker component. This vulnerab…7.5
- CVE-2026-89640In the Linux kernel, the following vulnerability has been re…7.1
- CVE-2026-89641In the Linux kernel, the following vulnerability has been re…7.8
- CVE-2026-89642In the Linux kernel, the following vulnerability has been re…
- CVE-2026-89643In the Linux kernel, the following vulnerability has been re…9.8
Are you affected by CVE-2026-89638?
Run a free Strix scan to check your systems for this vulnerability.
Scan your code nowSource: NVD / NIST
