CVE-2025-40007
Linux Kernel vulnerability analysis and mitigation

Overview

CVE-2025-40007 is a reference leak vulnerability in the Linux kernel's netfs subsystem, discovered and disclosed on October 20, 2025. The issue affects the netfsallocrequest() function, which was modified to initialize the reference counter incorrectly, leading to potential memory leaks (NVD).

Technical details

The vulnerability stems from a modification in commit 20d72b00ca81 that changed netfsallocrequest() to initialize the reference counter to 2 instead of 1. While the second reference was intended to be released by the request's work item after completion, it creates a leak when the request is released before I/O operation submission. The error code path only decrements the counter once, and the work item never queues due to lack of completion. Red Hat has assigned this vulnerability a CVSS v3.1 base score of 5.5 (AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H) (Red Hat).

Impact

The vulnerability has caused server cluster outages by blocking tasks in netfswaitforoutstandingio(), leading to deadlocks in Ceph. The issue occurs when netfspgpriv2begincopytocache() fails in fscachebeginwriteoperation(), resulting in leaked netfsiorequest objects and permanently positive netfsinode.iocount values (NVD).

Mitigation and workarounds

A fix has been implemented that introduces a new function netfsputfailedrequest() which frees failed requests synchronously, assuming a reference count of exactly 2. The fix includes modifying early failure code paths to use this new function instead of netfsputrequest(). Additionally, a netfsputrequest() call has been added to netfsunbuffered_read() (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-40258HIGH7
  • Linux KernelLinux Kernel
  • kernel-zfcpdump-devel-matched
NoNoDec 04, 2025
CVE-2025-40259MEDIUM6.2
  • Linux KernelLinux Kernel
  • kernel-64k-devel
NoNoDec 04, 2025
CVE-2025-40264MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-rt-64k-debug-kvm
NoNoDec 04, 2025
CVE-2025-40254MEDIUM5.5
  • Linux KernelLinux Kernel
  • kernel-modules-partner
NoNoDec 04, 2025
CVE-2025-40253MEDIUM5.5
  • Linux KernelLinux Kernel
  • python3-perf
NoNoDec 04, 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