CVE-2026-89638

smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions

7.8 high EPSS 0.20%

Published 11 Sep 2026 Updated 30 Oct 2026 CNA: Linux

Check your servers for CVE-2026-89638

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2026-89638 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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.

Severity (CVSS)

7.8 high CVSS 3.1 from Linux (CNA)
CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
Attack vector
local: the attacker needs local access, or a user has to open a prepared file
Attack complexity
low: an attack works without special conditions
Privileges required
low: the attacker needs an ordinary user account
User interaction
none: nobody has to click or open anything
Scope
unchanged: the damage stays inside the vulnerable component
Impact
confidentiality high, integrity high, availability high: what an attacker can read (confidentiality), change (integrity) or stop (availability)

Exploitation

EPSS 0.20%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 9.85% of all scored CVEs. Scores of 1 Dec 2026.

The assessment of CISA (SSVC, 16 Oct 2026):

Exploitation
none: CISA did not find evidence of exploitation or a public proof of concept
Automatable
no: each attack takes manual steps
Technical impact
total: full control of the component or of its data

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before ce0e675907b887db2b1e44a806118b0a7d8b6b18
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before a3a0cc83761e46a75b1ed6bfaf35961f2c211148
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before 2a5206992f526178881e8f5c4644757c336fb76d
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before 58b23fc9fb580432470d6c5da3c1e5660dba9fbc
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before b10015807e4c628095d1d1d1c9307efc8cdd9e1b
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before 69bfe810ecd1e0387d8975d711cd326341d13c6e
affected from d32c4f2626acc385d5187bd5c0c24f442328dc60, before b8e5dc4f95e5484159b343903f302eb6d783f2e6
Other versions: unaffected
Linux
affected 2.6.24
unaffected before 2.6.24
unaffected from 5.10.273 up to and including 5.10.*
unaffected from 5.15.224 up to and including 5.15.*
unaffected from 6.1.191 up to and including 6.1.*
unaffected from 6.6.160 up to and including 6.6.*
unaffected from 6.12.113 up to and including 6.12.*
unaffected from 6.18.51 up to and including 6.18.*
unaffected from 7.2.4 up to and including 7.2.*
unaffected 7.3 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2026-89638 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2026-89638

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2026-89638
trivy image --scanners vuln IMAGE | grep CVE-2026-89638

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2026-89638 of the CVE List (CVE Program), CVE Terms of Use; the CISA KEV catalog and the CISA ADP container; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.