CVE-2025-71201
Use-After-Free in Linux Kernel netfs Page Unlock Causes Data Leakage
Publication date: 2026-02-14
Last updated on: 2026-03-17
Assigner: kernel.org
Description
Description
CVSS Scores
EPSS Scores
| Probability: | |
| Percentile: |
Meta Information
Affected Vendors & Products
| Vendor | Product | Version / Range |
|---|---|---|
| linux | linux_kernel | 6.19 |
| linux | linux_kernel | 6.19 |
| linux | linux_kernel | 6.19 |
| linux | linux_kernel | 6.19 |
| linux | linux_kernel | From 6.14 (inc) to 6.18.6 (exc) |
Helpful Resources
Exploitability
| CWE ID | Description |
|---|---|
| CWE-125 | The product reads data past the end, or before the beginning, of the intended buffer. |
Attack-Flow Graph
AI Powered Q&A
Can you explain this vulnerability to me?
This vulnerability exists in the Linux kernel's netfs subsystem, specifically related to buffered reads. The issue occurs because the read result collection can proceed ahead of the completion of subrequests under certain conditions. This leads to a situation where a page (folio) is unlocked early, even though some parts of the data (the tail) have not yet been cleared.
The problem arises because netfs_read_unlock_folios() unlocks a folio when the collected read results reach the end-of-file (EOF) position, but a ZERO subrequest that clears the tail of the page happens afterward. This allows applications to potentially see uncleared or stale data through memory mapping (mmap).
The fix involves changing the end check to always be the end of the folio (page) rather than the end of the file, ensuring the tail is cleared before unlocking. The ZERO subrequest is still necessary in some cases, such as handling file extents without backing storage.
How can this vulnerability impact me? :
This vulnerability can lead to applications reading uninitialized or stale data from memory-mapped files. Specifically, the tail end of a page may contain uncleared data, which could be garbage or sensitive leftover information.
Such exposure can cause data integrity issues or unintended information disclosure if sensitive data is present in the memory that should have been cleared before being accessible.
How does this vulnerability affect compliance with common standards and regulations (like GDPR, HIPAA)?:
I don't know
How can this vulnerability be detected on my network or system? Can you suggest some commands?
This vulnerability can be detected by observing the behavior of buffered reads in the Linux kernel's netfs subsystem, particularly when reading files whose size does not align to a page boundary.
A practical way to reproduce and detect the issue is by creating a file with a size that is not page-aligned (e.g., 24998 bytes) and performing memory-mapped reads on it.
The following command sequence can be used to test for the vulnerability:
- xfs_io -c "mmap -r 0 0x6000" -c "madvise -d 0 0x6000" -c "mread -v 0 0x6000" /xfstest.test/x
If the last bytes of the file (e.g., last 0x4e bytes) are not zeroed out as expected, it indicates the vulnerability is present.
What immediate steps should I take to mitigate this vulnerability?
The vulnerability has been fixed in the Linux kernel by changing the end check to always be the end of the folio rather than the end of the file, ensuring proper clearing of the tail bytes.
Immediate mitigation steps include updating the Linux kernel to a version that contains this fix.
Since the issue relates to asynchronous handling of ZERO subrequests in netfs, avoiding or disabling affected asynchronous read operations temporarily may reduce exposure, but the primary and recommended action is to apply the kernel patch.