{"id":65937,"date":"2025-07-10T14:32:09","date_gmt":"2025-07-10T11:02:09","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-38347-f2fs-linux-kernel-acl-xattr-nid-sanity-check-vulnerability\/"},"modified":"2025-07-10T14:32:09","modified_gmt":"2025-07-10T11:02:09","slug":"cve-2025-38347-f2fs-linux-kernel-acl-xattr-nid-sanity-check-vulnerability","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-38347-f2fs-linux-kernel-acl-xattr-nid-sanity-check-vulnerability\/","title":{"rendered":"CVE-2025-38347 &#8211; &#8220;F2FS Linux Kernel ACL XAttr NID Sanity Check Vulnerability&#8221;"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-38347<br \/>\n<br \/>\n<strong>Published : <\/strong> July 10, 2025, 9:15 a.m. | 53\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>f2fs: fix to do sanity check on ino and xnid<\/p>\n<p>syzbot reported a f2fs bug as below:<\/p>\n<p>INFO: task syz-executor140:5308 blocked for more than 143 seconds.<br \/>\n      Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 #0<br \/>\n&#8220;echo 0 &gt; \/proc\/sys\/kernel\/hung_task_timeout_secs&#8221; disables this message.<br \/>\ntask:syz-executor140 state:D stack:24016 pid:5308  tgid:5308  ppid:5306   task_flags:0x400140 flags:0x00000006<br \/>\nCall Trace:<\/p>\n<p> context_switch kernel\/sched\/core.c:5378 [inline]\n __schedule+0x190e\/0x4c90 kernel\/sched\/core.c:6765<br \/>\n __schedule_loop kernel\/sched\/core.c:6842 [inline]\n schedule+0x14b\/0x320 kernel\/sched\/core.c:6857<br \/>\n io_schedule+0x8d\/0x110 kernel\/sched\/core.c:7690<br \/>\n folio_wait_bit_common+0x839\/0xee0 mm\/filemap.c:1317<br \/>\n __folio_lock mm\/filemap.c:1664 [inline]\n folio_lock include\/linux\/pagemap.h:1163 [inline]\n __filemap_get_folio+0x147\/0xb40 mm\/filemap.c:1917<br \/>\n pagecache_get_page+0x2c\/0x130 mm\/folio-compat.c:87<br \/>\n find_get_page_flags include\/linux\/pagemap.h:842 [inline]\n f2fs_grab_cache_page+0x2b\/0x320 fs\/f2fs\/f2fs.h:2776<br \/>\n __get_node_page+0x131\/0x11b0 fs\/f2fs\/node.c:1463<br \/>\n read_xattr_block+0xfb\/0x190 fs\/f2fs\/xattr.c:306<br \/>\n lookup_all_xattrs fs\/f2fs\/xattr.c:355 [inline]\n f2fs_getxattr+0x676\/0xf70 fs\/f2fs\/xattr.c:533<br \/>\n __f2fs_get_acl+0x52\/0x870 fs\/f2fs\/acl.c:179<br \/>\n f2fs_acl_create fs\/f2fs\/acl.c:375 [inline]\n f2fs_init_acl+0xd7\/0x9b0 fs\/f2fs\/acl.c:418<br \/>\n f2fs_init_inode_metadata+0xa0f\/0x1050 fs\/f2fs\/dir.c:539<br \/>\n f2fs_add_inline_entry+0x448\/0x860 fs\/f2fs\/inline.c:666<br \/>\n f2fs_add_dentry+0xba\/0x1e0 fs\/f2fs\/dir.c:765<br \/>\n f2fs_do_add_link+0x28c\/0x3a0 fs\/f2fs\/dir.c:808<br \/>\n f2fs_add_link fs\/f2fs\/f2fs.h:3616 [inline]\n f2fs_mknod+0x2e8\/0x5b0 fs\/f2fs\/namei.c:766<br \/>\n vfs_mknod+0x36d\/0x3b0 fs\/namei.c:4191<br \/>\n unix_bind_bsd net\/unix\/af_unix.c:1286 [inline]\n unix_bind+0x563\/0xe30 net\/unix\/af_unix.c:1379<br \/>\n __sys_bind_socket net\/socket.c:1817 [inline]\n __sys_bind+0x1e4\/0x290 net\/socket.c:1848<br \/>\n __do_sys_bind net\/socket.c:1853 [inline]\n __se_sys_bind net\/socket.c:1851 [inline]\n __x64_sys_bind+0x7a\/0x90 net\/socket.c:1851<br \/>\n do_syscall_x64 arch\/x86\/entry\/common.c:52 [inline]\n do_syscall_64+0xf3\/0x230 arch\/x86\/entry\/common.c:83<br \/>\n entry_SYSCALL_64_after_hwframe+0x77\/0x7f<\/p>\n<p>Let&#8217;s dump and check metadata of corrupted inode, it shows its xattr_nid<br \/>\nis the same to its i_ino.<\/p>\n<p>dump.f2fs -i 3 chaseyu.img.raw<br \/>\ni_xattr_nid                             [0x       3 : 3]\n<p>So that, during mknod in the corrupted directory, it tries to get and<br \/>\nlock inode page twice, result in deadlock.<\/p>\n<p>&#8211; f2fs_mknod<br \/>\n &#8211; f2fs_add_inline_entry<br \/>\n  &#8211; f2fs_get_inode_page &#8212; lock dir&#8217;s inode page<br \/>\n   &#8211; f2fs_init_acl<br \/>\n    &#8211; f2fs_acl_create(dir,..)<br \/>\n     &#8211; __f2fs_get_acl<br \/>\n      &#8211; f2fs_getxattr<br \/>\n       &#8211; lookup_all_xattrs<br \/>\n        &#8211; __get_node_page &#8212; try to lock dir&#8217;s inode page<\/p>\n<p>In order to fix this, let&#8217;s add sanity check on ino and xnid.<br \/>\n<br \/>\n<strong>Severity:<\/strong> 0.0 | NA<br \/>\n<br \/>\nVisit the link for more details, such as CVSS details, affected products, timeline, and more&#8230;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>CVE ID : CVE-2025-38347 Published : July 10, 2025, 9:15 a.m. | 53\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: f2fs: fix to do sanity check on ino and xnid syzbot reported a f2fs bug as below: INFO: task syz-executor140:5308 blocked for more than 143 seconds. Not tainted 6.14.0-rc7-syzkaller-00069-g81e4f8d68c66 &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-65937","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65937","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=65937"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65937\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=65937"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=65937"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=65937"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}