{
  "id": "CVE-2026-89638",
  "url": "https://poc.griffinguard.io/cve/CVE-2026-89638",
  "published_at": "2026-09-11T19:45:31.791Z",
  "title": "smb: client: clear setuid/setgid bit on write with cifsacl/modefromsid/posix extensions",
  "vendor": "Linux",
  "product": "Linux",
  "cvss": {
    "score": 7.8,
    "source": "cna",
    "vector": "CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H"
  },
  "kev": {
    "in_kev": false,
    "added_at": null,
    "days_after_publication": null
  },
  "first_poc": null,
  "poc_repo_count": 0,
  "exploit_count": 0,
  "suspicious_repo_count": 0,
  "edge_device": null,
  "description": "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's 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.",
  "cvss_by_source": {
    "cna": 7.8
  },
  "repos": [],
  "remediation": {
    "affected": [
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c ce0e675907b887db2b1e44a806118b0a7d8b6b18",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c a3a0cc83761e46a75b1ed6bfaf35961f2c211148",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c 2a5206992f526178881e8f5c4644757c336fb76d",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c 58b23fc9fb580432470d6c5da3c1e5660dba9fbc",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c b10015807e4c628095d1d1d1c9307efc8cdd9e1b",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c 69bfe810ecd1e0387d8975d711cd326341d13c6e",
          "\u003e= d32c4f2626acc385d5187bd5c0c24f442328dc60, \u003c b8e5dc4f95e5484159b343903f302eb6d783f2e6"
        ],
        "fixed_in": [
          "ce0e675907b887db2b1e44a806118b0a7d8b6b18",
          "a3a0cc83761e46a75b1ed6bfaf35961f2c211148",
          "2a5206992f526178881e8f5c4644757c336fb76d",
          "7ceb6f7cb8f8f2b094e0dcdaf75757775d231378",
          "58b23fc9fb580432470d6c5da3c1e5660dba9fbc",
          "b10015807e4c628095d1d1d1c9307efc8cdd9e1b",
          "69bfe810ecd1e0387d8975d711cd326341d13c6e",
          "b8e5dc4f95e5484159b343903f302eb6d783f2e6"
        ]
      },
      {
        "vendor": "Linux",
        "product": "Linux",
        "ranges": [
          "2.6.24"
        ],
        "fixed_in": [
          "0",
          "5.10.273",
          "5.15.224",
          "6.1.191",
          "6.6.160",
          "6.12.113",
          "6.18.51",
          "7.2.4",
          "7.3"
        ]
      }
    ],
    "upgrade": [
      "Upgrade Linux to ce0e675907b887db2b1e44a806118b0a7d8b6b18 or a3a0cc83761e46a75b1ed6bfaf35961f2c211148 or 2a5206992f526178881e8f5c4644757c336fb76d or 7ceb6f7cb8f8f2b094e0dcdaf75757775d231378 or 58b23fc9fb580432470d6c5da3c1e5660dba9fbc or b10015807e4c628095d1d1d1c9307efc8cdd9e1b or 69bfe810ecd1e0387d8975d711cd326341d13c6e or b8e5dc4f95e5484159b343903f302eb6d783f2e6 or later.",
      "Upgrade Linux to 0 or 5.10.273 or 5.15.224 or 6.1.191 or 6.6.160 or 6.12.113 or 6.18.51 or 7.2.4 or 7.3 or later."
    ]
  },
  "exploit_refs": [],
  "hunt_profile": [],
  "rules": []
}
