Home / Linux / Linux / CVE-2025-40007
CVE-2025-40007: is it exploited, and which versions of Linux are affected and fixed?
CVE-2025-40007 is a vulnerability in Linux. It is not known to be exploited: it is not in CISA's Known Exploited Vulnerabilities catalog (catalog 2026.11.30, read December 3, 2026, 18:09 UTC). Affected: Linux from 6.15.3 before 6.16 and Linux from 6.16 until the fixed versions (CVE record by Linux). Fixed in 6.16, 6.16.10 and 6.17 (CVE record by Linux).
Data checked December 3, 2026: last read CISA KEV December 3, 2026, 18:09 UTC, CVE record November 28, 2026, 17:38 UTC and NVD November 19, 2026, 07:16 UTC.
What is CVE-2025-40007?
In the Linux kernel, the following vulnerability has been resolved: netfs: fix reference leak Commit 20d72b00ca81 ("netfs: Fix the request's work item to not require a ref") modified netfs_alloc_request() to initialize the reference counter to 2 instead of 1. The rationale was that the requet's "work" would release the second reference after completion (via netfs_{read,write}_collection_worker()). That works most of the time if all goes well. However, it leaks this additional reference if the request is released before the I/O operation has been submitted: the error code path only decrements the reference counter once and the work item will never be queued because there will never be a completion. This has caused outages of our whole server cluster today because tasks were blocked in netfs_wait_for_outstanding_io(), leading to deadlocks in Ceph (another bug that I will address soon in another patch). This was caused by a netfs_pgpriv2_begin_copy_to_cache() call which failed in fscache_begin_write_operation(). The leaked netfs_io_request was never completed, leaving `netfs_inode.io_count` with a positive value forever. All of this is super-fragile code. Finding out which code paths will lead to an eventual completion and which do not is hard to see: - Some functions like netfs_create_write_req() allocate a request, but will never submit any I/O. - netfs_unbuffered_read_iter_locked() calls netfs_unbuffered_read() and then netfs_put_request(); however, netfs_unbuffered_read() can also fail early before submitting the I/O request, therefore another netfs_put_request() call must be added there. A rule of thumb is that functions that return a `netfs_io_request` do not submit I/O, and all of their callers must be checked. For my taste, the whole netfs code needs an overhaul to make reference counting easier to understand and less fragile & obscure. But to fix this bug here and now and produce a patch that is adequate for a stable backport, I tried a minimal approach that quickly frees the request object upon early failure. I decided against adding a second netfs_put_request() each time because that would cause code duplication which obscures the code further. Instead, I added the function netfs_put_failed_request() which frees such a failed request synchronously under the assumption that the reference count is exactly 2 (as initially set by netfs_alloc_request() and never touched), verified by a WARN_ON_ONCE(). It then deinitializes the request object (without going through the "cleanup_work" indirection) and frees the allocation (with RCU protection to protect against concurrent access by netfs_requests_seq_start()). All code paths that fail early have been changed to call netfs_put_failed_request() instead of netfs_put_request(). Additionally, I have added a netfs_put_request() call to netfs_unbuffered_read() as explained above because the netfs_put_failed_request() approach does not work there.
From the CVE record by Linux, last updated May 23, 2026, 16:01 UTC.
Which versions are affected, and which fix it?
| Vendor | Product | Affected | Fixed or not affected from |
|---|---|---|---|
| Linux | Linux | from 6.15.3 before 6.16 | 6.16 |
| Linux | Linux | from 6.16 until the fixed versions | 6.16.10, 6.17 |
As the CVE record by Linux states it, last updated May 23, 2026. Version ranges are the CNA's; a version the record calls not affected is usually the fix.
Is CVE-2025-40007 exploited in the wild?
- CISA KEV
- Not listed (catalog 2026.11.30)
- EPSS
- 0.22% probability of exploitation activity in the next 30 days, percentile 14.0 (FIRST EPSS, scores of December 3, 2026)
Where are the vendor advisories and references?
- https://git.kernel.org/stable/c/8df142e93098b4531fadb5dfcf93087649f570b3
- https://git.kernel.org/stable/c/4d428dca252c858bfac691c31fa95d26cd008706
When was it published, and where is the official record?
- Reserved
- April 16, 2025
- Published
- October 20, 2025, 15:26 UTC
- CVE record updated
- May 23, 2026, 16:01 UTC by Linux
- NVD
- Deferred, last modified October 19, 2026, 21:10 UTC
- Last checked
- CVE list November 28, 2026, 17:38 UTC; NVD November 19, 2026, 07:16 UTC; KEV December 3, 2026, 18:09 UTC; EPSS December 3, 2026
- Official record
- cve.org · NVD
What other CVEs affect Linux?
- Jul 4, 2026CVE-2026-53362 Linux: heap buffer overflow exploited
- Jun 25, 2026CVE-2026-53266 Linux: out-of-bounds write (memory corruption) exploited
- May 23, 2026CVE-2026-46300 Linux: write-what-where Condition exploited
- Apr 22, 2026CVE-2026-31431 Linux: incorrect resource transfer exploited
- Oct 13, 2025CVE-2025-39964 Linux: race condition exploited
- Sep 5, 2025CVE-2025-39682 Linux: unusual condition not checked exploited
- Jul 22, 2025CVE-2025-38352 Linux: time-of-check time-of-use race condition exploited
- Dec 27, 2024CVE-2024-53197 Linux: out-of-bounds write (memory corruption) exploited
Questions about CVE-2025-40007
Is CVE-2025-40007 exploited in the wild?
Not as far as CISA knows: it is not in the Known Exploited Vulnerabilities catalog, read December 3, 2026, 18:09 UTC. FIRST's EPSS gives it a 0.22% chance of exploitation activity in the next 30 days (scores of December 3, 2026).
Which versions of Linux are affected by CVE-2025-40007?
Linux from 6.15.3 before 6.16 and Linux from 6.16 until the fixed versions, per the CVE record by Linux. The tables above give every range the sources list.
Which version fixes CVE-2025-40007?
6.16, 6.16.10 and 6.17, per the CVE record by Linux. Check the vendor's advisory before you rely on it.
Where is the official record of CVE-2025-40007?
The CVE Program's record is at cve.org and the NVD's at nvd.nist.gov. For a fix, the vendor's own advisory is the one to follow.