CVE-2025-40212
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40212 is a vulnerability discovered in the Linux kernel's NFS server (nfsd) implementation, specifically in the nfsdsetfh_dentry() function. The vulnerability was published to the CVE List and included in the NVD dataset on November 24, 2025 (NVD).

Technical details

The vulnerability stems from a refcount leak in the nfsdsetfhdentry() function. The issue occurs because nfsd exports a 'pseudo root filesystem' used by NFSv4 to find exported filesystems using LOOKUP requests from a known root filehandle. When NFSv3 clients (which use the MOUNT protocol) attempt to use a filehandle from that filesystem, nfsdsetfhdentry() reports an error but still stores the export in 'struct svcfh' while dropping the reference (expput()). This leads to an extra reference being dropped during fh_put() (NVD).

Impact

The vulnerability can lead to use-after-free conditions and potential denial of service in the Linux kernel's NFS server implementation. However, it's important to note that this issue can only be triggered when a client synthesizes an incorrect filehandle, as normal NFS usage will not provide a pseudo-root filehandle to a v3 client (NVD).

Mitigation and workarounds

The fix involves modifying the code to move the assignments to the svc_fh later, after all possible error cases have been detected. This prevents the reference count issue from occurring (NVD).

Additional resources


SourceThis report was generated using AI

Related Linux Kernel vulnerabilities:

CVE ID

Severity

Score

Technologies

Component name

CISA KEV exploit

Has fix

Published date

CVE-2025-40205HIGH7.8
  • Linux KernelLinux Kernel
  • linux-raspi
NoYesNov 12, 2025
CVE-2025-40211HIGH7.1
  • Linux KernelLinux Kernel
  • kernel-modules-extra
NoYesNov 21, 2025
CVE-2025-40206MEDIUM5.5
  • Linux KernelLinux Kernel
  • linux-azure-fde
NoYesNov 12, 2025
CVE-2025-40210MEDIUM5.1
  • Linux KernelLinux Kernel
  • kernel-core
NoYesNov 21, 2025
CVE-2025-40212N/AN/A
  • Linux KernelLinux Kernel
  • libperf
NoNoNov 24, 2025

Free Vulnerability Assessment

Benchmark your Cloud Security Posture

Evaluate your cloud security practices across 9 security domains to benchmark your risk level and identify gaps in your defenses.

Request assessment

Get a personalized demo

Ready to see Wiz in action?

"Best User Experience I have ever seen, provides full visibility to cloud workloads."
David EstlickCISO
"Wiz provides a single pane of glass to see what is going on in our cloud environments."
Adam FletcherChief Security Officer
"We know that if Wiz identifies something as critical, it actually is."
Greg PoniatowskiHead of Threat and Vulnerability Management