{"id":65548,"date":"2025-07-04T19:31:50","date_gmt":"2025-07-04T16:01:50","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-38232-linux-nfsd-race-condition-vulnerability\/"},"modified":"2025-07-04T19:31:50","modified_gmt":"2025-07-04T16:01:50","slug":"cve-2025-38232-linux-nfsd-race-condition-vulnerability","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-38232-linux-nfsd-race-condition-vulnerability\/","title":{"rendered":"CVE-2025-38232 &#8211; Linux NFSd Race Condition Vulnerability"},"content":{"rendered":"<p><strong>CVE ID : <\/strong>CVE-2025-38232<br \/>\n<br \/>\n<strong>Published : <\/strong> July 4, 2025, 2:15 p.m. | 44\u00a0minutes ago<br \/>\n<br \/>\n<strong>Description : <\/strong>In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>NFSD: fix race between nfsd registration and exports_proc<\/p>\n<p>As of now nfsd calls create_proc_exports_entry() at start of init_nfsd<br \/>\nand cleanup by remove_proc_entry() at last of exit_nfsd.<\/p>\n<p>Which causes kernel OOPs if there is race between below 2 operations:<br \/>\n(i) exportfs -r<br \/>\n(ii) mount -t nfsd none \/proc\/fs\/nfsd<\/p>\n<p>for 5.4 kernel ARM64:<\/p>\n<p>CPU 1:<br \/>\nel1_irq+0xbc\/0x180<br \/>\narch_counter_get_cntvct+0x14\/0x18<br \/>\nrunning_clock+0xc\/0x18<br \/>\npreempt_count_add+0x88\/0x110<br \/>\nprep_new_page+0xb0\/0x220<br \/>\nget_page_from_freelist+0x2d8\/0x1778<br \/>\n__alloc_pages_nodemask+0x15c\/0xef0<br \/>\n__vmalloc_node_range+0x28c\/0x478<br \/>\n__vmalloc_node_flags_caller+0x8c\/0xb0<br \/>\nkvmalloc_node+0x88\/0xe0<br \/>\nnfsd_init_net+0x6c\/0x108 [nfsd]\nops_init+0x44\/0x170<br \/>\nregister_pernet_operations+0x114\/0x270<br \/>\nregister_pernet_subsys+0x34\/0x50<br \/>\ninit_nfsd+0xa8\/0x718 [nfsd]\ndo_one_initcall+0x54\/0x2e0<\/p>\n<p>CPU 2 :<br \/>\nUnable to handle kernel NULL pointer dereference at virtual address 0000000000000010<\/p>\n<p>PC is at : exports_net_open+0x50\/0x68 [nfsd]\n<p>Call trace:<br \/>\nexports_net_open+0x50\/0x68 [nfsd]\nexports_proc_open+0x2c\/0x38 [nfsd]\nproc_reg_open+0xb8\/0x198<br \/>\ndo_dentry_open+0x1c4\/0x418<br \/>\nvfs_open+0x38\/0x48<br \/>\npath_openat+0x28c\/0xf18<br \/>\ndo_filp_open+0x70\/0xe8<br \/>\ndo_sys_open+0x154\/0x248<\/p>\n<p>Sometimes it crashes at exports_net_open() and sometimes cache_seq_next_rcu().<\/p>\n<p>and same is happening on latest 6.14 kernel as well:<\/p>\n[    0.000000] Linux version 6.14.0-rc5-next-20250304-dirty<br \/>\n&#8230;<br \/>\n[  285.455918] Unable to handle kernel paging request at virtual address 00001f4800001f48<br \/>\n&#8230;<br \/>\n[  285.464902] pc : cache_seq_next_rcu+0x78\/0xa4<br \/>\n&#8230;<br \/>\n[  285.469695] Call trace:<br \/>\n[  285.470083]  cache_seq_next_rcu+0x78\/0xa4 (P)<br \/>\n[  285.470488]  seq_read+0xe0\/0x11c<br \/>\n[  285.470675]  proc_reg_read+0x9c\/0xf0<br \/>\n[  285.470874]  vfs_read+0xc4\/0x2fc<br \/>\n[  285.471057]  ksys_read+0x6c\/0xf4<br \/>\n[  285.471231]  __arm64_sys_read+0x1c\/0x28<br \/>\n[  285.471428]  invoke_syscall+0x44\/0x100<br \/>\n[  285.471633]  el0_svc_common.constprop.0+0x40\/0xe0<br \/>\n[  285.471870]  do_el0_svc_compat+0x1c\/0x34<br \/>\n[  285.472073]  el0_svc_compat+0x2c\/0x80<br \/>\n[  285.472265]  el0t_32_sync_handler+0x90\/0x140<br \/>\n[  285.472473]  el0t_32_sync+0x19c\/0x1a0<br \/>\n[  285.472887] Code: f9400885 93407c23 937d7c27 11000421 (f86378a3)<br \/>\n[  285.473422] &#8212;[ end trace 0000000000000000 ]&#8212;<\/p>\n<p>It reproduced simply with below script:<br \/>\nwhile [ 1 ]\ndo<br \/>\n\/exportfs -r<br \/>\ndone &amp;<\/p>\n<p>while [ 1 ]\ndo<br \/>\ninsmod \/nfsd.ko<br \/>\nmount -t nfsd none \/proc\/fs\/nfsd<br \/>\numount \/proc\/fs\/nfsd<br \/>\nrmmod nfsd<br \/>\ndone &amp;<\/p>\n<p>So exporting interfaces to user space shall be done at last and<br \/>\ncleanup at first place.<\/p>\n<p>With change there is no Kernel OOPs.<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-38232 Published : July 4, 2025, 2:15 p.m. | 44\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: NFSD: fix race between nfsd registration and exports_proc As of now nfsd calls create_proc_exports_entry() at start of init_nfsd and cleanup by remove_proc_entry() at last of exit_nfsd. Which causes kernel &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-65548","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65548","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=65548"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/65548\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=65548"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=65548"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=65548"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}