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

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.8
- **CVSS:** 7.8 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: High; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.20% (percentile 5, 2026-11-28)
- **Published:** 2026-09-11T19:45:31.791Z
- **Modified:** 2026-10-30T13:20:23.393Z

## Who should check

- Anyone running Linux \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< ce0e675907b887db2b1e44a806118b0a7d8b6b18; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< a3a0cc83761e46a75b1ed6bfaf35961f2c211148; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 2a5206992f526178881e8f5c4644757c336fb76d; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 58b23fc9fb580432470d6c5da3c1e5660dba9fbc; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b10015807e4c628095d1d1d1c9307efc8cdd9e1b; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 69bfe810ecd1e0387d8975d711cd326341d13c6e; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b8e5dc4f95e5484159b343903f302eb6d783f2e6
- Anyone running Linux 2.6.24

## 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.

## Affected and fixed versions

- Linux: \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< ce0e675907b887db2b1e44a806118b0a7d8b6b18; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< a3a0cc83761e46a75b1ed6bfaf35961f2c211148; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 2a5206992f526178881e8f5c4644757c336fb76d; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 58b23fc9fb580432470d6c5da3c1e5660dba9fbc; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b10015807e4c628095d1d1d1c9307efc8cdd9e1b; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 69bfe810ecd1e0387d8975d711cd326341d13c6e; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b8e5dc4f95e5484159b343903f302eb6d783f2e6 (cvelist)
- Linux: 2.6.24 (cvelist)

## Mitigation

- No fix listed yet: follow the vendor advisory.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2026-89638. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2026-89638.md
Affected: Linux >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < ce0e675907b887db2b1e44a806118b0a7d8b6b18; >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < a3a0cc83761e46a75b1ed6bfaf35961f2c211148; >= d32c4f2626acc385d5187bd5c0c24f442328dc60, < 2a5206992f526178881e8f5c4644757c336fb76d; >= d32c4f2626acc385d5187bd…
Fixed in: Linux 2a5206992f526178881e8f5c4644757c336fb76d, Linux 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378, Linux 58b23fc9fb580432470d6c5da3c1e5660dba9fbc, Linux 69bfe810ecd1e0387d8975d711cd326341d13c6e

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2026-89638 being exploited?

There is no confirmed exploitation: CVE-2026-89638 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.20% chance of exploitation in the next 30 days (as of 2026-11-28).

### How serious is CVE-2026-89638?

High: CVSS 7.8 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2026-89638?

Linux \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< ce0e675907b887db2b1e44a806118b0a7d8b6b18; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< a3a0cc83761e46a75b1ed6bfaf35961f2c211148; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 2a5206992f526178881e8f5c4644757c336fb76d; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 58b23fc9fb580432470d6c5da3c1e5660dba9fbc; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b10015807e4c628095d1d1d1c9307efc8cdd9e1b; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< 69bfe810ecd1e0387d8975d711cd326341d13c6e; \>= d32c4f2626acc385d5187bd5c0c24f442328dc60, \< b8e5dc4f95e5484159b343903f302eb6d783f2e6; Linux 2.6.24.

### Is there a fix for CVE-2026-89638?

Yes. Fixed in Linux 2a5206992f526178881e8f5c4644757c336fb76d, Linux 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378, Linux 58b23fc9fb580432470d6c5da3c1e5660dba9fbc, Linux 69bfe810ecd1e0387d8975d711cd326341d13c6e. No fix listed yet: follow the vendor advisory.

### How do I check if I'm affected by CVE-2026-89638?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- other: <https://git.kernel.org/stable/c/ce0e675907b887db2b1e44a806118b0a7d8b6b18>
- other: <https://git.kernel.org/stable/c/a3a0cc83761e46a75b1ed6bfaf35961f2c211148>
- other: <https://git.kernel.org/stable/c/2a5206992f526178881e8f5c4644757c336fb76d>
- other: <https://git.kernel.org/stable/c/7ceb6f7cb8f8f2b094e0dcdaf75757775d231378>
- other: <https://git.kernel.org/stable/c/58b23fc9fb580432470d6c5da3c1e5660dba9fbc>
- other: <https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b>
- other: <https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e>
- other: <https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2026-89638>

HTML: <https://flawdb.com/CVE-2026-89638> · JSON: <https://flawdb.com/api/v1/entries/CVE-2026-89638>
