{"id":41011,"date":"2026-10-19T00:31:49","date_gmt":"2026-10-18T16:31:49","guid":{"rendered":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98539"},"modified":"2026-10-19T00:31:49","modified_gmt":"2026-10-18T16:31:49","slug":"cve-2026-98539","status":"publish","type":"vuln","link":"https:\/\/www.54iter.cn\/?vuln=cve-2026-98539","title":{"rendered":"CVE-2026-98539 &#8211; In the Linux kernel, the following vulnerability has been resolved:\n\nfs\/ntfs3: use d_insta"},"content":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>fs\/ntfs3: use d_instantiate_new() in ntfs_create_inode() and murder syzbot&#8217;s &#8220;WARNING in do_new_mount&#8221; saga<\/p>\n<p>ntfs_create_inode() creates a new inode via ntfs_new_inode(). It hashes<br \/>\nit with insert_inode_locked() and so it&#8217;s marked as I_NEW until<br \/>\nunlock_new_inode().<\/p>\n<p>ntfs 3 calls d_instantiate() in between though&#8230; Since the dentry was<br \/>\nalready hashed by the lookup before the create any path walk finds it<br \/>\nwithout touching the parent&#8217;s i_rwsem and so can lock the inode.<\/p>\n<p>If the inode is a directory unlock_new_inode() calls<br \/>\nlockdep_annotate_inode_mutex_key() and marks i_rwsem with the<br \/>\ni_mutex_dir_key class.<\/p>\n<p>That resets the count and the owner of a lock somebody else may already<br \/>\nhold by now&#8230;<\/p>\n<p>syzbot has been spamming us with the same godforsaken bug<\/p>\n<p>  &#8220;WARNING in do_new_mount&#8221;<\/p>\n<p>since 2023. I can&#8217;t take it anymore so I went looking. Afaict, syzbot&#8217;s<br \/>\nexecutor chdirs into a freshly mounted ntfs3 image, creates a<br \/>\ndirectory and then mounts some pseudofs on it. Everytime the mkdir()<br \/>\ntakes longer than syzbot waits mount() runs concurrently:<\/p>\n<p>  mkdir(&#8220;.\/sys&#8221;)                        mount(NULL, &#8220;.\/sys&#8221;, &#8220;sysfs&#8221;)<br \/>\n  ntfs_create_inode()<br \/>\n    d_instantiate()<br \/>\n                                        user_path_at() finds the dentry<br \/>\n                                        do_lock_mount()<br \/>\n                                          inode_lock(inode)<br \/>\n                                          namespace_lock()<br \/>\n    unlock_new_inode()<br \/>\n      lockdep_annotate_inode_mutex_key()<br \/>\n        init_rwsem(&amp;inode-&gt;i_rwsem)<br \/>\n                                        unlock_mount()<br \/>\n                                          inode_unlock(inode)<\/p>\n<p>The mount side then releases a lock that according to the rwsem nobody<br \/>\nholds:<\/p>\n<p>  DEBUG_RWSEMS_WARN_ON((rwsem_owner(sem) != current) &amp;&amp; &#8230;):<br \/>\n  count = 0x0, magic = 0xffff888043a854e8, owner = 0x0,<br \/>\n  curr 0xffff888000244880, list empty<br \/>\n  WARNING: CPU: 0 PID: 5346 at kernel\/locking\/rwsem.c:1368 __up_write<br \/>\n  Call Trace:<br \/>\n   inode_unlock include\/linux\/fs.h:877 [inline]<br \/>\n   unlock_mount fs\/namespace.c:2892 [inline]<br \/>\n   do_new_mount_fc fs\/namespace.c:3828 [inline]<br \/>\n   do_new_mount+0x777\/0xa40 fs\/namespace.c:3887<\/p>\n<p>On PREEMPT_RT the same thing shows up as<\/p>\n<p>  DEBUG_LOCKS_WARN_ON(rt_mutex_owner(lock) != current)<br \/>\n  WARNING: kernel\/locking\/rtmutex_common.h:193 at rt_mutex_slowunlock<\/p>\n<p>The up_write() underflows the reset count. A following inode_lock() on<br \/>\nthat directory then never returns. A path walk into the new directory<br \/>\nracing with the mkdir() corrupts the lock the same way via<br \/>\ninode_lock_shared() in lookup_slow().<\/p>\n<p>Switch to d_instantiate_new() and drop the trailing unlock_new_inode().<br \/>\nAll error paths bail out before that point with I_NEW still set and<br \/>\nkeep using discard_new_inode().<\/p>\n<p>May we never see this fscking bug report again.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>fs\/ntfs3: use d_instantiate_new() in ntfs_create_inode() and murder syzbot&#8217;s &#8220;WARNING in do_new_mount&#8221; saga<\/p>\n<p>ntfs_create_inode() cr<\/p>\n","protected":false},"template":"","meta":[],"categories":[],"tags":[],"class_list":["post-41011","vuln","type-vuln","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/www.54iter.cn\/index.php?rest_route=\/wp\/v2\/vuln\/41011","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=41011"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=41011"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.54iter.cn\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=41011"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}