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

Medium 5.5 Published Updated

Local attackers can read page cache statistics for files they do not own or have write access to, bypassing intended permission checks.

Exploited in the wild
Not known
Login needed
Any signed-in user
Attackable
Local or same network only
Victim action needed
Not needed
Fix
Available

What is CVE-2025-21691?

CVE-2025-21691 is a medium-severity vulnerability in Linux kernel, published on 10 Feb 2025. It can only be exploited from the same machine or local network, with no action from the victim.

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

Which versions are affected by CVE-2025-21691?

It affects 1 product.

Products include Linux kernel.

How do I fix CVE-2025-21691?

Apply the vendor's patch.

Is CVE-2025-21691 being exploited?

There is no known exploitation of CVE-2025-21691 in the wild and no public exploit code.

All Linux kernel vulnerabilities

Sources

Also known as BELL-CVE-2025-21691, DEBIAN-CVE-2025-21691, GHSA-3m25-8xh3-c6p2, UBUNTU-CVE-2025-21691.

Is CVE-2025-21691 in your software?

Upload an SBOM and sbomify checks it against every vulnerability here, every day.

Check your SBOMs for free