{"id":"CVE-2026-89641","aliases":["CVE-2026-89641"],"related":[],"kind":"vulnerability","state":"published","title":"cifs: clear tcon after cifsFileInfo_put() in cifs_file_set_size()","summary":"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's\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.","summarySource":"cvelist","descriptions":[{"lang":"en","text":"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's\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.","source":"cvelist"}],"published":"2026-09-11T19:45:34.036Z","modified":"2026-10-19T09:18:01.287Z","severity":{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"},"severities":[{"scorer":"Linux","scheme":"CVSS:3.1","vector":"CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","score":7.8,"rating":"HIGH"}],"cwes":[],"affected":[{"ranges":[{"type":"git","introduced":"110fee6b9bb58a5c50047fc2594d415f741b591e","fixed":"4f18c9e7ee464aaae5cd9fccdb943b3fcb4655d4","status":"affected"},{"type":"git","introduced":"110fee6b9bb58a5c50047fc2594d415f741b591e","fixed":"4bea15d9c7683218f57b8c1f5f0aa75cab76af8d","status":"affected"},{"type":"git","introduced":"110fee6b9bb58a5c50047fc2594d415f741b591e","fixed":"b96db32fed8dfb2478d7c208f89bf383beed1535","status":"affected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"},{"ranges":[{"version":"6.18","status":"affected"},{"type":"semver","introduced":"0","fixed":"6.18","status":"unaffected"},{"type":"semver","introduced":"6.18.50","lastAffected":"6.18.*","status":"unaffected"},{"type":"semver","introduced":"7.2.4","lastAffected":"7.2.*","status":"unaffected"},{"type":"original_commit_for_fix","introduced":"7.3","lastAffected":"*","status":"unaffected"}],"vendor":"Linux","product":"Linux","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","source":"cvelist"}],"references":[{"url":"https://git.kernel.org/stable/c/4f18c9e7ee464aaae5cd9fccdb943b3fcb4655d4","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/4bea15d9c7683218f57b8c1f5f0aa75cab76af8d","tags":[],"sources":["cvelist","nvd"]},{"url":"https://git.kernel.org/stable/c/b96db32fed8dfb2478d7c208f89bf383beed1535","tags":[],"sources":["cvelist","nvd"]}],"credits":[],"assigner":"Linux","sources":[{"source":"cvelist","name":"CVE List","id":"CVE-2026-89641","url":"https://www.cve.org/CVERecord?id=CVE-2026-89641","licence":"CVE Terms of Use","modified":"2026-10-19T08:50:13.143Z"},{"source":"nvd","name":"NVD","id":"CVE-2026-89641","url":"https://nvd.nist.gov/vuln/detail/CVE-2026-89641","licence":"Public domain","modified":"2026-10-19T09:18:01.287Z"}],"updatedAt":"2026-11-25T22:59:38.095Z","epss":{"score":0.0014,"percentile":0.03554,"date":"2026-12-01T12:00:22.000Z"}}