CVE-2026-89641 (GCVE-0-2026-89641)
Vulnerability from cvelistv5
Published
2026-09-11 19:45
Modified
2026-10-19 08:50
Summary
In the Linux kernel, the following vulnerability has been resolved: cifs: clear tcon after cifsFileInfo_put() in cifs_file_set_size() When the else branch of cifs_file_set_size() finds a writable file handle via find_writable_file(), it borrows tcon and server from the handle's tlink, attempts the handle-based set_file_size() RPC, and then releases the handle with cifsFileInfo_put(). If set_file_size() fails, execution falls through to the path-based fallback, which reuses the borrowed tcon and server under the "if (tcon == NULL)" guard. Since tcon is not NULL at that point, the guard is skipped. If cifsFileInfo_put() dropped the last reference on a tlink that was already removed from the tlink tree (TCON_LINK_IN_TREE cleared, as happens during reconnection or session teardown), cifs_put_tlink() will have freed tcon; the subsequent set_path_size() call is then a use-after-free. Setting tcon = NULL after cifsFileInfo_put() causes the existing guard to take the cifs_sb_tlink() path, which acquires a fresh reference for the path-based operation or fails cleanly if the session is gone.
Impacted products
Vendor Product Version
Linux Linux Version: 110fee6b9bb58a5c50047fc2594d415f741b591e
Version: 110fee6b9bb58a5c50047fc2594d415f741b591e
Version: 110fee6b9bb58a5c50047fc2594d415f741b591e
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": "4f18c9e7ee464aaae5cd9fccdb943b3fcb4655d4",
              "status": "affected",
              "version": "110fee6b9bb58a5c50047fc2594d415f741b591e",
              "versionType": "git"
            },
            {
              "lessThan": "4bea15d9c7683218f57b8c1f5f0aa75cab76af8d",
              "status": "affected",
              "version": "110fee6b9bb58a5c50047fc2594d415f741b591e",
              "versionType": "git"
            },
            {
              "lessThan": "b96db32fed8dfb2478d7c208f89bf383beed1535",
              "status": "affected",
              "version": "110fee6b9bb58a5c50047fc2594d415f741b591e",
              "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": "6.18"
            },
            {
              "lessThan": "6.18",
              "status": "unaffected",
              "version": "0",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "6.18.*",
              "status": "unaffected",
              "version": "6.18.50",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "7.2.*",
              "status": "unaffected",
              "version": "7.2.4",
              "versionType": "semver"
            },
            {
              "lessThanOrEqual": "*",
              "status": "unaffected",
              "version": "7.3",
              "versionType": "original_commit_for_fix"
            }
          ]
        }
      ],
      "cpeApplicability": [
        {
          "nodes": [
            {
              "cpeMatch": [
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "6.18.50",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.2.4",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                },
                {
                  "criteria": "cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*",
                  "versionEndExcluding": "7.3",
                  "versionStartIncluding": "6.18",
                  "vulnerable": true
                }
              ],
              "negate": false,
              "operator": "OR"
            }
          ]
        }
      ],
      "descriptions": [
        {
          "lang": "en",
          "value": "In the Linux kernel, the following vulnerability has been resolved:\n\ncifs: clear tcon after cifsFileInfo_put() in cifs_file_set_size()\n\nWhen the else branch of cifs_file_set_size() finds a writable file handle\nvia find_writable_file(), it borrows tcon and server from the handle\u0027s\ntlink, attempts the handle-based set_file_size() RPC, and then releases\nthe handle with cifsFileInfo_put().\n\nIf set_file_size() fails, execution falls through to the path-based\nfallback, which reuses the borrowed tcon and server under the\n\"if (tcon == NULL)\" guard.  Since tcon is not NULL at that point, the\nguard is skipped.  If cifsFileInfo_put() dropped the last reference on a\ntlink that was already removed from the tlink tree (TCON_LINK_IN_TREE\ncleared, as happens during reconnection or session teardown),\ncifs_put_tlink() will have freed tcon; the subsequent set_path_size()\ncall is then a use-after-free.\n\nSetting tcon = NULL after cifsFileInfo_put() causes the existing guard\nto take the cifs_sb_tlink() path, which acquires a fresh reference for\nthe path-based operation or fails cleanly if the session is gone."
        }
      ],
      "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 UAF is in the CIFS client setattr path (fs/smb/client/inode.c cifs_file_set_size), reached only via local VFS truncate/setattr on a mounted SMB share (sys_truncate \u2192 vfs_truncate \u2192 notify_change \u2192 cifs_setattr), not via ksmbd or unsolicited SMB receive processing.\nAC:L - A local attacker controls both sides: keep a writable handle open, issue truncate(2) to hit the find_writable_file() else branch, fail handle-based set_file_size (controlled/malicious server or reconnect), and concurrently umount/teardown so TCON_LINK_IN_TREE is already cleared when cifsFileInfo_put() drops the last tlink ref.\nPR:L - Any unprivileged user with write access on an existing CIFS mount can invoke truncate(2); vfs_truncate only requires MAY_WRITE and setattr_prepare does not demand CAP_SYS_ADMIN. CIFS is not FS_USERNS_MOUNT, but the vulnerable path itself needs no init-namespace capability.\nUI:N - The attacker performs open/truncate (and optional umount) themselves on a reachable CIFS mount such as an enterprise automount or a share they mounted; no separate victim action is required at exploit time.\nS:U - This is a standard in-kernel heap use-after-free of struct cifs_tcon on the client host, enabling privilege escalation within the same kernel security authority and not a VM, IOMMU, or sandbox escape.\nC:H - After cifsFileInfo_put() can free tcon, set_path_size()/smb2_compound_op() reads the freed cifs_tcon; kernel UAF of this heap object enables reuse/spraying and arbitrary kernel memory disclosure.\nI:H - The same freed tcon is passed into SMB2 compound operations that write tcon fields and follow tcon-\u003eses pointers, so heap spraying yields arbitrary write and potential control-flow hijack primitives.\nA:H - Use-after-free of tcon in the path-based set_path_size fallback causes kernel oops/panic even without full exploitation, fully denying availability."
            }
          ]
        }
      ],
      "providerMetadata": {
        "dateUpdated": "2026-10-19T08:50:13.143Z",
        "orgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
        "shortName": "Linux"
      },
      "references": [
        {
          "url": "https://git.kernel.org/stable/c/4f18c9e7ee464aaae5cd9fccdb943b3fcb4655d4"
        },
        {
          "url": "https://git.kernel.org/stable/c/4bea15d9c7683218f57b8c1f5f0aa75cab76af8d"
        },
        {
          "url": "https://git.kernel.org/stable/c/b96db32fed8dfb2478d7c208f89bf383beed1535"
        }
      ],
      "title": "cifs: clear tcon after cifsFileInfo_put() in cifs_file_set_size()",
      "x_generator": {
        "engine": "bippy-1.2.0"
      }
    }
  },
  "cveMetadata": {
    "assignerOrgId": "416baaa9-dc9f-4396-8d5f-8c081fb06d67",
    "assignerShortName": "Linux",
    "cveId": "CVE-2026-89641",
    "datePublished": "2026-09-11T19:45:34.036Z",
    "dateReserved": "2026-09-11T19:38:34.740Z",
    "dateUpdated": "2026-10-19T08:50:13.143Z",
    "state": "PUBLISHED"
  },
  "dataType": "CVE_RECORD",
  "dataVersion": "5.2"
}


Log in or create an account to share your comment.




Tags
Taxonomy of the tags.


Loading…

Loading…

Loading…

Sightings

Author Source Type Date

Nomenclature

  • Seen: The vulnerability was mentioned, discussed, or seen somewhere by the user.
  • Confirmed: The vulnerability is confirmed from an analyst perspective.
  • Published Proof of Concept: A public proof of concept is available for this vulnerability.
  • Exploited: This vulnerability was exploited and seen by the user reporting the sighting.
  • Patched: This vulnerability was successfully patched by the user reporting the sighting.
  • Not exploited: This vulnerability was not exploited or seen by the user reporting the sighting.
  • Not confirmed: The user expresses doubt about the veracity of the vulnerability.
  • Not patched: This vulnerability was not successfully patched by the user reporting the sighting.


Loading…

Loading…