# CVE-2025-71201: netfs: Fix early read unlock of page with EOF in middle

> Archived entry. Full-text search covers entries since 2026-11-10; exact IDs work for all years.

- **Severity:** HIGH 7.1
- **CVSS:** 7.1 (v3.1, CNA) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:H/I:N/A:H`
- **CVSS metrics:** Attack vector: Local; Attack complexity: Low; Privileges required: Low; User interaction: None; Scope: Unchanged; Confidentiality impact: High; Integrity impact: None; Availability impact: High
- **Exploited in the wild:** Not in CISA KEV
- **Public exploit / PoC:** None known
- **Remote exploitation:** Not remotely exploitable (local or adjacent access needed)
- **EPSS:** 0.19% (percentile 5, 2026-11-26)
- **CWE:** CWE-125
- **Published:** 2026-02-14T15:22:21.233Z
- **Modified:** 2026-08-05T12:12:30.514Z

## Who should check

- Anyone running Linux \>= e2d46f2ec332533816417b60933954173f602121, \< 5b5482c0e5ee740b35a70759d3582477aea8e8e4; \>= e2d46f2ec332533816417b60933954173f602121, \< 570ad253a3455a520f03c2136af8714bc780186d
- Anyone running Linux 6.14

## Description

In the Linux kernel, the following vulnerability has been resolved:

netfs: Fix early read unlock of page with EOF in middle

The read result collection for buffered reads seems to run ahead of the
completion of subrequests under some circumstances, as can be seen in the
following log snippet:

    9p\_client\_res: client 18446612686390831168 response P9\_TREAD tag  0 err 0
    ...
    netfs\_sreq: R=00001b55\[1\] DOWN TERM  f=192 s=0 5fb2/5fb2 s=5 e=0
    ...
    netfs\_collect\_folio: R=00001b55 ix=00004 r=4000-5000 t=4000/5fb2
    netfs\_folio: i=157f3 ix=00004-00004 read-done
    netfs\_folio: i=157f3 ix=00004-00004 read-unlock
    netfs\_collect\_folio: R=00001b55 ix=00005 r=5000-5fb2 t=5000/5fb2
    netfs\_folio: i=157f3 ix=00005-00005 read-done
    netfs\_folio: i=157f3 ix=00005-00005 read-unlock
    ...
    netfs\_collect\_stream: R=00001b55\[0:\] cto=5fb2 frn=ffffffff
    netfs\_collect\_state: R=00001b55 col=5fb2 cln=6000 n=c
    netfs\_collect\_stream: R=00001b55\[0:\] cto=5fb2 frn=ffffffff
    netfs\_collect\_state: R=00001b55 col=5fb2 cln=6000 n=8
    ...
    netfs\_sreq: R=00001b55\[2\] ZERO SUBMT f=000 s=5fb2 0/4e s=0 e=0
    netfs\_sreq: R=00001b55\[2\] ZERO TERM  f=102 s=5fb2 4e/4e s=5 e=0

The 'cto=5fb2' indicates the collected file pos we've collected results to
so far - but we still have 0x4e more bytes to go - so we shouldn't have
collected folio ix=00005 yet.  The 'ZERO' subreq that clears the tail
happens after we unlock the folio, allowing the application to see the
uncleared tail through mmap.

The problem is that netfs\_read\_unlock\_folios() will unlock a folio in which
the amount of read results collected hits EOF position - but the ZERO
subreq lies beyond that and so happens after.

Fix this by changing the end check to always be the end of the folio and
never the end of the file.

In the future, I should look at clearing to the end of the folio here rather
than adding a ZERO subreq to do this.  On the other hand, the ZERO subreq can
run in parallel with an async READ subreq.  Further, the ZERO subreq may still
be necessary to, say, handle extents in a ceph file that don't have any
backing store and are thus implicitly all zeros.

This can be reproduced by creating a file, the size of which doesn't align
to a page boundary, e.g. 24998 (0x5fb2) bytes and then doing something
like:

    xfs\_io -c "mmap -r 0 0x6000" -c "madvise -d 0 0x6000" \\
           -c "mread -v 0 0x6000" /xfstest.test/x

The last 0x4e bytes should all be 00, but if the tail hasn't been cleared
yet, you may see rubbish there.  This can be reproduced with kafs by
modifying the kernel to disable the call to netfs\_read\_subreq\_progress()
and to stop afs\_issue\_read() from doing the async call for NETFS\_READAHEAD.
Reproduction can be made easier by inserting an mdelay(100) in
netfs\_issue\_read() for the ZERO-subreq case.

AFS and CIFS are normally unlikely to show this as they dispatch READ ops
asynchronously, which allows the ZERO-subreq to finish first.  9P's READ op is
completely synchronous, so the ZERO-subreq will always happen after.  It isn't
seen all the time, though, because the collection may be done in a worker
thread.

## Affected and fixed versions

- Linux: \>= e2d46f2ec332533816417b60933954173f602121, \< 5b5482c0e5ee740b35a70759d3582477aea8e8e4; \>= e2d46f2ec332533816417b60933954173f602121, \< 570ad253a3455a520f03c2136af8714bc780186d (cvelist)
- Linux: 6.14 (cvelist)

## Mitigation

- Upgrade Linux to 570ad253a3455a520f03c2136af8714bc780186d or later.

## Check your systems with an agent

Paste this into a coding agent:

```text
Check whether anything I run is affected by CVE-2025-71201. Work read-only: do not install, upgrade, delete or change anything.

Details: https://flawdb.com/CVE-2025-71201.md
Affected: Linux >= e2d46f2ec332533816417b60933954173f602121, < 5b5482c0e5ee740b35a70759d3582477aea8e8e4; >= e2d46f2ec332533816417b60933954173f602121, < 570ad253a3455a520f03c2136af8714bc780186d; Linux 6.14
Fixed in: Linux 5b5482c0e5ee740b35a70759d3582477aea8e8e4, Linux 570ad253a3455a520f03c2136af8714bc780186d

Steps:
1. Search this machine and project for Linux: dependency manifests and lockfiles, installed packages, container images and running services.
2. For each match, note the installed version and whether it is inside the affected range.
3. Report a table: location, installed version, affected (yes / no / unsure), evidence. If affected, say which fixed version or mitigation from the details link applies, but don't apply it.
```

## FAQ

### Is CVE-2025-71201 being exploited?

There is no confirmed exploitation: CVE-2025-71201 is not in the CISA Known Exploited Vulnerabilities catalog. No public exploit code is known. EPSS estimates a 0.19% chance of exploitation in the next 30 days (as of 2026-11-26).

### How serious is CVE-2025-71201?

High: CVSS 7.1 (v3.1, scored by CNA). Not remotely exploitable (local or adjacent access needed).

### Which versions are affected by CVE-2025-71201?

Linux \>= e2d46f2ec332533816417b60933954173f602121, \< 5b5482c0e5ee740b35a70759d3582477aea8e8e4; \>= e2d46f2ec332533816417b60933954173f602121, \< 570ad253a3455a520f03c2136af8714bc780186d; Linux 6.14.

### Is there a fix for CVE-2025-71201?

Yes. Fixed in Linux 5b5482c0e5ee740b35a70759d3582477aea8e8e4, Linux 570ad253a3455a520f03c2136af8714bc780186d. Upgrade Linux to 570ad253a3455a520f03c2136af8714bc780186d or later.

### How do I check if I'm affected by CVE-2025-71201?

Find where you use the affected software (dependency lockfiles, installed packages, container images, servers) and compare the installed version with the affected range above. The agent prompt on this page does this read-only.

## References

- patch: <https://git.kernel.org/stable/c/5b5482c0e5ee740b35a70759d3582477aea8e8e4>
- patch: <https://git.kernel.org/stable/c/570ad253a3455a520f03c2136af8714bc780186d>

## Attribution

- CVE Program: CVE® is a registered trademark of The MITRE Corporation. CVE records © 1999–2026 The MITRE Corporation. <https://www.cve.org/Legal/TermsOfUse>
- NVD: This product uses data from the NVD API but is not endorsed or certified by the NVD. <https://nvd.nist.gov/vuln/detail/CVE-2025-71201>

HTML: <https://flawdb.com/CVE-2025-71201> · JSON: <https://flawdb.com/api/v1/entries/CVE-2025-71201>
