{"dataType":"CVE_RECORD","dataVersion":"5.2","cveMetadata":{"cveId":"CVE-2026-99792","assignerOrgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","state":"PUBLISHED","assignerShortName":"Linux","dateReserved":"2026-09-25T10:25:14.434Z","datePublished":"2026-11-20T05:51:52.304Z","dateUpdated":"2026-11-22T11:10:08.269Z"},"containers":{"cna":{"providerMetadata":{"orgId":"416baaa9-dc9f-4396-8d5f-8c081fb06d67","shortName":"Linux","dateUpdated":"2026-11-22T11:10:08.269Z"},"descriptions":[{"lang":"en","value":"In the Linux kernel, the following vulnerability has been resolved:\n\nsmb/server: prevent file publication after tree disconnect\n\nTREE_DISCONNECT closes the tree's published file handles before marking and\nremoving the tree connection. A concurrent CREATE that already holds a tree\nreference can therefore publish its file after the close pass. When CREATE\ndrops its reference, the tree can be freed while the published file still\npoints to it.\n\nMark and remove the tree connection before closing its files, and serialize\nboth new-open and durable-reconnect volatile ID publication with that state\ntransition. An opener is then either published in time for the close pass\nor rejected after disconnect with STATUS_NETWORK_NAME_DELETED.\n\nKeep a tree reference while a file carries its tree pointer. This protects\nasynchronous users that can defer the file's final destruction past tree\ndisconnect.\n\nThe close pass can race the successful FP_NEW to FP_INITED transition.\nTake the opening request's file reference atomically with that transition.\nThis keeps the file alive until request completion even if teardown removes\nthe ID immediately.\n\n  BUG: KASAN: slab-use-after-free in proc_show_files (fs/smb/server/vfs_cache.c:126)\n  Read of size 4 at addr ff11000101540f80 by task poc/153\n\n  Call Trace:\n    proc_show_files (fs/smb/server/vfs_cache.c:126)\n    seq_read_iter (fs/seq_file.c:231)\n    proc_reg_read_iter (fs/proc/inode.c:299)\n    vfs_read (fs/read_write.c:574)\n    ksys_read (fs/read_write.c:716)\n    do_syscall_64 (arch/x86/entry/syscall_64.c:84)\n    entry_SYSCALL_64_after_hwframe (arch/x86/entry/entry_64.S:121)\n\n  Allocated by:\n    ksmbd_tree_conn_connect (fs/smb/server/mgmt/tree_connect.c:35)\n    smb2_tree_connect (fs/smb/server/smb2pdu.c:2819)\n    handle_ksmbd_work (fs/smb/server/server.c:368)\n\n  Freed by:\n    kfree (mm/slub.c:6801)\n    handle_ksmbd_work (fs/smb/server/server.c:332)"}],"metrics":[{"cvssV3_1":{"version":"3.1","vectorString":"CVSS:3.1/AV:N/AC:L/PR:L/UI:N/S:U/C:H/I:H/A:H","baseScore":8.8,"baseSeverity":"HIGH"},"scenarios":[{"lang":"en","value":"AV:N - SMB2 CREATE and SMB2 TREE_DISCONNECT are the attacker-controlled PDUs. ksmbd_tcp_new_connection accepts the TCP socket, ksmbd_conn_handler_loop reads each PDU, and queue_ksmbd_work hands it to handle_ksmbd_work, which calls smb2_open and smb2_tree_disconnect; those race ksmbd_open_fd's publication of fp->tcon against ksmbd_close_tree_conn_fds.\nAC:L - The same client sends both PDUs. ksmbd_conn_handler_loop does not wait for a worker to finish before reading the next request, so the CREATE and TREE_DISCONNECT workers run together and the client can repeat the window between ksmbd_update_fstate storing FP_INITED and smb2_set_request_open taking its reference.\nPR:L - handle_ksmbd_work calls smb2_check_user_session, which accepts SMB2 CREATE and SMB2 TREE_DISCONNECT only for an SMB2_SESSION_VALID session, then smb2_get_ksmbd_tcon resolves the header TreeId with ksmbd_tree_conn_lookup. That session exists only after smb2_sess_setup has authenticated the user.\nUI:N - The authenticated client itself sends the TREE_CONNECT, the CREATE, and the TREE_DISCONNECT, and the CREATE worker reaches the freed ksmbd_file on that path.\nS:U - The freed objects are ksmbd_file and ksmbd_tree_connect in the host kernel that serves the share. The corruption stays in that kernel and does not cross a guest-to-host or IOMMU boundary.\nC:H - If ksmbd_close_tree_conn_fds wins after ksmbd_update_fstate stores FP_INITED but before smb2_set_request_open calls ksmbd_file_get, __ksmbd_close_fd frees the filp_cache object and the CREATE error path's ksmbd_fd_put reads that slot and can fput whatever a later CREATE reused. proc_show_files also reads the freed tree id.\nI:H - ksmbd_fd_put's atomic_dec_and_test writes the freed ksmbd_file slot and, once a reused object hits zero, __ksmbd_close_fd calls fput and kmem_cache_free on it. That is a kernel write and free of a filp_cache object the attacker reallocates with further SMB2 CREATE requests.\nA:H - The CREATE worker continues in ksmbd_fd_put and __ksmbd_close_fd against the freed filp_cache object, which double-frees or faults. The reported KASAN slab-use-after-free is proc_show_files reading fp->tcon->id after handle_ksmbd_work has kfreed the tree connection."}]}],"affected":[{"product":"Linux","vendor":"Linux","defaultStatus":"unaffected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/mgmt/tree_connect.c","fs/smb/server/mgmt/tree_connect.h","fs/smb/server/smb2pdu.c","fs/smb/server/vfs_cache.c"],"versions":[{"version":"f44158485826c076335d6860d35872271a83791d","lessThan":"fc5ac6813830eaf5b850e89d57403da1e1c50432","status":"affected","versionType":"git"},{"version":"f44158485826c076335d6860d35872271a83791d","lessThan":"2ff3730998b015b5b0a3f28330bee16c648dd114","status":"affected","versionType":"git"}]},{"product":"Linux","vendor":"Linux","defaultStatus":"affected","repo":"https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git","programFiles":["fs/smb/server/mgmt/tree_connect.c","fs/smb/server/mgmt/tree_connect.h","fs/smb/server/smb2pdu.c","fs/smb/server/vfs_cache.c"],"versions":[{"version":"5.15","status":"affected"},{"version":"0","lessThan":"5.15","status":"unaffected","versionType":"semver"},{"version":"7.3.5","lessThanOrEqual":"7.3.*","status":"unaffected","versionType":"semver"},{"version":"7.4-rc1","lessThanOrEqual":"*","status":"unaffected","versionType":"original_commit_for_fix"}]}],"cpeApplicability":[{"nodes":[{"operator":"OR","negate":false,"cpeMatch":[{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.3.5"},{"vulnerable":true,"criteria":"cpe:2.3:o:linux:linux_kernel:*:*:*:*:*:*:*:*","versionStartIncluding":"5.15","versionEndExcluding":"7.4-rc1"}]}]}],"references":[{"url":"https://git.kernel.org/stable/c/fc5ac6813830eaf5b850e89d57403da1e1c50432"},{"url":"https://git.kernel.org/stable/c/2ff3730998b015b5b0a3f28330bee16c648dd114"}],"title":"smb/server: prevent file publication after tree disconnect","x_generator":{"engine":"bippy-1.2.0"}}}}