Skip to content
Heist/ feed
High

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

Type: advisorySource: Official CVE List1 source record

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():

Announced Source revision 1
Original source ↗

CVE-2026-89638

Primary source · Revision 1

Imported from structured advisory data. Source references identify upstream records or fields; verify affected versions and your deployed configuration.

Security context

Source reference: cve:CVE-2026-89638

Linux

Source reference: /containers/cna/affected/0/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Linux

Source reference: /containers/cna/affected/1/product

Affected versions
Not stated in this record
Fixed versions
Not stated in this record
Prerequisites
Not stated in this record

Structured affected-version data

Original package identities and version rules from this source.

[
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
        "lessThan": "7ceb6f7cb8f8f2b094e0dcdaf75757775d231378",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
        "lessThan": "58b23fc9fb580432470d6c5da3c1e5660dba9fbc",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
        "lessThan": "b10015807e4c628095d1d1d1c9307efc8cdd9e1b",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
        "lessThan": "69bfe810ecd1e0387d8975d711cd326341d13c6e",
        "versionType": "git"
      },
      {
        "status": "affected",
        "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
        "lessThan": "b8e5dc4f95e5484159b343903f302eb6d783f2e6",
        "versionType": "git"
      }
    ],
    "programFiles": [
      "fs/smb/client/inode.c"
    ],
    "defaultStatus": "unaffected"
  },
  {
    "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
    "vendor": "Linux",
    "product": "Linux",
    "versions": [
      {
        "status": "affected",
        "version": "2.6.24"
      },
      {
        "status": "unaffected",
        "version": "0",
        "lessThan": "2.6.24",
        "versionType": "semver"
      },
      {
        "status": "unaffected",
        "version": "6.6.160",
        "versionType": "semver",
        "lessThanOrEqual": "6.6.*"
      },
      {
        "status": "unaffected",
        "version": "6.12.113",
        "versionType": "semver",
        "lessThanOrEqual": "6.12.*"
      },
      {
        "status": "unaffected",
        "version": "6.18.51",
        "versionType": "semver",
        "lessThanOrEqual": "6.18.*"
      },
      {
        "status": "unaffected",
        "version": "7.2.4",
        "versionType": "semver",
        "lessThanOrEqual": "7.2.*"
      },
      {
        "status": "unaffected",
        "version": "7.3",
        "versionType": "original_commit_for_fix",
        "lessThanOrEqual": "*"
      }
    ],
    "programFiles": [
      "fs/smb/client/inode.c"
    ],
    "defaultStatus": "affected"
  }
]
Related CVEs
CVE-2026-89638

Source reference: /cveMetadata/cveId

Publisher severity

high

Source reference: /containers/cna/metrics

Event
#46692 · Revision 1
Added to Heist Feed
Publisher date
Read the original announcement