{"id":24445,"date":"2026-09-16T20:32:19","date_gmt":"2026-09-16T12:32:19","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89788"},"modified":"2026-09-16T20:32:19","modified_gmt":"2026-09-16T12:32:19","slug":"cve-2026-89788","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-89788","title":{"rendered":"CVE-2026-89788 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nksmbd: fix tree conne"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>ksmbd: fix tree connection use-after-free in smb2_tree_connect()<\/p>\n<p>ksmbd_tree_conn_connect() publishes a new tree connection in<br \/>\nsess-&gt;tree_conns with a single reference and returns its pointer to<br \/>\nsmb2_tree_connect(). The handler continues to initialize the object and<br \/>\nbuild the response after publication. A concurrent session logoff can<br \/>\nerase the connection and drop that reference, freeing the object while<br \/>\nthe handler still uses it.<\/p>\n<p>BUG: KASAN: slab-use-after-free in smb2_tree_connect+0xe3d\/0xf90<br \/>\n  smb2_tree_connect (fs\/smb\/server\/smb2pdu.c:2872)<br \/>\n  handle_ksmbd_work<br \/>\n  process_one_work<br \/>\n  worker_thread<br \/>\n  kthread<\/p>\n<p>After xa_store() succeeds, take a second reference before releasing<br \/>\ntree_conns_lock. The original reference belongs to the xarray entry and<br \/>\nthe second belongs to the creating smb2_tree_connect() handler.<\/p>\n<p>Keep the references balanced in every path:<\/p>\n<p>&#8211; On normal exit or an error after publication, smb2_tree_connect()<br \/>\n  drops its creator reference. Error cleanup also calls<br \/>\n  ksmbd_tree_conn_disconnect(), which drops the xarray reference only if<br \/>\n  it removes the exact entry.<br \/>\n&#8211; SMB2 TREE_DISCONNECT uses the same helper to remove the entry and drop<br \/>\n  its xarray reference. The request&#8217;s existing lookup reference remains<br \/>\n  owned by the request and is released by the existing cleanup.<br \/>\n&#8211; Session LOGOFF removes each entry and drops its xarray reference. If<br \/>\n  it wins the race, later cleanup sees that the entry is gone and does<br \/>\n  not drop that reference again.<\/p>\n<p>To enforce this ownership, claim the disconnected state and erase the<br \/>\nexact entry atomically under tree_conns_lock. This guarantees one drop<br \/>\nfor the xarray reference and one drop by each in-flight user, regardless<br \/>\nof which teardown path wins. If logoff removes the entry before<br \/>\ninitialization completes, fail the connect instead of marking the<br \/>\ndetached object TREE_CONNECTED.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>ksmbd: fix tree connection use-after-free in smb2_tree_connect()<\/p>\n<p>ksmbd_tree_conn_connect() publishes a new tree connection in<br \/>\nsess<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-24445","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/24445","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln"}],"about":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/types\/vuln"}],"wp:attachment":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=24445"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=24445"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=24445"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}