Commit 2af956a
committed
cachestat: fix page cache statistics permission checking
JIRA: https://issues.redhat.com/browse/RHEL-78135
JIRA: https://issues.redhat.com/browse/RHEL-78991
CVE: CVE-2025-21691
commit 5f53766
Author: Linus Torvalds <torvalds@linux-foundation.org>
Date: Tue Jan 21 09:27:22 2025 -0800
cachestat: fix page cache statistics permission checking
When the 'cachestat()' system call was added in commit cf264e1
("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 134fca9 ("mm/mincore.c: make mincore()
more conservative").
This just adds equivalent logic to 'cachestat()', modified for the file
context (rather than vma).
Reported-by: Sudheendra Raghav Neela <sneela@tugraz.at>
Fixes: cf264e1 ("cachestat: implement cachestat syscall")
Tested-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Johannes Weiner <hannes@cmpxchg.org>
Acked-by: Nhat Pham <nphamcs@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Signed-off-by: Luiz Capitulino <luizcap@redhat.com>1 parent bc25378 commit 2af956a
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4375 | 4375 | | |
4376 | 4376 | | |
4377 | 4377 | | |
| 4378 | + | |
| 4379 | + | |
| 4380 | + | |
| 4381 | + | |
| 4382 | + | |
| 4383 | + | |
| 4384 | + | |
| 4385 | + | |
| 4386 | + | |
| 4387 | + | |
| 4388 | + | |
| 4389 | + | |
| 4390 | + | |
| 4391 | + | |
4378 | 4392 | | |
4379 | 4393 | | |
4380 | 4394 | | |
| |||
4430 | 4444 | | |
4431 | 4445 | | |
4432 | 4446 | | |
| 4447 | + | |
| 4448 | + | |
| 4449 | + | |
4433 | 4450 | | |
4434 | 4451 | | |
4435 | 4452 | | |
| |||
0 commit comments