# CVE-2026-89638: smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions

- Priority: **Routine**
- Reason: Not severe (CVSS 7.8, local access); no exploitation reported by the 5 checked sources
- Next step: Fix in the normal cadence
- Status: published
- Published: 2026-09-11 · Modified: 2026-10-30
- Aliases: UBUNTU-CVE-2026-89638, DEBIAN-CVE-2026-89638
- Record: https://cvemate.com/vulnerability/CVE-2026-89638 · JSON: https://cvemate.com/vulnerability/CVE-2026-89638/json

## Description

```text
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.
```

## Signals

- CVSS: 7.8 high (v3.1, CVE.org) CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H
- EPSS: 0.197%, percentile 9.808%, as of 2026-12-05
- Known exploited (KEV): CISA not listed, ENISA not listed, CIRCL not listed
- Ransomware use: none recorded
- Public exploits: 0

## Affected (first 20 of 172)

- debian linux (Debian): All versions (No fix recorded) \| \< 6.1.192-1 \| \< 6.12.113-1 \| \< 7.2.6-1
- debian linux-6.12 (Debian): \< 6.12.113-1~deb12u1
- ubuntu linux (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-204.214 \| \< 6.8.0-149.149 \| \< 7.0.0-42.42
- ubuntu linux-allwinner-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1121.128 \| \< 6.8.0-1069.74 \| \< 7.0.0-1016.17
- ubuntu linux-aws-5.0 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.11 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.13 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.15 (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1121.128~20.04.1
- ubuntu linux-aws-5.19 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.3 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.4 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-5.8 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.14 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.17 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.2 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.5 (Ubuntu): All versions (No fix recorded)
- ubuntu linux-aws-6.8 (Ubuntu): All versions (No fix recorded) \| \< 6.8.0-1069.74~22.04.1
- ubuntu linux-aws-7.0 (Ubuntu): All versions (No fix recorded) \| \< 7.0.0-1017.18~24.04.1
- ubuntu linux-aws-fips (Ubuntu): All versions (No fix recorded) \| \< 5.15.0-1121.128+fips1 \| \< 6.8.0-1069.74+fips1

## References (first 20 of 38)

- <https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b>
- <https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e>
- <https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6>
- <https://ubuntu.com/security/CVE-2026-89638>
- <https://www.cve.org/CVERecord?id=CVE-2026-89638>
- <https://git.kernel.org/linus/b8e5dc4f95e5484159b343903f302eb6d783f2e6>
- <https://security-tracker.debian.org/tracker/CVE-2026-89638>
- <https://git.kernel.org/stable/c/58b23fc9fb580432470d6c5da3c1e5660dba9fbc>
- <https://git.kernel.org/stable/c/7ceb6f7cb8f8f2b094e0dcdaf75757775d231378>
- <https://git.kernel.org/stable/c/ce0e675907b887db2b1e44a806118b0a7d8b6b18>
- <https://git.kernel.org/stable/c/a3a0cc83761e46a75b1ed6bfaf35961f2c211148>
- <https://git.kernel.org/stable/c/2a5206992f526178881e8f5c4644757c336fb76d>
- <https://ubuntu.com/security/notices/USN-8959-1>
- <https://ubuntu.com/security/notices/USN-8960-1>
- <https://ubuntu.com/security/notices/USN-9002-1>
- <https://ubuntu.com/security/notices/USN-9020-1>
- <https://ubuntu.com/security/notices/USN-9023-1>
- <https://ubuntu.com/security/notices/USN-9025-1>
- <https://ubuntu.com/security/notices/USN-9022-1>
- <https://ubuntu.com/security/notices/USN-9024-1>

---

Data as of 2026-12-06T04:32:54.669Z. The priority label is CveMate's own model from public evidence, not an official rating, and it knows nothing about your assets. How labels are decided: https://cvemate.com/faq#priority
