---
id: CVE-2026-89638
title: >-
  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 …
summary: >-
  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 …
severity: high
cvss: 7.8
cvssVector: 'CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H'
cwe:
  - CWE-281
vendor: Linux
product: Linux
affected:
  - >-
    Linux >= d32c4f2626acc385d5187bd5c0c24f442328dc60 <
    58b23fc9fb580432470d6c5da3c1e5660dba9fbc
  - >-
    Linux >= d32c4f2626acc385d5187bd5c0c24f442328dc60 <
    b10015807e4c628095d1d1d1c9307efc8cdd9e1b
  - >-
    Linux >= d32c4f2626acc385d5187bd5c0c24f442328dc60 <
    69bfe810ecd1e0387d8975d711cd326341d13c6e
  - >-
    Linux >= d32c4f2626acc385d5187bd5c0c24f442328dc60 <
    b8e5dc4f95e5484159b343903f302eb6d783f2e6
  - Linux 2.6.24
published: '2026-09-11'
updated: '2026-10-15'
sourceUpdated: '2026-10-15T11:17:54.590'
source: NVD
sourceUrl: 'https://nvd.nist.gov/vuln/detail/CVE-2026-89638'
references:
  - url: 'https://git.kernel.org/stable/c/58b23fc9fb580432470d6c5da3c1e5660dba9fbc'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: 'https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6'
    label: 416baaa9-dc9f-4396-8d5f-8c081fb06d67
  - url: >-
      https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89638.json
  - url: 'https://access.redhat.com/security/cve/CVE-2026-89638'
  - url: 'https://bugzilla.redhat.com/show_bug.cgi?id=2532122'
  - url: 'https://www.cve.org/CVERecord?id=CVE-2026-89638'
  - url: 'https://nvd.nist.gov/vuln/detail/CVE-2026-89638'
  - url: >-
      https://git.kernel.org/pub/scm/linux/security/vulns.git/plain/cve/published/2026/CVE-2026-89638.mbox
  - url: 'https://git.kernel.org/stable/c/7ceb6f7cb8f8f2b094e0dcdaf75757775d231378'
  - url: 'https://access.redhat.com/errata/RHSA-2026:89083'
tags:
  - nvd
  - cve.org
  - csaf
  - vex
  - red-hat
epss: 0.00177
epssPercentile: 0.07258
ingestedAt: '2026-09-14T15:23:07.473Z'
ssvc:
  exploitation: none
  automatable: 'no'
  technicalImpact: total
  timestamp: '2026-10-16T19:24:50.502778Z'
patched:
  - enterprise_linux_baseos_v_8
  - enterprise_linux_crb_v_8
---

## Overview

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.

## Remediation

Refer to the linked advisories for vendor-supplied fixes and affected version ranges.

## Vendor advisories

- **Red Hat VEX** · Important · affected: Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · no fix planned: Red Hat Enterprise Linux 10, Red Hat Enterprise Linux 8, Red Hat Enterprise Linux 9 · updated 2026-10-26 · [vex](https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89638.json)
- **RHSA-2026:89083** · Red Hat · fixed in: Red Hat Enterprise Linux BaseOS (v. 8), Red Hat Enterprise Linux CRB (v. 8) · released 2026-10-24 · [advisory](https://access.redhat.com/errata/RHSA-2026:89083)
