{"id":74200,"date":"2025-11-24T16:34:20","date_gmt":"2025-11-24T13:04:20","guid":{"rendered":"https:\/\/afaghhosting.net\/blog\/cve-2025-40212-nfsd-fix-refcount-leak-in-nfsd_set_fh_dentry\/"},"modified":"2025-11-24T16:34:20","modified_gmt":"2025-11-24T13:04:20","slug":"cve-2025-40212-nfsd-fix-refcount-leak-in-nfsd_set_fh_dentry","status":"publish","type":"post","link":"https:\/\/afaghhosting.net\/blog\/cve-2025-40212-nfsd-fix-refcount-leak-in-nfsd_set_fh_dentry\/","title":{"rendered":"CVE-2025-40212 &#8211; nfsd: fix refcount leak in nfsd_set_fh_dentry()"},"content":{"rendered":"<p>CVE ID : CVE-2025-40212<\/p>\n<p>Published :  Nov. 24, 2025, 1:04 p.m. | 18\u00a0minutes ago<\/p>\n<p>Description : In the Linux kernel, the following vulnerability has been resolved:<\/p>\n<p>nfsd: fix refcount leak in nfsd_set_fh_dentry()<\/p>\n<p>nfsd exports a &#8220;pseudo root filesystem&#8221; which is used by NFSv4 to find<br \/>\nthe various exported filesystems using LOOKUP requests from a known root<br \/>\nfilehandle.  NFSv3 uses the MOUNT protocol to find those exported<br \/>\nfilesystems and so is not given access to the pseudo root filesystem.<\/p>\n<p>If a v3 (or v2) client uses a filehandle from that filesystem,<br \/>\nnfsd_set_fh_dentry() will report an error, but still stores the export<br \/>\nin &#8220;struct svc_fh&#8221; even though it also drops the reference (exp_put()).<br \/>\nThis means that when fh_put() is called an extra reference will be dropped<br \/>\nwhich can lead to use-after-free and possible denial of service.<\/p>\n<p>Normal NFS usage will not provide a pseudo-root filehandle to a v3<br \/>\nclient.  This bug can only be triggered by the client synthesising an<br \/>\nincorrect filehandle.<\/p>\n<p>To fix this we move the assignments to the svc_fh later, after all<br \/>\npossible error cases have been detected.<\/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-40212 Published : Nov. 24, 2025, 1:04 p.m. | 18\u00a0minutes ago Description : In the Linux kernel, the following vulnerability has been resolved: nfsd: fix refcount leak in nfsd_set_fh_dentry() nfsd exports a &#8220;pseudo root filesystem&#8221; which is used by NFSv4 to find the various exported filesystems using LOOKUP requests from a known &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-74200","post","type-post","status-publish","format-standard","hentry","category-vulnerability"],"_links":{"self":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/74200","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=74200"}],"version-history":[{"count":0,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/posts\/74200\/revisions"}],"wp:attachment":[{"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/media?parent=74200"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/categories?post=74200"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/afaghhosting.net\/blog\/wp-json\/wp\/v2\/tags?post=74200"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}