GCVE Workshop - 22 September 2026 (14:00-18:00), Luxembourg Before The Vulnopticon Conference - Registration

CVE-2026-89638 (GCVE-0-2026-89638)

Vulnerability from cvelistv5 – Published: 2026-09-11 19:45 – Updated: 2026-09-13 06:32
VLAI
Title
smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions
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 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.
Impacted products
Vendor Product Version CPE status
Linux Linux Affected: d32c4f2626acc385d5187bd5c0c24f442328dc60 , < b10015807e4c628095d1d1d1c9307efc8cdd9e1b (git)
Affected: d32c4f2626acc385d5187bd5c0c24f442328dc60 , < 69bfe810ecd1e0387d8975d711cd326341d13c6e (git)
Affected: d32c4f2626acc385d5187bd5c0c24f442328dc60 , < b8e5dc4f95e5484159b343903f302eb6d783f2e6 (git)
guessed Create a notification for this product.
Linux Linux Affected: 2.6.24
Unaffected: 0 , < 2.6.24 (semver)
Unaffected: 6.18.51 , ≤ 6.18.* (semver)
Unaffected: 7.2.4 , ≤ 7.2.* (semver)
Unaffected: 7.3-rc1 , ≤ * (original_commit_for_fix)
guessed Create a notification for this product.
Show details on NVD website

{
  "containers": {
    "cna": {
      "affected": [
        {
          "defaultStatus": "unaffected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "lessThan": "b10015807e4c628095d1d1d1c9307efc8cdd9e1b",
              "status": "affected",
              "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
              "versionType": "git"
            },
            {
              "lessThan": "69bfe810ecd1e0387d8975d711cd326341d13c6e",
              "status": "affected",
              "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
              "versionType": "git"
            },
            {
              "lessThan": "b8e5dc4f95e5484159b343903f302eb6d783f2e6",
              "status": "affected",
              "version": "d32c4f2626acc385d5187bd5c0c24f442328dc60",
              "versionType": "git"
            }
          ]
        },
        {
          "defaultStatus": "affected",
          "product": "Linux",
          "programFiles": [
            "fs/smb/client/inode.c"
          ],
          "repo": "https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git",
          "vendor": "Linux",
          "versions": [
            {
              "status": "affected",
              "version": "2.6.24"
            },
            {
              "lessThan": "2.6.24",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.51",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3-rc1",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.51",
                  "versionStartIncluding": "2.6.24",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.4",
                  "versionStartIncluding": "2.6.24",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3-rc1",
                  "versionStartIncluding": "2.6.24",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\nsmb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions\n\nWhen a file has the setuid or setgid bit set and is written to, the VFS\nstrips those bits and issues a setattr with ATTR_KILL_SUID/ATTR_KILL_SGID\ntogether with an ATTR_MODE carrying the already-cleared mode.\n\nBoth cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped\nATTR_MODE in that case:\n\n\t/* skip mode change if it\u0027s just for clearing setuid/setgid */\n\tif (attrs-\u003eia_valid \u0026 (ATTR_KILL_SUID|ATTR_KILL_SGID))\n\t\tattrs-\u003eia_valid \u0026= ~ATTR_MODE;\n\nThis is fine for the default mount, where the mode is only emulated via\nthe DOS read-only attribute and cannot represent the setuid/setgid bits\nanyway.  However, with the \"cifsacl\" or \"modefromsid\" mount options the\nmode is stored on the server through an ACL (id_mode_to_cifs_acl()), with\nthe SMB3.1.1 POSIX extensions the mode is sent to the server directly,\nand with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent\nvia CIFSSMBUnixSetPathInfo().  In all those cases dropping ATTR_MODE means\nthe cleared mode is never pushed to the server, so the setuid/setgid bit\nsurvives the write.\n\nThis is a security issue: on local filesystems the setuid bit is stripped\nwhen a file is written, but over these cifs.ko mounts the bit persists on\nthe server, potentially allowing an unexpected privilege escalation on\nsubsequent execution.\n\nFix this in two places:\n\n  1. cifs_setattr_nounix(): only take the \"skip mode change\" shortcut\n     when the mode is emulated via the DOS read-only attribute (i.e.\n     neither cifsacl/modefromsid nor the SMB3.1.1 POSIX extensions are\n     in effect), so that the cleared mode is propagated to the server\n     in the ACL / POSIX cases.\n\n  2. cifs_setattr_unix(): this function is only called when Unix\n     extensions are in effect, so the mode is always stored on the\n     server.  Remove the shortcut entirely so that the cleared mode is\n     always pushed."
        }
      ],
      "metrics": [
        {
          "cvssV3_1": {
            "baseScore": 7.8,
            "baseSeverity": "HIGH",
            "vectorString": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H",
            "version": "3.1"
          },
          "scenarios": [
            {
              "lang": "en",
              "value": "AV:L - The bug is in the CIFS client setattr path, reached by local write(2)/truncate(2) on an SMB mount: cifs_file_write_iter -\u003e netfs_file_write_iter -\u003e file_remove_privs -\u003e notify_change -\u003e cifs_setattr_unix/nounix. This is not ksmbd; a remote SMB peer cannot invoke the ATTR_MODE skip.\nAC:L - Once the share stores POSIX mode (cifsacl, modefromsid, SMB3.1.1 POSIX, or SMB1 Unix extensions), a write to a setuid/setgid file deterministically drops ATTR_MODE so the cleared bits are never pushed. The attacker controls the write and later exec, with no race or uninfluenced memory layout.\nPR:L - An unprivileged local user with write access to the setuid/setgid file (group/world-writable helper, or noperm) triggers file_remove_privs; ATTR_FORCE skips ownership/CAP_FSETID checks in setattr_prepare, and no init-namespace capability is required.\nUI:N - The attacker opens, writes, and execve()s the still-setuid file on an already-mounted share; no other user must mount the filesystem, confirm a prompt, or run the binary.\nS:U - Remaining setuid/setgid execution escalates privileges inside the same kernel/OS security authority and does not cross a VM, IOMMU, or sandbox boundary.\nC:H - After the attacker overwrites a privileged setuid/setgid helper, the uncleared bits allow execve of attacker-controlled contents as the file owner (including root on Samba POSIX/cifsacl deployments), disclosing all data that owner can read.\nI:H - The same still-setuid execution runs attacker-supplied file contents with the owner\u0027s privileges, enabling arbitrary writes and full integrity compromise, which is the POSIX reason those bits are stripped on write.\nA:H - Attacker-controlled code running as the privileged file owner can panic, halt, or disable the host, so successful exploitation yields complete availability loss."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-09-13T06:32:18.174Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b"
        },
        {
          "url": "https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e"
        },
        {
          "url": "https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6"
        }
      ],
      "title": "smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89638",
    "datePublished": "2026-09-11T19:45:31.791Z",
    "dateReserved": "2026-09-11T19:38:34.740Z",
    "dateUpdated": "2026-09-13T06:32:18.174Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2",
  "vulnerability-lookup:meta": {
    "epss": {
      "cve": "CVE-2026-89638",
      "date": "2026-09-16",
      "epss": "0.0017",
      "percentile": "0.06702"
    },
    "microsoft_vex": {
      "current_release_date": "2026-09-14T15:01:58.000Z",
      "cve": "CVE-2026-89638",
      "id": "msrc_CVE-2026-89638",
      "initial_release_date": "2026-09-13T01:14:02.000Z",
      "product_status:known_affected": "1",
      "source": "Microsoft CSAF VEX",
      "status": "final",
      "title": "smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions",
      "url": "https://msrc.microsoft.com/csaf/vex/2026/msrc_cve-2026-89638.json",
      "version": "2"
    },
    "nvd": "{\"cve\":{\"id\":\"CVE-2026-89638\",\"sourceIdentifier\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"published\":\"2026-09-11T20:19:49.493\",\"lastModified\":\"2026-09-13T07:17:29.003\",\"vulnStatus\":\"Received\",\"cveTags\":[],\"descriptions\":[{\"lang\":\"en\",\"value\":\"In the Linux kernel, the following vulnerability has been resolved:\\n\\nsmb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions\\n\\nWhen a file has the setuid or setgid bit set and is written to, the VFS\\nstrips those bits and issues a setattr with ATTR_KILL_SUID/ATTR_KILL_SGID\\ntogether with an ATTR_MODE carrying the already-cleared mode.\\n\\nBoth cifs_setattr_unix() and cifs_setattr_nounix() unconditionally dropped\\nATTR_MODE in that case:\\n\\n\\t/* skip mode change if it\u0027s just for clearing setuid/setgid */\\n\\tif (attrs-\u003eia_valid \u0026 (ATTR_KILL_SUID|ATTR_KILL_SGID))\\n\\t\\tattrs-\u003eia_valid \u0026= ~ATTR_MODE;\\n\\nThis is fine for the default mount, where the mode is only emulated via\\nthe DOS read-only attribute and cannot represent the setuid/setgid bits\\nanyway.  However, with the \\\"cifsacl\\\" or \\\"modefromsid\\\" mount options the\\nmode is stored on the server through an ACL (id_mode_to_cifs_acl()), with\\nthe SMB3.1.1 POSIX extensions the mode is sent to the server directly,\\nand with the SMB1 Unix extensions (cifs_setattr_unix) the mode is sent\\nvia CIFSSMBUnixSetPathInfo().  In all those cases dropping ATTR_MODE means\\nthe cleared mode is never pushed to the server, so the setuid/setgid bit\\nsurvives the write.\\n\\nThis is a security issue: on local filesystems the setuid bit is stripped\\nwhen a file is written, but over these cifs.ko mounts the bit persists on\\nthe server, potentially allowing an unexpected privilege escalation on\\nsubsequent execution.\\n\\nFix this in two places:\\n\\n  1. cifs_setattr_nounix(): only take the \\\"skip mode change\\\" shortcut\\n     when the mode is emulated via the DOS read-only attribute (i.e.\\n     neither cifsacl/modefromsid nor the SMB3.1.1 POSIX extensions are\\n     in effect), so that the cleared mode is propagated to the server\\n     in the ACL / POSIX cases.\\n\\n  2. cifs_setattr_unix(): this function is only called when Unix\\n     extensions are in effect, so the mode is always stored on the\\n     server.  Remove the shortcut entirely so that the cleared mode is\\n     always pushed.\"}],\"affected\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"affectedData\":[{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"unaffected\",\"programFiles\":[\"fs/smb/client/inode.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"d32c4f2626acc385d5187bd5c0c24f442328dc60\",\"lessThan\":\"b10015807e4c628095d1d1d1c9307efc8cdd9e1b\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d32c4f2626acc385d5187bd5c0c24f442328dc60\",\"lessThan\":\"69bfe810ecd1e0387d8975d711cd326341d13c6e\",\"versionType\":\"git\",\"status\":\"affected\"},{\"version\":\"d32c4f2626acc385d5187bd5c0c24f442328dc60\",\"lessThan\":\"b8e5dc4f95e5484159b343903f302eb6d783f2e6\",\"versionType\":\"git\",\"status\":\"affected\"}]},{\"vendor\":\"Linux\",\"product\":\"Linux\",\"defaultStatus\":\"affected\",\"programFiles\":[\"fs/smb/client/inode.c\"],\"repo\":\"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git\",\"versions\":[{\"version\":\"2.6.24\",\"status\":\"affected\"},{\"version\":\"0\",\"lessThan\":\"2.6.24\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"6.18.51\",\"lessThanOrEqual\":\"6.18.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.2.4\",\"lessThanOrEqual\":\"7.2.*\",\"versionType\":\"semver\",\"status\":\"unaffected\"},{\"version\":\"7.3-rc1\",\"lessThanOrEqual\":\"*\",\"versionType\":\"original_commit_for_fix\",\"status\":\"unaffected\"}]}]}],\"metrics\":{\"cvssMetricV31\":[{\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\",\"type\":\"Secondary\",\"cvssData\":{\"version\":\"3.1\",\"vectorString\":\"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H\",\"baseScore\":7.8,\"baseSeverity\":\"HIGH\",\"attackVector\":\"LOCAL\",\"attackComplexity\":\"LOW\",\"privilegesRequired\":\"LOW\",\"userInteraction\":\"NONE\",\"scope\":\"UNCHANGED\",\"confidentialityImpact\":\"HIGH\",\"integrityImpact\":\"HIGH\",\"availabilityImpact\":\"HIGH\"},\"exploitabilityScore\":1.8,\"impactScore\":5.9}]},\"references\":[{\"url\":\"https://git.kernel.org/stable/c/69bfe810ecd1e0387d8975d711cd326341d13c6e\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b10015807e4c628095d1d1d1c9307efc8cdd9e1b\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"},{\"url\":\"https://git.kernel.org/stable/c/b8e5dc4f95e5484159b343903f302eb6d783f2e6\",\"source\":\"416baaa9-dc9f-4396-8d5f-8c081fb06d67\"}]}}",
    "redhat_vex": {
      "aggregate_severity": "Important",
      "current_release_date": "2026-09-15T15:02:01+00:00",
      "cve": "CVE-2026-89638",
      "id": "CVE-2026-89638",
      "initial_release_date": "2026-09-11T00:00:00+00:00",
      "product_status:known_affected": "262",
      "product_status:known_not_affected": "14",
      "source": "Red Hat CSAF VEX",
      "status": "final",
      "title": "kernel: smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions",
      "url": "https://security.access.redhat.com/data/csaf/v2/vex/2026/cve-2026-89638.json",
      "version": "3"
    },
    "suse_vex": {
      "aggregate_severity": "important",
      "current_release_date": "2026-09-12T16:24:33Z",
      "cve": "CVE-2026-89638",
      "id": "CVE-2026-89638",
      "initial_release_date": "2026-09-12T16:24:33Z",
      "source": "SUSE CSAF VEX",
      "status": "interim",
      "title": "SUSE CVE CVE-2026-89638",
      "url": "https://ftp.suse.com/pub/projects/security/csaf-vex/cve-2026-89638.json",
      "version": "2"
    }
  }
}



Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Forecast uses a logistic model when the trend is rising, or an exponential decay model when the trend is falling. Fitted via linearized least squares.

Sightings

Author Source Type Date Other

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or observed by the user.
  • Confirmed: The vulnerability has been validated from an analyst's perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: The vulnerability was observed as exploited by the user who reported the sighting.
  • Patched: The vulnerability was observed as successfully patched by the user who reported the sighting.
  • Not exploited: The vulnerability was not observed as exploited by the user who reported the sighting.
  • Not confirmed: The user expressed doubt about the validity of the vulnerability.
  • Not patched: The vulnerability was not observed as successfully patched by the user who reported the sighting.

Loading…

Detection rules are retrieved from Rulezet.

Loading…

Loading…

Related by attack behaviour

Vulnerabilities whose description is nearest to this one in the vector space of the CIRCL/vulnerability-attack-technique-biencoder model. This is a similarity search over the bi-encoder space (plain cosine), not a classification, and it has no measured accuracy.


Loading…