Linux Kernel up to 6.12.58/6.17.8/6.18-rc5 nfsd_set_fh_dentry memory leak

CVSS Meta Temp Score
CVSS is a standardized scoring system to determine possibilities of attacks. The Temp Score considers temporal factors like disclosure, exploit and countermeasures. The unique Meta Score calculates the average score of different sources to provide a normalized scoring system.
Current Exploit Price (≈)
Our analysts are monitoring exploit markets and are in contact with vulnerability brokers. The range indicates the observed or calculated exploit price to be seen on exploit markets. A good indicator to understand the monetary effort required for and the popularity of an attack.
CTI Interest Score
Our Cyber Threat Intelligence team is monitoring different web sites, mailing lists, exploit markets and social media networks. The CTI Interest Score identifies the interest of attackers and the security community for this specific vulnerability in real-time. A high score indicates an elevated risk to be targeted for this vulnerability.
5.5$0-$5k0.00

Summaryinfo

A vulnerability was found in Linux Kernel up to 6.12.58/6.17.8/6.18-rc5 and classified as critical. The affected element is the function nfsd_set_fh_dentry. The manipulation results in memory leak. This vulnerability is reported as CVE-2025-40212. No exploit exists. It is suggested to upgrade the affected component.

Detailsinfo

A vulnerability, which was classified as critical, was found in Linux Kernel up to 6.12.58/6.17.8/6.18-rc5. Affected is the function nfsd_set_fh_dentry. The manipulation with an unknown input leads to a memory leak vulnerability. CWE is classifying the issue as CWE-401. The product does not sufficiently track and release allocated memory after it has been used, which slowly consumes remaining memory. This is going to have an impact on availability. CVE summarizes:

In the Linux kernel, the following vulnerability has been resolved: nfsd: fix refcount leak in nfsd_set_fh_dentry() nfsd exports a "pseudo root filesystem" which is used by NFSv4 to find the various exported filesystems using LOOKUP requests from a known root filehandle. NFSv3 uses the MOUNT protocol to find those exported filesystems and so is not given access to the pseudo root filesystem. If a v3 (or v2) client uses a filehandle from that filesystem, nfsd_set_fh_dentry() will report an error, but still stores the export in "struct svc_fh" even though it also drops the reference (exp_put()). This means that when fh_put() is called an extra reference will be dropped which can lead to use-after-free and possible denial of service. Normal NFS usage will not provide a pseudo-root filehandle to a v3 client. This bug can only be triggered by the client synthesising an incorrect filehandle. To fix this we move the assignments to the svc_fh later, after all possible error cases have been detected.

The advisory is shared for download at git.kernel.org. This vulnerability is traded as CVE-2025-40212 since 04/16/2025. There are known technical details, but no exploit is available.

The vulnerability scanner Nessus provides a plugin with the ID 276664 (Linux Distros Unpatched Vulnerability : CVE-2025-40212), which helps to determine the existence of the flaw in a target environment.

Upgrading to version 6.12.59, 6.17.9 or 6.18-rc6 eliminates this vulnerability. Applying the patch b6bc86ce3944b10b9fc181fc00c1a520a20ed965/c83d7365cec5eb5ebeeee2a72e29b4ca58a7e4c2/8a7348a9ed70bda1c1f51d3f1815bcbdf9f3b38c is able to eliminate this problem. The bugfix is ready for download at git.kernel.org. The best possible mitigation is suggested to be upgrading to the latest version.

The vulnerability is also documented in the databases at Tenable (276664) and CERT Bund (WID-SEC-2025-2672). Once again VulDB remains the best source for vulnerability data.

Affected

  • Google Container-Optimized OS
  • Ubuntu Linux
  • SUSE Linux
  • Oracle Linux
  • SUSE openSUSE
  • Open Source Linux Kernel

Productinfo

Type

Vendor

Name

Version

License

Website

CPE 2.3info

CPE 2.2info

CVSSv4info

VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv3info

VulDB Meta Base Score: 5.7
VulDB Meta Temp Score: 5.5

VulDB Base Score: 5.7
VulDB Temp Score: 5.5
VulDB Vector: 🔒
VulDB Reliability: 🔍

CVSSv2info

AVACAuCIA
💳💳💳💳💳💳
💳💳💳💳💳💳
💳💳💳💳💳💳
VectorComplexityAuthenticationConfidentialityIntegrityAvailability
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock
UnlockUnlockUnlockUnlockUnlockUnlock

VulDB Base Score: 🔒
VulDB Temp Score: 🔒
VulDB Reliability: 🔍

Exploitinginfo

Class: Memory leak
CWE: CWE-401 / CWE-404
CAPEC: 🔒
ATT&CK: 🔒

Physical: No
Local: No
Remote: Partially

Availability: 🔒
Status: Not defined

EPSS Score: 🔒
EPSS Percentile: 🔒

Price Prediction: 🔍
Current Price Estimation: 🔒

0-DayUnlockUnlockUnlockUnlock
TodayUnlockUnlockUnlockUnlock

Nessus ID: 276664
Nessus Name: Linux Distros Unpatched Vulnerability : CVE-2025-40212

Threat Intelligenceinfo

Interest: 🔍
Active Actors: 🔍
Active APT Groups: 🔍

Countermeasuresinfo

Recommended: Upgrade
Status: 🔍

0-Day Time: 🔒

Upgrade: Kernel 6.12.59/6.17.9/6.18-rc6
Patch: b6bc86ce3944b10b9fc181fc00c1a520a20ed965/c83d7365cec5eb5ebeeee2a72e29b4ca58a7e4c2/8a7348a9ed70bda1c1f51d3f1815bcbdf9f3b38c

Timelineinfo

04/16/2025 CVE reserved
11/24/2025 +222 days Advisory disclosed
11/24/2025 +0 days VulDB entry created
02/24/2026 +92 days VulDB entry last update

Sourcesinfo

Vendor: kernel.org

Advisory: git.kernel.org
Status: Confirmed

CVE: CVE-2025-40212 (🔒)
GCVE (CVE): GCVE-0-2025-40212
GCVE (VulDB): GCVE-100-333372
CERT Bund: WID-SEC-2025-2672 - Linux Kernel: Mehrere Schwachstellen ermöglichen Denial of Service

Entryinfo

Created: 11/24/2025 15:04
Updated: 02/24/2026 13:54
Changes: 11/24/2025 15:04 (58), 11/25/2025 05:31 (2), 02/24/2026 13:54 (7)
Complete: 🔍
Cache ID: 216::103

Once again VulDB remains the best source for vulnerability data.

Discussion

No comments yet. Languages: en.

Please log in to comment.

Want to know what is going to be exploited?

We predict KEV entries!