# CVE-2025-21691: cachestat: fix page cache statistics permission checking

- Severity: Medium 5.5 (CVSS:3.1, scored by NVD) `CVSS:3.1/AV:L/AC:L/PR:L/UI:N/S:U/C:N/I:N/A:H`
- Known to be exploited: not in CISA's catalogue, which lists only what CISA has confirmed
- Likelihood of exploitation in the next 30 days (EPSS): 0.21%, higher than 11% of CVEs (2026-12-01)
- Published: 2025-02-10T15:58:47.219Z
- Modified: 2026-06-17T08:44:02.153Z
- Assigned by: Linux

## Description

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

cachestat: fix page cache statistics permission checking

When the 'cachestat()' system call was added in commit cf264e1329fb
("cachestat: implement cachestat syscall"), it was meant to be a much
more convenient (and performant) version of mincore() that didn't need
mapping things into the user virtual address space in order to work.

But it ended up missing the "check for writability or ownership" fix for
mincore(), done in commit 134fca9063ad ("mm/mincore.c: make mincore()
more conservative").

This just adds equivalent logic to 'cachestat()', modified for the file
context (rather than vma).

(As written by CVE List.)

## Affected

- Linux Linux: from cf264e1329fb0307e044f7675849f9f38b44c11a before 7d6405c13b0d8a8367cd8df63f118b619a3f0dd2; from cf264e1329fb0307e044f7675849f9f38b44c11a before 780ab8329672464984cf1344bd5c3993af0226c7; from cf264e1329fb0307e044f7675849f9f38b44c11a before 97153a05077f618f7471f50a78158602badccb30; from cf264e1329fb0307e044f7675849f9f38b44c11a before 5f537664e705b0bf8b7e329861f20128534f6a83; 6.5 (not affected: before 6.5; from 6.6.75 up to 6.6.*; from 6.12.12 up to 6.12.*; from 6.13.1 up to 6.13.*; from 6.14 up to *)
- linux linux_kernel: from 6.5 before 6.6.75; from 6.7 before 6.12.12; 6.13

## References

- <https://git.kernel.org/stable/c/7d6405c13b0d8a8367cd8df63f118b619a3f0dd2> (patch)
- <https://git.kernel.org/stable/c/780ab8329672464984cf1344bd5c3993af0226c7> (patch)
- <https://git.kernel.org/stable/c/97153a05077f618f7471f50a78158602badccb30> (patch)
- <https://git.kernel.org/stable/c/5f537664e705b0bf8b7e329861f20128534f6a83> (patch)

## Sources

- CVE List: [CVE-2025-21691](https://www.cve.org/CVERecord?id=CVE-2025-21691), CVE Terms of Use, modified 2026-05-11
- NVD: [CVE-2025-21691](https://nvd.nist.gov/vuln/detail/CVE-2025-21691), Public domain, modified 2026-06-17

---

Page: https://cve.day/CVE-2025-21691 · Whole record: https://cve.day/CVE-2025-21691.json · Rebuilt by cve.day 2026-11-25T22:58:53.922Z
