{"id":72667,"date":"2025-10-30T13:45:34","date_gmt":"2025-10-30T10:15:34","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-40105-vfs-dont-leak-disconnected-dentries-on-umount\/"},"modified":"2025-10-30T13:45:34","modified_gmt":"2025-10-30T10:15:34","slug":"cve-2025-40105-vfs-dont-leak-disconnected-dentries-on-umount","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-40105-vfs-dont-leak-disconnected-dentries-on-umount\/","title":{"rendered":"CVE-2025-40105 &#8211; vfs: Don&#8217;t leak disconnected dentries on umount"},"content":{"rendered":"<p>CVE ID : CVE-2025-40105<\/p>\n<p>Published :  Oct. 30, 2025, 10:15 a.m. | 1\u00a0hour, 10\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>vfs: Don&#8217;t leak disconnected dentries on umount<\/p>\n<p>When user calls open_by_handle_at() on some inode that is not cached, we<br \/>\nwill create disconnected dentry for it. If such dentry is a directory,<br \/>\nexportfs_decode_fh_raw() will then try to connect this dentry to the<br \/>\ndentry tree through reconnect_path(). It may happen for various reasons<br \/>\n(such as corrupted fs or race with rename) that the call to<br \/>\nlookup_one_unlocked() in reconnect_one() will fail to find the dentry we<br \/>\nare trying to reconnect and instead create a new dentry under the<br \/>\nparent. Now this dentry will not be marked as disconnected although the<br \/>\nparent still may well be disconnected (at least in case this<br \/>\ninconsistency happened because the fs is corrupted and .. doesn&#8217;t point<br \/>\nto the real parent directory). This creates inconsistency in<br \/>\ndisconnected flags but AFAICS it was mostly harmless. At least until<br \/>\ncommit f1ee616214cb (&#8220;VFS: don&#8217;t keep disconnected dentries on d_anon&#8221;)<br \/>\nwhich removed adding of most disconnected dentries to sb-&gt;s_anon list.<br \/>\nThus after this commit cleanup of disconnected dentries implicitely<br \/>\nrelies on the fact that dput() will immediately reclaim such dentries.<br \/>\nHowever when some leaf dentry isn&#8217;t marked as disconnected, as in the<br \/>\nscenario described above, the reclaim doesn&#8217;t happen and the dentries<br \/>\nare &#8220;leaked&#8221;. Memory reclaim can eventually reclaim them but otherwise<br \/>\nthey stay in memory and if umount comes first, we hit infamous &#8220;Busy<br \/>\ninodes after unmount&#8221; bug. Make sure all dentries created under a<br \/>\ndisconnected parent are marked as disconnected as well.<\/p>\n<p>Severity: 0.0 | NA<\/p>\n<p>Visit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;\u00a0<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-40105 Published : Oct. 30, 2025, 10:15 a.m. | 1\u00a0hour, 10\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: vfs: Don&#8217;t leak disconnected dentries on umount When user calls open_by_handle_at() on some inode that is not cached, we will create disconnected dentry for it. If such dentry &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[26],"tags":[],"class_list":["post-72667","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72667","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/comments?post=72667"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/72667\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=72667"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=72667"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=72667"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}