CVE-2025-21691

cachestat: fix page cache statistics permission checking

No CVSS score yet EPSS 0.21%

Published 10 Feb 2025 Updated 11 May 2026 CNA: Linux

Check your servers for CVE-2025-21691

The Vulnpocalypse collector sends the package list of each Linux server and of its container images once a day. Vulnpocalypse shows every server where CVE-2025-21691 affects the running kernel, with the command that installs the fix. The free plan covers one server and one domain and does not need a credit card.

Check my servers

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).

Exploitation

EPSS 0.21%: the probability of exploitation activity in the next 30 days, from the EPSS model of FIRST. The score is higher than 11.0% of all scored CVEs. Scores of 1 Dec 2026.

Affected products

As the CNA lists them.

ProductVersions
Linux
affected from cf264e1329fb0307e044f7675849f9f38b44c11a, before 7d6405c13b0d8a8367cd8df63f118b619a3f0dd2
affected from cf264e1329fb0307e044f7675849f9f38b44c11a, before 780ab8329672464984cf1344bd5c3993af0226c7
affected from cf264e1329fb0307e044f7675849f9f38b44c11a, before 97153a05077f618f7471f50a78158602badccb30
affected from cf264e1329fb0307e044f7675849f9f38b44c11a, before 5f537664e705b0bf8b7e329861f20128534f6a83
Other versions: unaffected
Linux
affected 6.5
unaffected before 6.5
unaffected from 6.6.75 up to and including 6.6.*
unaffected from 6.12.12 up to and including 6.12.*
unaffected from 6.13.1 up to and including 6.13.*
unaffected 6.14 and later
Other versions: affected

Is my server affected?

This CVE is in the Linux kernel. Compare the running kernel with the fixed kernel version of your distribution, and reboot after a kernel update:

uname -r
# Debian, Ubuntu: does the changelog of the running kernel name the CVE?
zgrep -l CVE-2025-21691 /usr/share/doc/linux-image-$(uname -r)/changelog.Debian.gz
# RHEL, Rocky, Alma
rpm -q --changelog kernel | grep CVE-2025-21691

With Trivy, on the host and for a container image. When a package is affected, it prints the installed and the fixed version:

trivy rootfs --scanners vuln / | grep CVE-2025-21691
trivy image --scanners vuln IMAGE | grep CVE-2025-21691

Vulnpocalypse makes this comparison every day for the package lists of your servers and container images, including language packages (npm, PyPI, Go, Maven and others), and sends the command that installs the fix. Start free with one server and one domain or read how to install the collector.

References

Other references

Source: the record CVE-2025-21691 of the CVE List (CVE Program), CVE Terms of Use; EPSS of FIRST. The text of the record is shown as published. Data sources and licences.